We have a request to override partner_id display in move line to show a combination of 2 fields.
We overrided name_get() funtion in the inherited res.partner class, when user open the Many2One field on screen it is showing the combination of fields (function is reached using debugger). However, after selecting a partner and saving, system is showing the old partner_id name as a display and name_get() funtion is not reached using debugger. NB: Works properly with other fields and models.
def name_get(self):
return [(acc.id, '{} - {}'.format(acc.custom_field, acc.name) if acc.name else acc.custom_field)
for acc in self]