From f5745de88e82f6b50992f2c2999c54bccc12af89 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Mon, 22 Oct 2018 00:28:32 +0000 Subject: [PATCH] publish muk_utils - 12.0 --- muk_utils/models/mixins_groups.py | 5 +++++ muk_utils/views/mixins_groups.xml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/muk_utils/models/mixins_groups.py b/muk_utils/models/mixins_groups.py index 86e0bf6..467f3bf 100644 --- a/muk_utils/models/mixins_groups.py +++ b/muk_utils/models/mixins_groups.py @@ -51,6 +51,7 @@ class Groups(models.AbstractModel): if name not in self._fields: self._add_field(name, field) add('parent_group', fields.Many2one( + _module=self._module, comodel_name=self._name, string='Parent Group', ondelete='cascade', @@ -58,11 +59,13 @@ class Groups(models.AbstractModel): index=True, automatic=True)) add('child_groups', fields.One2many( + _module=self._module, comodel_name=self._name, inverse_name='parent_group', string='Child Groups', automatic=True)) add('groups', fields.Many2many( + _module=self._module, comodel_name='res.groups', relation='%s_groups_rel' % (self._table), column1='gid', @@ -70,6 +73,7 @@ class Groups(models.AbstractModel): string='Groups', automatic=True)) add('explicit_users', fields.Many2many( + _module=self._module, comodel_name='res.users', relation='%s_explicit_users_rel' % (self._table), column1='gid', @@ -77,6 +81,7 @@ class Groups(models.AbstractModel): string='Explicit Users', automatic=True)) add('users', fields.Many2many( + _module=self._module, comodel_name='res.users', relation='%s_users_rel' % (self._table), column1='gid', diff --git a/muk_utils/views/mixins_groups.xml b/muk_utils/views/mixins_groups.xml index 94e33da..54bd963 100644 --- a/muk_utils/views/mixins_groups.xml +++ b/muk_utils/views/mixins_groups.xml @@ -19,7 +19,7 @@ - + muk_utils_mixins_groups.tree muk_utils.mixins.groups @@ -30,7 +30,7 @@ - + muk_utils_mixins_groups.form muk_utils.mixins.groups