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

I have been working ion a search module in OpenERP-7. The scenario is that I am returning records in domain so that I can show them on my field. The problem here is that the field is not showing the newly created records in the domain. While on printing the value of domain on console, I get the desired records . But I dont seem to get why its not allowing me to view them ion my field. Neither I am getting any error.

My domain part of function is as follows:

res = cr.fetchall()

for p_id,p_name in res:

     domain.append((p_id))

print domain

return {'domain':{'my_products':[('id','in',domain)]}}

 

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

returnig dictionary with 'domain' key works only if it is on_change function.. otherwize you need to refresh / reload the page in order to reload view with new values

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

yes I am using the on_change function. But the values are not being shown on the field. It is Only showing the old values.

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

I think method onchange which return domain doesn't work on field with widget="selection" attribute. Try to remove it.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ต.ค. 16
31246
1
ก.ย. 15
3917
1
มิ.ย. 15
837
0
เม.ย. 15
681
2
เม.ย. 15
858