|
@ -129,19 +129,6 @@ class LoanInterestLine(models.Model): |
|
|
line.write({"loan_due_move": move.id, |
|
|
line.write({"loan_due_move": move.id, |
|
|
"state": "due"}) |
|
|
"state": "due"}) |
|
|
|
|
|
|
|
|
@api.model |
|
|
|
|
|
def _generate_move_line_debt_end_fy(self): |
|
|
|
|
|
fy = self.env["account.fiscal.year"].get_next_fiscal_year() |
|
|
|
|
|
date = fy.date_from - relativedelta(days=1) |
|
|
|
|
|
if fy: |
|
|
|
|
|
interest_lines = self.search([ |
|
|
|
|
|
('due_date', '>=', fy.date_from), |
|
|
|
|
|
('due_date', '<=', fy.date_to), |
|
|
|
|
|
('due_loan_amount', '>', 0), |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
interest_lines.generate_loan_due_fy(date) |
|
|
|
|
|
|
|
|
|
|
|
@api.model |
|
|
@api.model |
|
|
def _generate_payment_move(self): |
|
|
def _generate_payment_move(self): |
|
|
# TODO configure how many days before you want generate the move lines |
|
|
# TODO configure how many days before you want generate the move lines |
|
|