Skip to Content
Menu
This question has been flagged

Hello,


I want to change the display string on the dropdown menu from the backend Many2one field for product.product and res.partner.


I know _rec_name and def name_get works but I don't want to use them.


Because other peoples are creating modules, an overriding display for product.product and res.partner may cause problems on other modules.


I need a solution for change the display string for many2one fields for just one form view.


ex)

product.product

- current: defaultcode, name

- I want: name


res.partner

- current: name, parent_name

- I want: street/street2(name/phone)

Avatar
Discard
Author Best Answer

I found a solution 

I added some keyword in context, inehrited res.partner and overriede get_name function.

now it works fine :) 

https://www.odoo.com/forum/help-1/question/using-name-get-how-to-shows-two-different-display-values-2589

Avatar
Discard
Best Answer

Hi,

can you please elaborate more on how you achieved it? What keyword you added in context? In the inherited model or in view? 
Thanks 


Avatar
Discard
Related Posts Replies Views Activity
1
May 20
2545
2
Jul 23
6973
1
Jul 22
2789
0
Jan 21
2163
1
Feb 24
393