[MERGE] merged branch from aag with user's preferences config wizard

bzr revid: qdp-launchpad@openerp.com-20110527131142-i4marv3urjh2yjwl
This commit is contained in:
Quentin (OpenERP) 2011-05-27 15:11:42 +02:00
commit 4060d1d3fa
1 changed files with 3 additions and 0 deletions

View File

@ -231,7 +231,10 @@ class user_preferences_config(osv.osv_memory):
return res
def execute(self, cr, uid, ids, context=None):
user_obj = self.pool.get('res.users')
user_ids = user_obj.search(cr, uid, [], context=context)
for o in self.browse(cr, uid, ids, context=context):
user_obj.write(cr , uid, user_ids ,{'context_tz' : o.context_tz, 'context_lang' : o.context_lang, 'view' : o.view, 'menu_tips' : o.menu_tips}, context=context)
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'context_tz', ['res.users'], o.context_tz)
ir_values_obj.set(cr, uid, 'default', False, 'context_lang', ['res.users'], o.context_lang)