diff --git a/l10n_br_sped_base/models/sped_mixin.py b/l10n_br_sped_base/models/sped_mixin.py index bae11c81d073..53e4d3a7391f 100644 --- a/l10n_br_sped_base/models/sped_mixin.py +++ b/l10n_br_sped_base/models/sped_mixin.py @@ -66,7 +66,7 @@ def _compute_reference(self): if not res.res_model: res.reference = "" continue - model = self.env["ir.model"].search([("model", "=", self.res_model)]) + model = self.env["ir.model"].search([("model", "=", res.res_model)]) if not model: raise UserError( _("Undefined mapping model for Register %s and model")