Skip to Content
Menu
This question has been flagged
1 Reply
3834 Views

Here on sale order delivery tab, I want to show the address fields while selecting on delivery address.

For example on sale order when we select customer then on selection we can see company name and contact name (my company,contact name) like this i want show (my company,contact name,contact's address).


How can i show as per this requirement?

Avatar
Discard
Best Answer

Hi,

You can override the name_get function and return a value as your wish.

Try this code. 

class Customer(models.Model):

_inherit = 'res.partner'

@api.multi
def name_get(self):
res = []
for record in self:
name = record.name
if record.street:
name = record.name + "," + record.street
res.append((record.id, name))
return res

Thank you 

Avatar
Discard
Author

Thank You Avinash!!!

Related Posts Replies Views Activity
1
Mar 15
8597
0
Jan 23
707
2
May 22
18048
1
Jan 22
1975
4
Apr 19
11683