Hello to all Odoo Developers!
I am currently trying to migrate a addon from Odoo 13 to 15. My addon worked fine in Odoo 13 so I am trying to understand which changes were made in Odoo 15 to upgrade my module.
First error I got was the following:
Field selection_mobile_tablet referenced in related field definition devices.inuse.selection_mobile_tablet does not exist.
for the code:
devices_in_use_ids = fields.One2many(
'devices.inuse', 'contacts_addon_class_id', string="Secure APPS Versions")
class DevicesInUse(models.Model):
_name = 'devices.inuse'
_rec_name = 'devices_in_use'
contacts_addon_class_id = fields.Many2one(
'res.partner', string="Contacts Class")
devices_in_use = fields.Many2one(
'device.setup', string="Devices In Use", tracking=1)
selection_mobile_tablet = fields.Selection(
related='devices_in_use.selection_mobile_tablet', string="Mobile / Tablet", tracking=1)
It seems that the Selection field is not working, has anyone made this experience in Odoo 15 and figured that out ?
Thanks.
UPDATE:
I commentend the above mentioned code out in the hope that It would take me any further but now I get an error which I understand even less.But maybe someone can help with that one:
psycopg2.errors.InvalidTableDefinition: column "id" is in a primary key