콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4308 화면

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



아바타
취소
베스트 답변

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

아바타
취소
베스트 답변

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.


아바타
취소
관련 게시물 답글 화면 활동
1
1월 25
1889
2
9월 22
9635
2
4월 22
4682
0
7월 21
7321
1
3월 21
5051