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

I declared a  computed field:

'member_still_pay': fields.float(compute='_get_total', type='float', string='Still to pay')
@api.multi
def _get_total(self):
temp = 0.0
for rec in self:
temp = sum(line.payment_amount for line in rec.member_payments)
rec.member_still_pay = rec.member_cotisation - temp

The problem is I don't have the good value in member_still_pay. The field payment_amount is a one2many. Somebody know what is false?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 24
1201
0
thg 12 23
1207
0
thg 10 21
2805
1
thg 7 21
3521
2
thg 12 19
5089