Browse Source

publish muk_utils - 12.0

pull/9/head
MuK IT GmbH 6 years ago
parent
commit
ced6c15fe3
  1. 2
      muk_utils/__manifest__.py
  2. 14
      muk_utils/models/mixins_groups.py

2
muk_utils/__manifest__.py

@ -19,7 +19,7 @@
{
"name": "MuK Utils",
"summary": """Utility Features""",
"version": '12.0.1.4.6',
"version": '12.0.1.4.7',
"category": 'Extra Tools',
"license": "AGPL-3",
"author": "MuK IT",

14
muk_utils/models/mixins_groups.py

@ -96,6 +96,20 @@ class Groups(models.AbstractModel):
('name_uniq', 'unique (name)', 'The name of the group must be unique!')
]
#----------------------------------------------------------
# Functions
#----------------------------------------------------------
@api.model
def default_get(self, fields_list):
res = super(Groups, self).default_get(fields_list)
if not self.env.context.get('groups_no_autojoin'):
if 'explicit_users' in res and res['explicit_users']:
res['explicit_users'] = res['explicit_users'] + [self.env.uid]
else:
res['explicit_users'] = [self.env.uid]
return res
#----------------------------------------------------------
# Read, View
#----------------------------------------------------------

Loading…
Cancel
Save