|
|
@ -30,10 +30,11 @@ class ResPartner(models.Model): |
|
|
|
all_partners_and_children[partner] = self.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 |
|
|
|
# (generates queries "id in []" forcing to build the full table). |
|
|
|
# In simple cases where all invoices are in the same currency than the user's company |
|
|
|
# access directly these elements |
|
|
|
# searching account.invoice.report via the orm is comparatively |
|
|
|
# expensive (generates queries "id in []" forcing to build the |
|
|
|
# full table). |
|
|
|
# In simple cases where all invoices are in the same currency than |
|
|
|
# the user's company access directly these elements |
|
|
|
|
|
|
|
# generate where clause to include multicompany rules |
|
|
|
where_query = account_invoice_report._where_calc([ |
|
|
|