Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1947 Lượt xem

Ive encountered a situation where after a save of a record, a stored computed field is calculated wrong. this occurs when the record has already been created before. i logged the write call.

amount_cost center is a total of all cost_center_lines as a stored computed field.

{'amount_cost_center': 570, 'cost_center_line': [[1, 196, {'percentage': 100, 'amount': 570}], [2, 197, False]]}

the line above is all right. the problem is, i have a constraint that the amount_cost_center must match the orders total wich fires right after the logged write call.

this constraint is given a wrongly calculated amount_cost_center. the wrong value contains the cost_center_line with id 197 which has been deleted.


ps: i am on odoo 13


edit: could this possibly be fixed by PR #42560 ?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 24
1193
1
thg 7 24
1987
1
thg 3 22
4780
1
thg 6 21
3154
0
thg 5 20
2394