[FIX] base: incorrect UserError initialisation

Apparently a migration error in
0fd773a486, 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) <xmo@odoo.com>
This commit is contained in:
Xavier Morel
2022-01-13 14:35:51 +00:00
parent b532db523d
commit b01a190a97
+2 -2
View File
@@ -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',