[FIX] sale: distribution with same account in account and distrib
- Activate analytic accounting - Create a Sale Order, with an analytic account for the whole order - Add a line with a distribution containing the same account (100%) - Create Invoice From this Order => The distribution on the account for the invoice is of 100% and not 200% (the sum of the order's account and distribution). The problem is that on the dict that we're returning, the key is a string closes odoo/odoo#116617 X-original-commit: 9ecf263d4124b186b55e50ab025acb7541043d3a Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
This commit is contained in:
@@ -1102,6 +1102,7 @@ class SaleOrderLine(models.Model):
|
||||
if self.analytic_distribution and not self.display_type:
|
||||
res['analytic_distribution'] = self.analytic_distribution
|
||||
if analytic_account_id and not self.display_type:
|
||||
analytic_account_id = str(analytic_account_id)
|
||||
if 'analytic_distribution' in res:
|
||||
res['analytic_distribution'][analytic_account_id] = res['analytic_distribution'].get(analytic_account_id, 0) + 100
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user