[FIX] unlink take the context in parameter

lp bug: https://launchpad.net/bugs/319172 fixed

bzr revid: christophe@tinyerp.com-20090121111956-nu8qi42x2d8xlcbv
This commit is contained in:
Christophe Simonis 2009-01-21 12:19:56 +01:00
parent fee97685ea
commit cef5c76514
1 changed files with 2 additions and 2 deletions

View File

@ -170,10 +170,10 @@ class users(osv.osv):
self.pool.get('ir.rule').domain_get.clear_cache(cr.dbname)
return res
def unlink(self, cr, uid, ids):
def unlink(self, cr, uid, ids, context=None):
if 1 in ids:
raise osv.except_osv(_('Can not remove root user!'), _('You can not remove the admin user as it is used internally for resources created by OpenERP (updates, module installation, ...)'))
return super(users, self).unlink(cr, uid, ids)
return super(users, self).unlink(cr, uid, ids, context=context)
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=80):
if not args: