+
diff --git a/openerp/addons/base/res/res_security.xml b/openerp/addons/base/res/res_security.xml
index 6a2bf52d21b..f02abd90985 100644
--- a/openerp/addons/base/res/res_security.xml
+++ b/openerp/addons/base/res/res_security.xml
@@ -2,7 +2,7 @@
-
+
Partner Manager
diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py
index c5e872690b6..6ed6e7cc74c 100644
--- a/openerp/addons/base/res/res_users.py
+++ b/openerp/addons/base/res/res_users.py
@@ -96,22 +96,6 @@ class groups(osv.osv):
self.pool.get('ir.model.access').call_cache_clearing_methods(cr)
return res
- def create(self, cr, uid, vals, context=None):
- if 'name' in vals:
- if vals['name'].startswith('-'):
- raise osv.except_osv(_('Error'),
- _('The name of the group can not start with "-"'))
- gid = super(groups, self).create(cr, uid, vals, context=context)
- if context and context.get('noadmin', False):
- pass
- else:
- # assign this new group to user_root
- user_obj = self.pool.get('res.users')
- aid = user_obj.browse(cr, 1, user_obj._get_admin_id(cr))
- if aid:
- aid.write({'groups_id': [(4, gid)]})
- return gid
-
def get_extended_interface_group(self, cr, uid, context=None):
data_obj = self.pool.get('ir.model.data')
extended_group_data_id = data_obj._get_id(cr, uid, 'base', 'group_extended')
@@ -391,7 +375,7 @@ class users(osv.osv):
}
# User can write to a few of her own fields (but not her groups for example)
- SELF_WRITEABLE_FIELDS = ['menu_tips','view', 'password', 'signature', 'action_id', 'company_id', 'user_email', 'name']
+ SELF_WRITEABLE_FIELDS = ['menu_tips','view', 'password', 'signature', 'action_id', 'company_id', 'user_email', 'name', 'avatar', 'avatar_big']
def write(self, cr, uid, ids, values, context=None):
if not hasattr(ids, '__iter__'):
@@ -770,22 +754,23 @@ class groups_view(osv.osv):
# and introduces the reified group fields
view = self.get_user_groups_view(cr, uid, context)
if view:
-
xml1, xml2 = [], []
xml1.append(E.separator(string=_('Application'), colspan="4"))
for app, kind, gs in self.get_groups_by_application(cr, uid, context):
+ # hide groups in category 'Hidden' (except to group_no_one)
+ attrs = {'groups': 'base.group_no_one'} if app and app.xml_id == 'base.module_category_hidden' else {}
if kind == 'selection':
# application name with a selection field
field_name = name_selection_groups(map(int, gs))
- xml1.append(E.field(name=field_name))
+ xml1.append(E.field(name=field_name, **attrs))
xml1.append(E.newline())
else:
# application separator with boolean fields
app_name = app and app.name or _('Other')
- xml2.append(E.separator(string=app_name, colspan="4"))
+ xml2.append(E.separator(string=app_name, colspan="4", **attrs))
for g in gs:
field_name = name_boolean_group(g.id)
- xml2.append(E.field(name=field_name))
+ xml2.append(E.field(name=field_name, **attrs))
xml = E.field(*(xml1 + xml2), name="groups_id", position="replace")
xml.addprevious(etree.Comment("GENERATED AUTOMATICALLY BY GROUPS"))
diff --git a/openerp/addons/base/security/base_security.xml b/openerp/addons/base/security/base_security.xml
index b41f87c72da..3b0194922ca 100644
--- a/openerp/addons/base/security/base_security.xml
+++ b/openerp/addons/base/security/base_security.xml
@@ -12,28 +12,30 @@
Configuration
+
Employee
+
-
+
Multi Companies
-
+
Extended View
-
+
Technical Features
-
+
User
-
+
Manager
diff --git a/openerp/addons/base/security/ir.model.access.csv b/openerp/addons/base/security/ir.model.access.csv
index 69f833f591c..ac05b726341 100644
--- a/openerp/addons/base/security/ir.model.access.csv
+++ b/openerp/addons/base/security/ir.model.access.csv
@@ -122,3 +122,5 @@
"access_ir_actions_todo_category","ir_actions_todo_category","model_ir_actions_todo_category","group_system",1,1,1,1
"access_ir_actions_client","ir_actions_client all","model_ir_actions_client",,1,0,0,0
"access_ir_needaction_users","ir_needaction_users","model_ir_needaction_users",,1,1,1,1
+"access_ir_needaction_mixin","ir_needaction_mixin","model_ir_needaction_mixin",,1,1,1,1
+
diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py
index 759e0d2cd0c..313c96a9fb4 100644
--- a/openerp/osv/orm.py
+++ b/openerp/osv/orm.py
@@ -1651,7 +1651,7 @@ class BaseModel(object):
children = False
views = {}
for f in node:
- if f.tag in ('form', 'tree', 'graph'):
+ if f.tag in ('form', 'tree', 'graph', 'kanban'):
node.remove(f)
ctx = context.copy()
ctx['base_model_name'] = self._name
@@ -4885,14 +4885,14 @@ class BaseModel(object):
if hasattr(self, 'needaction_get_record_ids'):
ids = self.needaction_get_record_ids(cr, uid, user_id, limit=8192, context=context)
if not ids:
- return (True, 0, [])
+ return [True, 0, []]
if domain:
- new_domain = eval(domain) + [('id', 'in', ids)]
+ new_domain = eval(domain, locals_dict={'uid': user_id}) + [('id', 'in', ids)]
else:
new_domain = [('id', 'in', ids)]
- return (True, self.search(cr, uid, new_domain, limit=limit, order=order, count=True, context=context), ids)
+ return [True, self.search(cr, uid, new_domain, limit=limit, order=order, count=True, context=context), ids]
else:
- return (False, 0, [])
+ return [False, 0, []]
# Transience
def is_transient(self):