account_payment_liability/models/res_partner.py

13 lines
511 B
Python

from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
property_account_payable_id = fields.Many2one(
'account.account',
company_dependent=True,
string="Account Payable",
domain="[('account_type', 'in', ('liability_payable', 'liability_current')), ('active', '=', True)]",
help="This account will be used instead of the default one as the payable account for the current partner. Extended to allow Current Liabilities.",
)