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

Hello,


In a view, i added a many2one linked to the model sign.request.


In sign.request, there is the field state with values : sent, signed and canceled

As i just want to see sign.request signed, i added a domain on my many2one and it works perfectly.

My problem is, if the user click on "search more" option in the m2o, the search view by default display every sign.request and not only the signed ones.

I know that i can override the view to add filter by default but i want this default filter only on this view from my m2o, not from tree view for example!


What is the best way to do that ?

อวตาร
ละทิ้ง

you can override "search_read" method and pass context to identify your m2o.

ผู้เขียน คำตอบที่ดีที่สุด

Thank you for your answer CandidRoot.

Do you have an example of how to do that ?

อวตาร
ละทิ้ง