From b01a190a9739eb84b216bfd02eb8b2cd47ad2d44 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 13 Jan 2022 13:23:12 +0000 Subject: [PATCH] [FIX] base: incorrect UserError initialisation Apparently a migration error in 0fd773a486fbc1aeef7f00ec5eab3eaf0e4c6a9d, probably never noticed because nobody ever tries to copy config objects since there's a bespoke widget, and it's specifically forbidden. Also fix the signature of the method itself to match the normal one. closes odoo/odoo#82711 Signed-off-by: Xavier Morel (xmo) --- 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 a4f1cb2b488..83d46de23a1 100644 --- a/odoo/addons/base/models/res_config.py +++ b/odoo/addons/base/models/res_config.py @@ -384,8 +384,8 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin) or super()._valid_field_parameter(field, name) ) - def copy(self, values): - raise UserError(_("Cannot duplicate configuration!"), "") + def copy(self, default=None): + raise UserError(_("Cannot duplicate configuration!")) @api.model def fields_view_get(self, view_id=None, view_type='form',