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

I want to put a "in" operator filter in search view. Basically an input field which will take values as 12,13,14 (a list) and will return all the records matching that list.

Can anyone help me with this?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi, thanks for getting back. But that's not the solution I am looking for.

List you have provided in domain (i.e ['consu', 'product']) is static. But I need to provide an input field with the filter where user will give this comma separated list.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
If you are looking how to use in operator in filter, see a example here,

<filter string="Products" name="consumable" domain="[('type', 'in', ['consu', 'product'])]" help="Products your store in the inventory"/>


For your case i think it will be better to use ilike



Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 15
11299
2
พ.ย. 23
3047
7
เม.ย. 21
20372
filter with related model field แก้ไขแล้ว
1
ต.ค. 20
4801
change search filter แก้ไขแล้ว
2
พ.ย. 16
4167