From 4be998412a15c85348a6acb828241effdbbde0e6 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 13 Dec 2022 10:24:46 +0000 Subject: [PATCH] [FIX] payment: Wrong use of write method on not stored field Steps to reproduce the issue: - Accounting > Configuration > Journals - Click on Journal - View metadata of Journal Bug: Even if no modification has been made to the journal, it marked current time in Latest Modification By/Date opw:3089551 closes odoo/odoo#107875 X-original-commit: 47999e7b1c9a52059f84abaafeac388f2991a621 Signed-off-by: Victor Feyens (vfe) --- addons/account_payment/models/account_journal.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account_payment/models/account_journal.py b/addons/account_payment/models/account_journal.py index ed56e2ed200..bd7f2d43b73 100644 --- a/addons/account_payment/models/account_journal.py +++ b/addons/account_payment/models/account_journal.py @@ -74,6 +74,4 @@ class AccountJournal(models.Model): if vals['mode'] == 'unique' and not available: to_remove.append(payment_method.id) - journal.write({ - 'available_payment_method_ids': [Command.unlink(payment_method) for payment_method in to_remove] - }) + journal.available_payment_method_ids = [Command.unlink(payment_method) for payment_method in to_remove]