I am working on odoo so I had to inherit a module and making some changes on it, so I had to create field that I called chauffeur which is many2one relation with rees.partner
and in my field I have to select only the drivers that have boolean=1.
but it returns to me this error:
The transaction is cancelled, commands are ignored until the end of the transaction block
Can anyone please tell me what is the reason for this error and how to fix it?
my code:
from odoo import models, fields, api
class estChauffeur(models.Model):
_inherit = 'res.partner'
bool_chauffeur = fields.Boolean('EstChauffeur', default=False)
class suiviDesConstats(models.Model):
_name = 'logistique.suivi.constats'
chauffeur_id = fields.Many2one('res.partner', comodelname='res.partner',
domain=[('est_chauffeur','=',True)])
You are using non-existent
est_chauffeurfield, You need to check the Odoo log to get more details about the error.you can try the below code: