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

Module: Payment - Account

Entity: account.move

Compute Method: _compute_amount_paid

Inputs Method Outputs
""" Sum all the transaction amount for which state is in 'authorized' or 'done'
        """
for invoice in self:
            invoice.amount_paid = sum(
                invoice.transaction_ids.filtered(
                    lambda tx: tx.state in ('authorized', 'done')
                ).mapped('amount')
            )

Back to entity