diff --git a/bin/addons/base/base_security.xml b/bin/addons/base/base_security.xml index 54547bdb8fb..b2b9123a109 100644 --- a/bin/addons/base/base_security.xml +++ b/bin/addons/base/base_security.xml @@ -14,11 +14,11 @@ Define password for Root user - ir.model.security + ir.model.config form
@@ -36,7 +36,7 @@ Define password for Root user ir.actions.act_window - ir.model.security + ir.model.config form new @@ -44,13 +44,13 @@ Define password for Root user - You must define a password for the root user ! + You must define a new password for the Root user ! open ERP Manager @@ -67,11 +67,99 @@ Partner Manager + + + Request + Extended View + + + + + + + + + + + + system + + + + system + + + + system + + + + system + + + + system + + + + system + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + + + base + + @@ -285,7 +373,15 @@ - + + Internal Request + + + + + + + diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 0f2e8ec2b08..05f4ed59491 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -620,7 +620,7 @@ - + @@ -673,7 +673,7 @@ - + diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index 991550602cd..21c81e210f1 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -36,21 +36,10 @@ import time import tools import pooler -from pprint import pprint #FIXME: Dev - def _get_fields_type(self, cr, uid, context=None): cr.execute('select distinct ttype,ttype from ir_model_fields') return cr.fetchall() - -#class ir_model_type(osv.osv): -# _name = 'ir.model.type' -# _columns = { -# 'name': fields.char('Name', size=64, required=True), -# 'model_id': fields.one2many('ir.model', 'type_id', 'Models'), -# } -#ir_model_type() - class ir_model(osv.osv): _name = 'ir.model' _description = "Objects" @@ -60,8 +49,7 @@ class ir_model(osv.osv): 'model': fields.char('Object Name', size=64, required=True, search=1), 'info': fields.text('Information'), 'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True), - #'type_id': fields.many2one('ir.model.type', 'Type'), - 'type_id': fields.selection([('system','System'),('base','Base'),('addons','Addons')],'Type'), + 'type': fields.selection([('system','System'),('base','Base'),('addons','Addons')],'Type'), 'state': fields.selection([('manual','Custom Object'),('base','Base Field')],'Manualy Created',readonly=1), } _defaults = { @@ -104,7 +92,7 @@ class ir_model(osv.osv): return res def create(self, cr, user, vals, context=None): - if 'advanced' in context: + if context and 'advanced' in context: raise osv.except_osv('Error !', 'You cannot add an entry to this view !') else: if context.get('manual',False): @@ -116,7 +104,7 @@ class ir_model(osv.osv): def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): result = super(osv.osv, self).read(cr, user, ids, fields, context, load) - if 'advanced' in context: + if context and 'advanced' in context: for res in result: rules = self.pool.get('ir.model.access').search(cr, user, [('model_id', '=', res['id'])]) rules_br = self.pool.get('ir.model.access').browse(cr, user, rules) @@ -136,7 +124,7 @@ class ir_model(osv.osv): def write(self, cr, user, ids, vals, context=None): vals_new = vals.copy() - if 'advanced' in context: + if context and 'advanced' in context: perms_rel = ['create','read','unlink','write'] perms_all = ['c','r','u','w'] perms = [] @@ -194,8 +182,8 @@ class ir_model(osv.osv): groups = self.pool.get('res.groups').search(cr, uid, []) groups_br = self.pool.get('res.groups').browse(cr, uid, groups) - cols = ['model'] - xml = '''''' + cols = ['model', 'type'] + xml = '''''' for group in groups_br: xml += '''''' % (group.id, group.name) xml += '''''' @@ -526,10 +514,8 @@ class ir_model_data(osv.osv): return True ir_model_data() - - -class ir_model_security(osv.osv): - _name = 'ir.model.security' +class ir_model_config(osv.osv): + _name = 'ir.model.config' _columns = { 'password': fields.char('Password', size=64, invisible=True), } @@ -544,7 +530,6 @@ class ir_model_security(osv.osv): } def action_update_pw(self, cr, uid, ids, context={}): - from pprint import pprint res = self.read(cr,uid,ids)[0] root = self.pool.get('res.users').browse(cr, uid, [1])[0] self.unlink(cr, uid, [res['id']]) @@ -556,5 +541,4 @@ class ir_model_security(osv.osv): 'type': 'ir.actions.act_window', 'target':'new', } -ir_model_security() - +ir_model_config()