create document_page_approval module

(../7.0pageapproval/ rev 1)

fix status bar in page approval
(../7.0pageapproval/ rev 2)

change approval workflow in page history and started to add showing approved page in normal page
(../7.0pageapproval/ rev 3)

show last approved content and aproved by
(../7.0pageapproval/ rev 4)

Fix bug on page creation
(../7.0pageapproval/ rev 5)

add status in history tree view
(../7.0pageapproval/ rev 6)

add a need approval field and hide the workflow when no approval needed
(../7.0pageapproval/ rev 7)

add access validation to approval
(../7.0pageapproval/ rev 8)

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)

made invisible the prover group when not needed
(../7.0pageapproval/ rev 10)

add email to aprovers group's members
(../7.0pageapproval/ rev 11)
This commit is contained in:
Jonatan Cloutier
2013-04-16 18:18:39 -04:00
committed by flachica
parent becae21462
commit 34e73cb5d3
7 changed files with 390 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="wiki_history_form_inherit" model="ir.ui.view">
<field name="name">document.page.history.form</field>
<field name="model">document.page.history</field>
<field name="inherit_id" ref="document_page.wiki_history_form"/>
<field name="arch" type="xml">
<xpath expr="//form/label[@for='page_id']" position="before">
<header attrs="{'invisible':[('is_parent_approval_required','=',False)]}">
<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>
</record>
<record id="wiki_form_inherit" model="ir.ui.view">
<field name="name">document.page.form</field>
<field name="model">document.page</field>
<field name="inherit_id" ref="document_page.view_wiki_form"/>
<field name="arch" type="xml">
<field name="display_content" position="before">
<field name="approved_date" class="oe_view_only"/>
<field name="approved_uid" class="oe_view_only"/>
</field>
<field name="parent_id" position="after">
<field name="approval_required" attrs="{'invisible':[('type','=','content')]}"/>
<field name="approver_gid" attrs="{'invisible':['|',('type','=','content'), ('approval_required','!=', True)], 'required':[('approval_required','=', True)]}"/>
</field>
</field>
</record>
<record id="view_wiki_history_tree_inherit" model="ir.ui.view">
<field name="name">document.page.history.tree</field>
<field name="model">document.page.history</field>
<field name="inherit_id" ref="document_page.view_wiki_history_tree"/>
<field name="arch" type="xml">
<field name="page_id" position="after">
<field name="state" attrs="{'invisible':[('is_parent_approval_required','=',False)]}"/>
<field name="is_parent_approval_required" invisible="1"/>
</field>
</field>
</record>
</data>
</openerp>