[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
parent 2d7c5b18dd
commit 522ffc3a43
2 changed files with 15 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"
attrs="{'invisible':['|','&amp;',('am_i_owner','=',False),('am_i_approver','=',False),('state','not in',['cancelled'])]}"
groups="document_page.group_document_manager"
/>
<!-- cancel & reopen, if i am owner or approver -->
<button
@ -52,6 +53,7 @@
type="object"
string="Back to draft"
attrs="{'invisible':['|','&amp;',('am_i_owner','=',False),('am_i_approver','=',False),('state','not in',['to approve'])]}"
groups="document_page.group_document_manager"
/>
<field name="am_i_owner" invisible="1" />
<field name="am_i_approver" invisible="1" />