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

Hi, 

I have 3 many2many fields in a form, every field has a list of various items every item can be assigned to a different stage (Installation,  Operation, Development, finished), what I want now is a way to filter the many2many with a button.  

The source for the many2many field is like this:

Id

name

code

stage_id   ---> many2one field from another model, This is the field that I want  to filter 


The filter has to be set until the data is on the screen.  Tried assigned a domain with a button, but I can't make it work:


  result = {
'domain': {
'protocolos_ids': [['stage_id', '=', 1]], # could be 1,2,3,4
},
}
return result 


tried also with a a Many2one field

'protocolos_ids': [['stage_id', '=', stage_id]], //many2on field


But to no avail

Please help.


Thank you

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 20
3560
1
ก.ค. 22
6560
0
ก.พ. 25
18
0
พ.ย. 22
80
1
มิ.ย. 22
7626