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

I used to use store triggers in OpenERP 7 to make the function and related fields searchable, filterable and groupable: https://doc.odoo.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/#store-parameter

but with Odoo v8.0 I see there's nothing like store trigger to store the values in database: https://github.com/odoo/odoo/issues/4628 .. the store parameter now accepts only Boolean, it doesn't accept dict anymore.

So I have used the search function to make the field searchable and filterable. but I still cannot make it groupable and `store=True` may make it store old data without updating it!

Is there any way better to make computed/related field updated and groupable in the same time? or is `store=True` enough?

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

Use store=true to allow searching and grouping on a field. The triggers of v7 are replaced by @depends decorator on the compute method in v8. Example: @depends('order_lines.product_qty') def compute_total(self): ...

อวตาร
ละทิ้ง

That sounds great, this means whenever the dependent field value will be change it will be directly store in database.

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

thanks for the awesome information.

https://ometv.onl/ https://chatroulette.top/ https://omegle.wtf/ https://bazoocam.cam/

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 24
1668
0
ธ.ค. 19
3345
1
ต.ค. 15
3600
2
เม.ย. 18
12565
1
เม.ย. 17
3511