[FIX] account: invoices button on partner sheet only display the customer invoices, and is visible only if the partner is a customer

bzr revid: dle@openerp.com-20140425095123-xvc51uiqt3g18181
This commit is contained in:
Denis Ledoux 2014-04-25 11:51:23 +02:00
parent 3eb4fa3bac
commit 81aeccb3a0
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@
<field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside">
<button type="action" string="Invoices"
name="%(account.action_invoice_tree)d"
name="%(account.action_invoice_tree1)d"
attrs="{'invisible': [('customer', '=', False)]}"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
<button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
<button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"