give rigth to Page aprover group on the page_history model and hide the button for unallowed group thought the security isn't enforced a the orm level

(../7.0pageapproval/ rev 9)
This commit is contained in:
Jonatan Cloutier
2013-06-14 11:55:50 -04:00
parent 0e79e6f0e3
commit 90f540eb9e
4 changed files with 27 additions and 4 deletions

View File

@@ -8,9 +8,12 @@
<field name="arch" type="xml">
<xpath expr="//form/label[@for='page_id']" position="before">
<header attrs="{'invisible':[('is_parent_approval_required','=',False)]}">
<button name="page_approval_approve" string="Approve" states="draft" />
<span attrs="{'invisible':[('can_user_approve_page','=',False)]}">
<button name="page_approval_approve" string="Approve" states="draft"/>
</span>
<field name="state" widget="statusbar" statusbar_visible="draft,approved"/>
<field name="is_parent_approval_required" invisible="1"/>
<field name="can_user_approve_page" invisible="1"/>
</header>
</xpath>
</field>