[FIX] payment: _inverse_journal_id behaviour when missing a payment_method
When computing the inverse of `journal_id` on a batch of `payment.acquirer`, a payment method is created if there isn't any. As this process can only be done for one acquirer at a time, we must populate the data accordingly. closes odoo/odoo#74668 X-original-commit: 493b1ca54d6831f044726b2d8942e7e7f7ce3098 Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -184,8 +184,8 @@ class PaymentAcquirer(models.Model):
|
||||
if acquirer.journal_id:
|
||||
if not payment_method:
|
||||
self.env['account.payment.method.line'].create({
|
||||
'payment_method_id': self._get_default_payment_method(),
|
||||
'journal_id': self.journal_id.id,
|
||||
'payment_method_id': acquirer._get_default_payment_method(),
|
||||
'journal_id': acquirer.journal_id.id,
|
||||
})
|
||||
else:
|
||||
payment_method.journal_id = acquirer.journal_id
|
||||
|
||||
Reference in New Issue
Block a user