Reputation: 431
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.
Not sure where to edit code to show mobile number
Upvotes: 1
Views: 248
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
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