You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
2.9 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Inherited form view of account.move model-->
<record id="account_move_approval_view_form" model="ir.ui.view" >
<field name="name">account.move.view.form.inherit.invoice.multi.approval
</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_user_id']" position="after">
<field name="document_fully_approved" invisible="1"/>
<field name="check_approve_ability" invisible="1"/>
<field name="is_approved" invisible="1"/>
<field name="page_visibility" invisible="1"/>
<field name="approval_ids" invisible="1"/>
</xpath>
<xpath expr="//button[@name='action_post']" position="before">
<button name="action_invoice_approve" class="oe_highlight"
string="Approve" type="object"
groups="invoice_multi_approval.group_approver,invoice_multi_approval.group_approve_manager"
invisible="move_type not in ('out_invoice',
'out_refund',
'in_invoice', 'in_refund') or check_approve_ability != True or
document_fully_approved ==True or is_approved == True"/>
</xpath>
<xpath expr="//button[@name='action_post'][2]"
position="attributes">
<attribute name="invisible">
document_fully_approved == False or state == 'posted'
</attribute>
</xpath>
<xpath expr="//page[@id='other_tab']" position="after">
<page string="Approvals" name="approval_tab"
invisible="move_type not in ('in_invoice','out_invoice',
'in_refund','out_refund') and page_visibility ==False">
<field name="approval_ids" mode="tree" nolabel="1"
style="pointer-events:none;">
<tree string="Approval lines"
create="0" edit="0" delete="0">
<field name="approver_id"/>
<field name="approval_status"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
<!-- Menu items for Approvals and Invoice approval-->
<menuitem id="invoice_approval_menu_root" name="Approvals"
parent="account.menu_finance_configuration" sequence="10"
groups="group_approve_manager"/>
<menuitem id="invoice_approval_menu_action" name="Invoice Approval"
parent="invoice_multi_approval.invoice_approval_menu_root"
action="invoice_approval_action" sequence="1"
groups="group_approve_manager"/>
</odoo>