Retrieve tax rounding configuration using the company of the taxable

Closes #13688
(grafted from 1aa6ba0c1569430c00413d3fff7fe6da578600b0)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-11-15 18:06:45 +01:00
1 parent 761fb07908
commit af9bbcc995
1 file changed
+5 -1
+5 -1
View File
@@ -1279,11 +1279,15 @@ class TaxableMixin(object):
pool = Pool()
Tax = pool.get('account.tax')
Configuration = pool.get('account.configuration')
context = Transaction().context
all_taxes = {}
with Transaction().set_context(self._get_tax_context()):
config = Configuration(1)
tax_rounding = config.get_multivalue('tax_rounding')
tax_rounding = config.get_multivalue(
'tax_rounding',
company=self.company.id if self.company
else context.get('company'))
taxable_lines = defaultdict(list)
for params in self.taxable_lines:
taxable_line = _TaxableLine(*params)