تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3329 أدوات العرض

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?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
سبتمبر 24
1387
0
ديسمبر 23
1332
0
أكتوبر 21
2923
1
يوليو 21
3693
2
ديسمبر 19
5197