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

Hi everyone, 
I have a Many2one field, and when we select "Search More..", a list view opens for this field. Is it possible to directly open the list view for this Many2one field instead of choosing "Search More.."?

아바타
취소

Hi Katiyar Rustam,

Odoo does not provide the functionality to directly open the list view for a Many2one field without first selecting "Search More...". To achieve this, you would need to implement a custom solution, such as creating a custom widget or overriding existing behavior.

What do you want to achieve with a list view? When you select "Search More...", it also opens a list view in a popup. So what is your main requirement to directly open a tree view?

작성자

Hello Sudhir Arya,
when I click on the M2O fields, it will open a list view.

베스트 답변

Yes, it is possible to directly open the list view for a Many2one field, but it requires creating a custom widget that alters the default behavior. By doing so, you can override the default functionality of theMany2one field, allowing it to open the list view directly when clicked, instead of requiring the user to select "Search More."

This custom widget would need to extend the existing Many2one widget in JavaScript and add functionality to automatically trigger the list view action upon interacting with the field.

아바타
취소
작성자

How do I create a custom widget? Are there any examples available?

You can explore existing Many2one widgets at Odoo Apps - https://apps.odoo.com/apps/modules/browse?search=many2one

By reviewing these pre-built widgets, you'll gain a better understanding of how to create a custom widget. You can then apply the necessary logic to open the list view directly.

관련 게시물 답글 화면 활동
0
3월 15
3606
3
2월 25
35379
2
2월 25
8554
3
7월 24
24566
0
4월 16
3064