From 205ec645f0cb75b2c9971cd2b51ebeb76f5ab098 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 20 Oct 2022 19:28:08 +0000 Subject: [PATCH] [FIX] base: config fields_get arg name mismatch The arguments for the method `fields_get` are `allfields` and `attributes`, but this model is overriding it with different name, provoking the error: TypeError: fields_get() got an unexpected keyword argument 'allfields' This commits fixes it renamign the argument to the correct one. TT40013 closes odoo/odoo#103771 X-original-commit: 3884136b73b1efe4de6a28b9447a72a5d257666c Signed-off-by: Denis Ledoux (dle) --- odoo/addons/base/models/res_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/addons/base/models/res_config.py b/odoo/addons/base/models/res_config.py index 4d60d050dbc..d1c2adac512 100644 --- a/odoo/addons/base/models/res_config.py +++ b/odoo/addons/base/models/res_config.py @@ -284,12 +284,12 @@ class ResConfigInstaller(models.TransientModel, ResConfigModuleInstallationMixin return dict(defaults, **dict.fromkeys(self.already_installed(), True)) @api.model - def fields_get(self, fields=None, attributes=None): + def fields_get(self, allfields=None, attributes=None): """ If an addon is already installed, set it to readonly as res.config.installer doesn't handle uninstallations of already installed addons """ - fields = super(ResConfigInstaller, self).fields_get(fields, attributes=attributes) + fields = super().fields_get(allfields=allfields, attributes=attributes) for name in self.already_installed(): if name not in fields: