Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: ITA - Ricevute bancarie

Entity: account.move

Compute Method: _compute_open_amount

Inputs Method Outputs
today = fields.Date.today()
for invoice in self:
            if invoice.is_riba_payment:
                open_amount_line_ids = invoice.line_ids.filtered(
                    lambda line, today=today: line.riba
                    and line.display_type == "payment_term"
                    and line.date_maturity > today
                )
                invoice.open_amount = sum(open_amount_line_ids.mapped("balance"))
            else:
                invoice.open_amount = 0.0

Back to entity