[FIX] base: avoid traceback on params field of client action
The content of these fields can't be updated, there's no reason to even show them. Just remove them from the default / auto-generated view for client actions. Task 1772242 closes odoo/odoo#29179 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
committed by
Xavier Morel
parent
f435c65517
commit
ef7ae9ae14
@@ -1181,3 +1181,11 @@ class IrActionsActClient(models.Model):
|
||||
for record in self:
|
||||
params = record.params
|
||||
record.params_store = repr(params) if isinstance(params, dict) else params
|
||||
|
||||
def _get_default_form_view(self):
|
||||
doc = super(IrActionsActClient, self)._get_default_form_view()
|
||||
params = doc.find(".//field[@name='params']")
|
||||
params.getparent().remove(params)
|
||||
params_store = doc.find(".//field[@name='params_store']")
|
||||
params_store.getparent().remove(params_store)
|
||||
return doc
|
||||
|
||||
Reference in New Issue
Block a user