[FIX] document_page_approval: Add Change Request Manager rule

Steps to reproduce the error:
- Modify the content of a page (with a different user).
- Go to the Change request menu and Cancel the change.
- Click on the "Back to draft" button.
- An error will be displayed

TT55569
This commit is contained in:
Víctor Martínez 2025-03-17 11:12:35 +01:00 committed by Bhavesh Heliconia
parent a53bc19077
commit d45dd7ff54
2 changed files with 14 additions and 0 deletions

View File

@ -36,4 +36,17 @@
<field name="perm_unlink" eval="True" />
<field name="perm_create" eval="True" />
</record>
<record model="ir.rule" id="rule_change_request_manager">
<field name="name">Change Request Manager</field>
<field name="model_id" ref="model_document_page_history" />
<field
name="groups"
eval="[(6, 0, [ref('document_page.group_document_manager')])]"
/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_read" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_unlink" eval="True" />
<field name="perm_create" eval="True" />
</record>
</odoo>

View File

@ -45,6 +45,7 @@
type="object"
string="Back to draft"
invisible="(not am_i_owner or not am_i_approver) and (state not in ('cancelled', 'to approve'))"
groups="document_page.group_document_manager"
/>
<field name="am_i_owner" invisible="1" />
<field name="am_i_approver" invisible="1" />