[FIX] account: Field total_invoiced in res.partner doesn't include archived children

This commit is contained in:
Carlos Dauden
2017-10-12 13:20:57 +02:00
committed by Christophe Matthieu
parent d329b946d6
commit 40d4cdd39f
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ class ResPartner(models.Model):
all_partner_ids = []
for partner in self:
# price_total is in the company currency
all_partners_and_children[partner] = self.search([('id', 'child_of', partner.id)]).ids
all_partners_and_children[partner] = self.with_context(active_test=False).search([('id', 'child_of', partner.id)]).ids
all_partner_ids += all_partners_and_children[partner]
# searching account.invoice.report via the orm is comparatively expensive
+9
View File
@@ -0,0 +1,9 @@
Spain, 2015-05-28
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this declaration.
Signed,
Carlos Dauden carlos.dauden@tecnativa.com https://github.com/carlosdauden