diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4e2e041efea..b692f4e55c2 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -133,6 +133,7 @@ + @@ -496,6 +497,17 @@ + + Invoices + account.invoice + form + tree,form,calendar,graph + + [('type','in', ['out_invoice', 'out_refund']), ('state', 'not in', ['draft', 'cancel'])] + {'type':False} + + + Pending Invoice account.invoice diff --git a/addons/account/partner.py b/addons/account/partner.py index 416ecf5fbbf..3df24382164 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -242,7 +242,7 @@ class res_partner(osv.osv): result = {} account_invoice_report = self.pool.get('account.invoice.report') for partner in self.browse(cr, uid, ids, context=context): - domain = [('partner_id', 'child_of', partner.id)] + domain = [('partner_id', 'child_of', partner.id), ('state', 'not in', ['draft', 'cancel'])] invoice_ids = account_invoice_report.search(cr, uid, domain, context=context) invoices = account_invoice_report.browse(cr, uid, invoice_ids, context=context) result[partner.id] = sum(inv.user_currency_price_total for inv in invoices) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index ebc485c5f76..a85b27882c4 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -77,7 +77,7 @@ class="oe_stat_button" id="invoice_button" icon="fa-pencil-square-o" - name="%(account.action_invoice_tree)d" + name="%(account.action_invoice_refund_out_tree)d" attrs="{'invisible': [('customer', '=', False)]}" context="{'search_default_partner_id': active_id,'default_partner_id': active_id}">

Invoiced