[IMP]base:Remove a config view in py
bzr revid: mma@tinyerp.com-20110726105330-qm2ao4s2x4n5l66z
This commit is contained in:
parent
3c2ca3d71c
commit
2a97be835c
|
@ -534,24 +534,4 @@ class groups2(osv.osv): ##FIXME: Is there a reason to inherit this object ?
|
|||
|
||||
groups2()
|
||||
|
||||
class res_config_view(osv.osv_memory):
|
||||
_name = 'res.config.view'
|
||||
_inherit = 'res.config'
|
||||
_columns = {
|
||||
'name':fields.char('Name', size=64),
|
||||
'view': fields.selection([('simple','Simplified'),
|
||||
('extended','Extended')],
|
||||
'Interface', required=True ),
|
||||
}
|
||||
_defaults={
|
||||
'view':lambda self,cr,uid,*args: self.pool.get('res.users').browse(cr, uid, uid).view or 'simple',
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
res = self.read(cr, uid, ids)[0]
|
||||
self.pool.get('res.users').write(cr, uid, [uid],
|
||||
{'view':res['view']}, context=context)
|
||||
|
||||
res_config_view()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue