I've added a custom field called organization_no to the 'res.partner' model. Now I want to search res.partner records with the newly created organization_no, in many2one fields(example the partner_id in sale order form).
I've tried _rec_name = 'organization_name'. But this doesn't seem to work. Is this even possible? Any ideas?
class ResPartner(models.Model):
_inherit = 'res.partner'
_rec_name = 'organization_no'
organization_no = fields.Char(string="Organization No")
How to search many2one field by other than "name" field: http://learnopenerp.blogspot.com/2017/03/how-to-search-many2one-field-by-other.html