diff --git a/l10n_it_account_stamp/__manifest__.py b/l10n_it_account_stamp/__manifest__.py index 7c0319b2fceb..03724af98fb1 100644 --- a/l10n_it_account_stamp/__manifest__.py +++ b/l10n_it_account_stamp/__manifest__.py @@ -7,7 +7,7 @@ { 'name': 'Italian Localization - Tax Stamp', - 'version': '10.0.1.0.1', + 'version': '10.0.1.0.2', 'category': 'Localization/Italy', 'summary': 'Tax stamp automatic management', 'author': 'Ermanno Gnan, Sergio Corato, Enrico Ganzaroli, ' diff --git a/l10n_it_account_stamp/models/invoice.py b/l10n_it_account_stamp/models/invoice.py index 068581df3d0e..534246bd1ff5 100644 --- a/l10n_it_account_stamp/models/invoice.py +++ b/l10n_it_account_stamp/models/invoice.py @@ -10,7 +10,7 @@ class AccountInvoice(models.Model): "Tax Stamp", readonly=True, states={'draft': [('readonly', False)]}) def is_tax_stamp_applicable(self): - stamp_product_id = self.env.user.with_context( + stamp_product_id = self.with_context( lang=self.partner_id.lang).company_id.tax_stamp_product_id if not stamp_product_id: raise exceptions.Warning( @@ -40,7 +40,7 @@ def add_tax_stamp_line(self): for inv in self: if not inv.tax_stamp: raise exceptions.Warning(_("Tax stamp is not applicable")) - stamp_product_id = self.env.user.with_context( + stamp_product_id = inv.with_context( lang=inv.partner_id.lang).company_id.tax_stamp_product_id if not stamp_product_id: raise exceptions.Warning( @@ -123,7 +123,7 @@ def action_move_create(self): posted = True inv.move_id.state = 'draft' line_model = self.env['account.move.line'] - stamp_product_id = self.env.user.with_context( + stamp_product_id = inv.with_context( lang=inv.partner_id.lang).company_id.tax_stamp_product_id if not stamp_product_id: raise exceptions.Warning(