Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Done by RHT on the 03/01/2024
- # Task : https://www.odoo.com/odoo/project/17172/tasks/4269898
- # Pastebin : https://pastebin.com/Knu5DsAv
- # Need : Know how much was already paid off in the loan (in previous program and in Odoo)
- for loan in self:
- invoices = loan.invoice_ids.filtered(lambda inv: inv.state == 'posted')
- paid = 0
- for invoice in invoices:
- paid += invoice.amount_total
- loan['x_studio_paid_amount'] = paid + loan.x_studio_loanpro_paid_amount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement