diff --git a/l10n_it_fatturapa_in_rc/models/account_invoice.py b/l10n_it_fatturapa_in_rc/models/account_invoice.py index 59fd055771a1..d24d570919e0 100644 --- a/l10n_it_fatturapa_in_rc/models/account_invoice.py +++ b/l10n_it_fatturapa_in_rc/models/account_invoice.py @@ -1,17 +1,17 @@ -from odoo import _, models +from odoo import _, api, models from odoo.tools import float_compare class InvoiceLine(models.Model): _inherit = "account.move.line" - def _set_rc_flag(self, invoice): - self.ensure_one() + @api.depends("move_id", "move_id.fiscal_position_id", "tax_ids") + def _compute_rc_flag(self): if "fatturapa.attachment.in" in self.env.context.get("active_model", []): # this means we are importing an e-invoice, # so RC flag is already set, where needed return - return super(InvoiceLine, self)._set_rc_flag(invoice) + super()._compute_rc_flag() class Invoice(models.Model): diff --git a/l10n_it_fatturapa_in_rc/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in_rc/readme/CONTRIBUTORS.rst index ea72e0dcd84b..9e1c095f22b4 100644 --- a/l10n_it_fatturapa_in_rc/readme/CONTRIBUTORS.rst +++ b/l10n_it_fatturapa_in_rc/readme/CONTRIBUTORS.rst @@ -1,3 +1,7 @@ * Sergio Corato * Lorenzo Battistini * Marco Colombo + +* `Ooops `_: + + * Giovanni Serra