[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) <dle@odoo.com>
This commit is contained in:
Pedro M. Baeza
2022-10-21 16:15:03 +02:00
parent be7e487dfd
commit 205ec645f0
+2 -2
View File
@@ -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: