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

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.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 22
13383
1
ก.ค. 15
4655
Filter One2many field in res.partner แก้ไขแล้ว
1
ม.ค. 24
1910
1
ส.ค. 23
23487
1
เม.ย. 22
1850