Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7109 มุมมอง

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)

อวตาร
ละทิ้ง

Search and Display Multiple Fields on Product Many2one (Quotation, SO, PO MO etc) Field
This module allows you to search and display multiple fields in the Product Many2one field across all Odoo screens - such as quotations, sale orders, purchase orders, invoices, and more.
https://apps.odoo.com/apps/modules/17.0/mh_products_search_and_display_multiple_field

ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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 


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 20
3349
2
ก.ค. 23
8531
1
เม.ย. 25
4000
0
ม.ค. 21
3020
1
ก.พ. 24
1468