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

Hello,

I have override search method and I wanted to filter out sales Order with following Condition. Condition / search criteria :

       [ state ='RESERVED' OR (state ='SHIPPED' AND avail='YES') AND invoiced='YES']

How to give above condition in following search method.?

  <obj_name>.search(cr, uid, [])

what are contents of [ ] ?

อวตาร
ละทิ้ง

What do you mean with avail='YES'? Is this a custom field?

ผู้เขียน

yes avail is custom field having selection type with values YES or NO, but i am confused that how to write OR AND conditions in search method ?

คำตอบที่ดีที่สุด

Vaibhav,

[ state ='RESERVED' OR (state ='SHIPPED' AND avail='YES') AND invoiced='YES']

should be: [(invoiced =Yes),'|',(state=reserved),(state ='SHIPPED'),(avail='YES')]

Thanks.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks...:)

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 22
6304
1
มิ.ย. 19
2522
1
ธ.ค. 18
2714
1
เม.ย. 17
4822
Using search count แก้ไขแล้ว
2
ธ.ค. 23
19991