Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3325 Widoki

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?

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 24
1382
0
gru 23
1321
0
paź 21
2922
1
lip 21
3688
2
gru 19
5196