Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
4296 Visninger

Hi, Can someone help me please?

I have two models created:

Model A: Loan

           payments_id = fields.One2Many('loan.payments', 'loan_id', 'Payments')

Model B: Loan Payments

            loan_id = fields.Many2One('loan', 'Loan')


Loan Description: XXXYYYZZZ

Loan Amount = 400.000

Description

Capitalization
(First row is equal to LOAN AMOUNT)

Principal
Interest

Payment
(Principal + interest)

Next Amount
( Capitalization - Principal )

1
400.000
20.000
20
20.020
380.000
2
380.000
20.000
20
20.020
360.000
3
360.000
20.000
20
20.02
340.000
I have a problem, how can I get the value 'Next Amount Capitalization' and store it in the next row or record of the one2many field? Thank you



Avatar
Kassér
Bedste svar

Use onchange function on that one2many (payments_id)  field . It will definitely work.

Avatar
Kassér
Bedste svar

I think onchange is not work.

Instead of creating one2many by using add an item, keep a button on header.

onclick this button create one2many lines.

I hope your problem will solve with this.


Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
jan. 25
1880
2
sep. 22
9624
2
apr. 22
4673
0
jul. 21
7307
1
mar. 21
5047