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

Module: Invoicing

Entity: account.payment

Compute Method: _compute_partner_bank_id

Inputs Method Outputs
''' The default partner_bank_id will be the first available on the partner. '''
for pay in self:
            # Avoid overwriting existing value
            if pay.partner_bank_id and pay.partner_bank_id in pay.available_partner_bank_ids:
                continue
            pay.partner_bank_id = pay.available_partner_bank_ids[:1]._origin

Back to entity