diff --git a/models/account_payment.py b/models/account_payment.py index 3ad8e66..3e4af16 100644 --- a/models/account_payment.py +++ b/models/account_payment.py @@ -13,7 +13,7 @@ class AccountPayment(models.Model): help="Account used for expense instead of the default payable/receivable account" ) - @api.depends('journal_id', 'partner_id', 'partner_type', 'is_internal_transfer', 'destination_journal_id', 'expense_account_id') + @api.depends('journal_id', 'partner_id', 'partner_type', 'payment_type', 'expense_account_id') def _compute_destination_account_id(self): ''' Override to use expense account if defined ''' super()._compute_destination_account_id() diff --git a/models/account_payment_register.py b/models/account_payment_register.py index bf4694b..2fcf95c 100644 --- a/models/account_payment_register.py +++ b/models/account_payment_register.py @@ -13,7 +13,7 @@ class AccountPaymentRegister(models.TransientModel): help="Account used for expense instead of the default payable/receivable account" ) - @api.depends('journal_id', 'partner_type', 'is_internal_transfer', 'destination_journal_id', 'expense_account_id') + @api.depends('journal_id', 'partner_type', 'payment_type', 'expense_account_id') def _compute_destination_account_id(self): ''' Override to use expense account if defined ''' super()._compute_destination_account_id() diff --git a/views/account_batch_payment_views.xml b/views/account_batch_payment_views.xml index 03b5cfd..ac34e3a 100644 --- a/views/account_batch_payment_views.xml +++ b/views/account_batch_payment_views.xml @@ -8,14 +8,14 @@ - + - +