Hello Sergio,
when i push your module in my development branch (v13), i've got the error below.
I don't understand why because the field sale_line_ids is in the model account.move.line
Regards
Vincent
Failed to load registry
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 426, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/odoo/modules/loading.py", line 234, in load_module_graph
module.with_context(overwrite=overwrite)._update_translations()
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 914, in _update_translations
self.env['ir.translation']._load_module_terms(mod_names, filter_lang)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_translation.py", line 807, in _load_module_terms
res_lang.load_lang(lang)
File "/home/odoo/src/odoo/odoo/addons/base/models/res_lang.py", line 97, in load_lang
language.write({'active': True})
File "/home/odoo/src/odoo/odoo/addons/base/models/res_lang.py", line 252, in write
self.flush()
File "/home/odoo/src/odoo/odoo/models.py", line 5529, in flush
self.recompute()
File "/home/odoo/src/odoo/odoo/models.py", line 5971, in recompute
process(field)
File "/home/odoo/src/odoo/odoo/models.py", line 5955, in process
recs.mapped(field.name)
File "/home/odoo/src/odoo/odoo/models.py", line 5337, in mapped
recs = recs._mapped_func(operator.itemgetter(name))
File "/home/odoo/src/odoo/odoo/models.py", line 5296, in _mapped_func
vals = [func(rec) for rec in self]
File "/home/odoo/src/odoo/odoo/models.py", line 5296, in
vals = [func(rec) for rec in self]
File "/home/odoo/src/odoo/odoo/models.py", line 5761, in getitem
return self._fields[key].get(self, type(self))
File "/home/odoo/src/odoo/odoo/fields.py", line 1033, in get
self.compute_value(recs)
File "/home/odoo/src/odoo/odoo/fields.py", line 1147, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/odoo/models.py", line 4018, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/user/account_invoice_margin/models/account_invoice.py", line 85, in _compute_margin
or any(line.sale_line_ids.mapped("is_downpayment"))
AttributeError: 'account.move.line' object has no attribute 'sale_line_ids'