[FIX] l10n_*: use company from environment
previously, with multi-company setup, when we switch company from
top right corner, that company was set as current user's main company.
But with commit a5b6f31cf2 it no more changes current user's
company but updates 'company' property of environment for specific
browser tab. So, env.user.company_id has to be replaced with
env.company.
Task: 2052484
Closes: 35851
closes odoo/odoo#35851
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -162,7 +162,7 @@ class AccountMove(models.Model):
|
||||
elements = etax.xpath('cbc:Percent', namespaces=namespaces)
|
||||
if elements:
|
||||
tax = self.env['account.tax'].search([
|
||||
('company_id', '=', self.env.user.company_id.id),
|
||||
('company_id', '=', self.env.company.id),
|
||||
('amount', '=', float(elements[0].text)),
|
||||
('type_tax_use', '=', invoice_form.journal_id.type),
|
||||
], order='sequence ASC', limit=1)
|
||||
|
||||
Reference in New Issue
Block a user