diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index d11e6815353a4..8fe0372f7e78f 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -361,6 +361,12 @@ def _compute_destination_account_id(self): self.destination_account_id = self.partner_id.property_account_receivable_id.id else: self.destination_account_id = self.partner_id.property_account_payable_id.id + elif self.partner_type == 'customer': + default_account = self.env['ir.property'].get('property_account_receivable_id', 'res.partner') + self.destination_account_id = default_account.id + elif self.partner_type == 'supplier': + default_account = self.env['ir.property'].get('property_account_payable_id', 'res.partner') + self.destination_account_id = default_account.id @api.onchange('partner_type') def _onchange_partner_type(self):