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

Hi everyone,


I wonder if there's a way to set the order of executing the compute functions in the same model?


model1:

 - field1

 - field2

 - compute_field1 (stored, compute_func1, depends on field1)

 - compute_field2 (stored, compute_func2, depends on field2)

 - compute_field3 (stored, compute_func3, depends on compute_field1, compute_field2)


For some reason, when field1 and field2 are changes, Odoo launches compute_func1, then compute_func3 and then compute_func2, but doesn't fire compute_func3 again, hence compute_field3 doesn't get the final correct value.

So, how do I tell Odoo the order/priority/sequence of launching compute functions?


PS: I know that the simplest solution would be to combine those functions into one, and I've done that already, however in my case, the setup with 3 functions above would be more optimized in the mean of speed and performance.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 21
3872
1
ก.ค. 21
6866
compute issue แก้ไขแล้ว
1
พ.ค. 21
3699
Sequence title แก้ไขแล้ว
2
ก.ย. 20
3699
0
ก.พ. 16
3755