[FIX] ir_model: add index to model
[FIX] ir_model_grid inherith from ir_model [FIX] fix error message when deleting ir_model_grid instance bzr revid: christophe@tinyerp.com-20090123140824-gltcdmqax4qik9pi
This commit is contained in:
parent
83a8db6b97
commit
4e13d9b40a
|
@ -40,10 +40,10 @@ class ir_model(osv.osv):
|
|||
_rec_name = 'name'
|
||||
_columns = {
|
||||
'name': fields.char('Object Name', size=64, translate=True, required=True),
|
||||
'model': fields.char('Object Name', size=64, required=True, search=1),
|
||||
'model': fields.char('Object Name', size=64, required=True, select=1),
|
||||
'info': fields.text('Information'),
|
||||
'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True),
|
||||
'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manualy Created',readonly=1),
|
||||
'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manualy Created',readonly=True),
|
||||
'access_ids': fields.one2many('ir.model.access', 'model_id', 'Access'),
|
||||
}
|
||||
_defaults = {
|
||||
|
@ -94,18 +94,19 @@ ir_model()
|
|||
class ir_model_grid(osv.osv):
|
||||
_name = 'ir.model.grid'
|
||||
_table = 'ir_model'
|
||||
_inherit = 'ir.model'
|
||||
_description = "Objects Security Grid"
|
||||
_rec_name = 'name'
|
||||
_columns = {
|
||||
'name': fields.char('Object', size=64),
|
||||
'model': fields.char('Object Name', size=64),
|
||||
}
|
||||
#_rec_name = 'name'
|
||||
#_columns = {
|
||||
# 'name': fields.char('Object', size=64),
|
||||
# 'model': fields.char('Object Name', size=64),
|
||||
#}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
raise osv.except_osv('Error !', 'You cannot add an entry to this view !')
|
||||
|
||||
def unlink(self, *args, **argv):
|
||||
raise osv.except_osv('Error !', 'You cannot add an entry to this view !')
|
||||
raise osv.except_osv('Error !', 'You cannot delete an entry of this view !')
|
||||
|
||||
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
|
||||
result = super(osv.osv, self).read(cr, uid, ids, fields, context, load)
|
||||
|
|
Loading…
Reference in New Issue