Skip to Content
मेन्यू
This question has been flagged

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

Avatar
Discard

Hi Deb Joy,

your res.partner is a One2many or Many2one?

Author

it's Many2one

Best Answer

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.


Avatar
Discard
Related Posts Replies Views Activity
1
जून 22
13374
1
जुल॰ 15
4650
1
जन॰ 24
1897
1
अग॰ 23
23466
1
अप्रैल 22
1836