[FIX] base: avoid generating invalid user group view
When no `base.module_category_user_type` Application is found, the group
view was generated with the domain `[('', '!=', <int>)]`, which is will
fail view validation.
This situation happen during database migration or if the module category
is deleted.
This commit is contained in:
@@ -885,7 +885,10 @@ class GroupsView(models.Model):
|
|||||||
xml3.append(E.field(name=field_name, **attrs))
|
xml3.append(E.field(name=field_name, **attrs))
|
||||||
|
|
||||||
xml3.append({'class': "o_label_nowrap"})
|
xml3.append({'class': "o_label_nowrap"})
|
||||||
user_type_attrs = {'invisible': [(user_type_field_name, '!=', group_employee.id)]}
|
if user_type_field_name:
|
||||||
|
user_type_attrs = {'invisible': [(user_type_field_name, '!=', group_employee.id)]}
|
||||||
|
else:
|
||||||
|
user_type_attrs = {}
|
||||||
|
|
||||||
xml = E.field(
|
xml = E.field(
|
||||||
E.group(*(xml1), col="2"),
|
E.group(*(xml1), col="2"),
|
||||||
|
|||||||
Reference in New Issue
Block a user