Reputation: 593
I'm trying to add inheritance on existing object in Odoo, which is "portal.mixin" into "repair.order" object.
I tried with this code:
class RepairOrder(models.Model):
_name = 'repair.order'
_inherit = ['portal.mixin']
but I got this error :
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 3114, in _setup_regular_full
invf = comodel._fields[self.inverse_name]
KeyError: 'invoice_id' - - -
Any help please ?
Thanks.
Upvotes: 4
Views: 318
Reputation: 14801
If repair.order
is an existing model - not a new one - add it to the _inherit
like ['repair.order', 'portal.mixin']
or you will lose all fields of the original model.
Upvotes: 3