From 5b380688abd72d5b3005997857475b36e5bc3026 Mon Sep 17 00:00:00 2001 From: Antonio Neto Date: Thu, 14 Dec 2023 14:46:31 -0300 Subject: [PATCH] [REF] l10n_br_fiscal: create for simplified tax" --- l10n_br_fiscal/models/simplified_tax.py | 12 +++++++----- l10n_br_fiscal/static/description/index.html | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/l10n_br_fiscal/models/simplified_tax.py b/l10n_br_fiscal/models/simplified_tax.py index b145ef6101ee..5298ae2ca2d9 100644 --- a/l10n_br_fiscal/models/simplified_tax.py +++ b/l10n_br_fiscal/models/simplified_tax.py @@ -34,13 +34,15 @@ class SimplifiedTax(models.Model): readonly=True, ) - @api.model - def create(self, vals): - """Override create for update effective tax lines in all companys""" - record = super().create(vals) + @api.model_create_multi + def create(self, vals_list): + """ + Override the create method to update the effective tax lines in all companies + """ + simplified_taxes = super().create(vals_list) companies = self.env["res.company"].search( [("tax_framework", "=", TAX_FRAMEWORK_SIMPLES)] ) for company in companies: company.update_effective_tax_lines() - return record + return simplified_taxes diff --git a/l10n_br_fiscal/static/description/index.html b/l10n_br_fiscal/static/description/index.html index 37dcc34f4f8a..bbd966c71175 100644 --- a/l10n_br_fiscal/static/description/index.html +++ b/l10n_br_fiscal/static/description/index.html @@ -1,3 +1,4 @@ +