Skip to content
Snippets Groups Projects
Commit 6afb4bb4 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] sale: smart button "Sales"


Steps to reproduce the bug:

- Let's consider a customer company partner P
- Let's consider, P1, a child partner of P
- Create a SO for P1
- Archive P1

Bug:

The SO count in the smart button Sales of P was 0 instead of 1

opw:2267828

closes odoo/odoo#52340

X-original-commit: 31ded31d
Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 23b0f382
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ class ResPartner(models.Model):
def _compute_sale_order_count(self):
# retrieve all children partners and prefetch 'parent_id' on them
all_partners = self.search([('id', 'child_of', self.ids)])
all_partners = self.with_context(active_test=False).search([('id', 'child_of', self.ids)])
all_partners.read(['parent_id'])
sale_order_groups = self.env['sale.order'].read_group(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment