python - How to get current ID record in a domain field in OpenERP7? -
simple openerp7 question:
i adding new field model. field many2one. going show every active partner has specific parent_id: parent_id must id of current record. how can this?
here, 1 of failed attempts. should this:
'main_contact_id': fields.many2one('res.partner', 'main contact', domain=[('active','=',true), ('parent_id','=',self.id)]),
you can't in model definition there no concept of id of current record (this model definition after all, not instance of record). should add together domain on field in form , should able utilize id memory. domains in model can utilize static info such active = true.
python openerp openerp-7
No comments:
Post a Comment