I am trying to make a module for Odoo and I don't know how to hide a field using python code This line doesn't work for me :
'form_id': fields.many2one('dev.test', 'candidat', select=False,invisible=True),
I want to hide it using python and not using xml because I didn't declare that many2one field in my xml it's just a simple field in my test relation, the field will be created inside the popup to create new "formation".
This is the definition of the field that make the relationship
'test_form_ids': fields.one2many('dev.form', 'form_id','formations'),
test_form_ids one2many field capture
This is my formation class
class dev_form(osv.Model):
_name='dev.form'
_description='rel between test & formations'
_columns = {
'name': fields.many2one('dev.name', 'Formation'),
'form_id': fields.many2one('dev.test', 'candidat', select=False,invisible=True),
}
highlighted the field I want to hide here the popup to create new formation capture