[CHG] account_voucher_killer: add voucher related menus to group "invoice_voucher_user"

This commit is contained in:
Anthony Muschang
2014-12-02 16:00:56 +01:00
parent 93b44a50cc
commit 082ab5d867
3 changed files with 26 additions and 5 deletions

View File

@@ -3,5 +3,7 @@
This add-on disables the "Register Payment" button on
customer invoices and the "Pay" button on supplier invoices.
It also disable the menus "Sales Receipts", "Customer Payments", "Purchase Receipts", "Supplier Payments" and "Journal Vouchers".
More precisely, this module adds a group "Use voucher in Invoices"
and only users in that group see these buttons.
and only users in that group see these buttons and menus.

View File

@@ -19,7 +19,7 @@
#
##############################################################################
{'name': 'Invoicing voucher killer',
{'name': 'Account voucher killer',
'version': '1.0.0',
'category': 'other',
'author': 'Camptocamp',

View File

@@ -7,11 +7,11 @@
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_pay_customer'][last()]"
position="attributes">
<attribute name="groups">invoicing_voucher_killer.invoice_voucher_user</attribute>
<attribute name="groups">account_voucher_killer.invoice_voucher_user</attribute>
</xpath>
<xpath expr="//button[@name='invoice_pay_customer'][1]"
position="attributes">
<attribute name="groups">invoicing_voucher_killer.invoice_voucher_user</attribute>
<attribute name="groups">account_voucher_killer.invoice_voucher_user</attribute>
</xpath>
</field>
</record>
@@ -23,10 +23,29 @@
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_pay_customer'][last()]"
position="attributes">
<attribute name="groups">invoicing_voucher_killer.invoice_voucher_user</attribute>
<attribute name="groups">account_voucher_killer.invoice_voucher_user</attribute>
</xpath>
</field>
</record>
<record id="account_voucher.menu_action_sale_receipt" model="ir.ui.menu">
<field name="groups_id" eval="[(6,0,[ref('account_voucher_killer.invoice_voucher_user')])]"/>
</record>
<record id="account_voucher.menu_action_vendor_receipt" model="ir.ui.menu">
<field name="groups_id" eval="[(6,0,[ref('account_voucher_killer.invoice_voucher_user')])]"/>
</record>
<record id="account_voucher.menu_action_purchase_receipt" model="ir.ui.menu">
<field name="groups_id" eval="[(6,0,[ref('account_voucher_killer.invoice_voucher_user')])]"/>
</record>
<record id="account_voucher.menu_action_vendor_payment" model="ir.ui.menu">
<field name="groups_id" eval="[(6,0,[ref('account_voucher_killer.invoice_voucher_user')])]"/>
</record>
<record id="account_voucher.menu_encode_entries_by_voucher" model="ir.ui.menu">
<field name="groups_id" eval="[(6,0,[ref('account_voucher_killer.invoice_voucher_user')])]"/>
</record>
</data>
</openerp>