콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
5 답글
14899 화면

Hi, I am using odoo11.

I have two models. The first model inherits from res.partner and has a custom field "code". The other model is a new one built from scratch (let's call it model_X), and has a many2one field referring to res.partner.

By default, in my form view for model_X, the dropdown related to the many2one field displays the description of the partner. I would like the "code" field to be displayed instead.

Is that possible? Thank you as always.

Daniele

아바타
취소

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

베스트 답변

use the name_get() method to display code

아바타
취소
작성자

Thanks for the answer, this actually works, but then every occurrence of res.partner's name is going to change everywhere. Is there a way to obtain the same result only in that specific dropdown many2one field? Thanks

작성자

Well i guess that the following thread offers a possible solution to what i was looking for... i link it here for reference: https://www.odoo.com/forum/help-1/question/using-name-get-how-to-shows-two-different-display-values-2589

베스트 답변

But i want other column show only in search drop down. When i use name_get, and i save record, field many2one will show all field that i defined in name_get function. 

아바타
취소
관련 게시물 답글 화면 활동
2
6월 20
5713
3
11월 20
11015
2
11월 18
2230
0
11월 18
2092
1
11월 18
5152