[FIX] account: fix payment account domain
The payment account should either be of type `asset_current` or `liability_current`, but now only `asset_current` type is allowed. `liability_current` should also be in the payment account domain. task-3145725 closes odoo/odoo#110846 X-original-commit: d29268c397c900774313d6069790073551458546 Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
@@ -109,8 +109,7 @@ class AccountPaymentMethodLine(models.Model):
|
||||
ondelete='restrict',
|
||||
domain="[('deprecated', '=', False), "
|
||||
"('company_id', '=', company_id), "
|
||||
"('account_type', 'not in', ('asset_receivable', 'liability_payable')), "
|
||||
"'|', ('account_type', '=', 'asset_current'), ('id', '=', parent.default_account_id)]"
|
||||
"'|', ('account_type', 'in', ('asset_current', 'liability_current')), ('id', '=', parent.default_account_id)]"
|
||||
)
|
||||
journal_id = fields.Many2one(comodel_name='account.journal', ondelete="cascade")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user