Hi, I created a custom module in Odoo14 named "piani_formazione" which contains two models named "azienda.py" (defined by _name="piani_formazione.azienda") and "dipendente.py" (defined by _name="piani_formazione.dipendente"). The two models work correctly. Then, I tried adding the following many2one field in the "dipendente.py", to show the azienda (=company, in English) in which every dipendente (=employee, in English) works:
dipendente_azienda = fields.Many2one('piani_formazione.azienda', string="Azienda")
(I've tried even specifying comodel_name='piani_formazione.azienda')
and I added this field (dipendente_azienda) in the form and tree views of dipendente. But if I try to upgrade the module in Odoo, the programme gives back the following error (which I'll translate in English):
"dipendente_azienda" field doesn't exist in the "piani_formazione.dipendente" model