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

Is it possible to filter to one2many field using a button?


I have a partner field which is one2many
 I have customer and vendors there,

I want that when I click the customers button ,

it will display the customers only and when the button is the vendors button, only the vendors.


Thanks in advance

아바타
취소

Hi Deb Joy,

your res.partner is a One2many or Many2one?

작성자

it's Many2one

베스트 답변

Hi Deb Joy,

For this you should create 2 O2m fields of the partner with domain (customer = True and supplier = True) and also create 2 boolean fields (show_vendor, show_customer) which will be changed from the button click.

Now, add attrs on both the O2m fields. If you click on Vendor button, the show_vendor boolean should be checkd and show_customer should be set to False and based on attrs you vendor O2m field will be visible. Same goes for Customer button.


아바타
취소
관련 게시물 답글 화면 활동
1
6월 22
13466
1
7월 15
4692
1
1월 24
1975
1
8월 23
23547
1
4월 22
1913