top of page
  • Writer's pictureTek Siong, Hock

Odoo - Concatenate Internal Reference with Partner Name

Due to the legacy migration issue, you may have a separate partner for customer and vendor, with different code (Internal Reference).

So, when user selecting the partner in the dropdown, you want to concatenate the Internal Reference with Partner Name, as below.

You can use the following code, in the res.partner.

def name_get(self):
    res = []
    for field in self:
        if field.ref:
            res.append((, '%s %s' % (field.ref,
            res.append((, '%s %s' % ('',

    return res

51 views0 comments

Recent Posts

See All


bottom of page