user2379186
user2379186

Reputation: 431

Odoo Show mobile on customer search

Using Odoo 10 - When creating a Sales Order or Invoice. When you search a customer it only shows the customer name. The problem is if you have two customers who's name is John Smith how do you know which one to select. If it could show mobile number also this would solve that problem.

enter image description here

Not sure where to edit code to show mobile number

Upvotes: 1

Views: 248

Answers (2)

Pawan Kumar Sharma
Pawan Kumar Sharma

Reputation: 1168

you can add your custom field(Char). Where you can concrete customer name and mobile no. After that you make this custom field rec_name by name_get method. This will help you.

Upvotes: 0

Om Prakash Maurya
Om Prakash Maurya

Reputation: 115

You can modify override name_get function to get this result.

@api.multi
@api.depends('name', 'phone')
def name_get(self):
    result = []
    for customer in self:
        name = customer.name + ' ' + customer.phone
        result.append((customer.id, name))
    return result

Upvotes: 2

Related Questions