[FIX] account: invoices button on partner sheet only display the customer invoices...
authorDenis Ledoux <dle@openerp.com>
Fri, 25 Apr 2014 09:51:23 +0000 (11:51 +0200)
committerDenis Ledoux <dle@openerp.com>
Fri, 25 Apr 2014 09:51:23 +0000 (11:51 +0200)
bzr revid: dle@openerp.com-20140425095123-xvc51uiqt3g18181

addons/account/partner_view.xml

index 6a58bc7..739fcf1 100644 (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"