From 57f5e060976a1f692b7bd03727f5deb254953c17 Mon Sep 17 00:00:00 2001 From: Camille Morand Date: Thu, 3 Aug 2023 11:16:15 +0200 Subject: [PATCH] [FIX][account_chart_update] Remove account tax browsing since already a recordset todo_dict["account_dict"]["account.tax"].keys() are already records, not just ID, so we can use them directly. Trying to browse causes an error : `psycopg2.ProgrammingError: can't adapt type 'account.tax'`. --- account_chart_update/wizard/wizard_chart_update.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 0e937f35..083b9998 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -1079,7 +1079,7 @@ class WizardUpdateChartsAccounts(models.TransientModel): when the referenced accounts are still not available). """ done = self.env["account.tax"] - for k, v in todo_dict["account_dict"]["account.tax"].items(): + for tax, v in todo_dict["account_dict"]["account.tax"].items(): vals = {} for fld in [ "cash_basis_transition_account_id", @@ -1096,7 +1096,6 @@ class WizardUpdateChartsAccounts(models.TransientModel): % v[fld].id ) if vals: - tax = self.env["account.tax"].browse(k) tax.write(vals) done |= tax