_order="sequence,id"
def name_get(self, cr, uid, ids, context=None):
- return [(action["id"], "%s" % (action['action_id'][1])) for action in self.read(cr, uid, ids, ['action_id'], context=context)]
+ if not ids:
+ return []
+ return [(rec.id, rec.action_id.name) for rec in self.browse(cr, uid, ids, context=context)]
def action_launch(self, cr, uid, ids, context=None):
""" Launch Action of Wizard"""
]
def name_get(self, cr, uid, ids, context=None):
- return [(sys_para["id"], "%s" % (sys_para['key'])) for sys_para in self.read(cr, uid, ids, ['key'], context=context)]
+ return [(sys_para.id, "%s" % (sys_para.key)) for sys_para in self.browse(cr, uid, ids, context=context)]
def init(self, cr, force=False):
"""
'arch': fields.text('View Architecture', required=True),
}
+ def name_get(self, cr, uid, ids, context=None):
+ if not ids:
+ return []
+ return [(rec.id, rec.user_id.name) for rec in self.browse(cr, uid, ids, context=context)]
+
def _auto_init(self, cr, context=None):
super(view_custom, self)._auto_init(cr, context)
cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_ui_view_custom_user_id_ref_id\'')
return values
def name_get(self, cr, uid, ids, context=None):
- return [(ir_property["id"], "%s" % (ir_property['name'] or ir_property['fields_id'][1])) for ir_property in self.read(cr, uid, ids, ['fields_id','name'], context=context)]
+ if not ids:
+ return []
+ return [(rec.id, rec.name or rec.fields_id.field_description) for rec in self.browse(cr, uid, ids, context=context)]
def write(self, cr, uid, ids, values, context=None):
return super(ir_property, self).write(cr, uid, ids, self._update_values(cr, uid, ids, values), context=context)
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
- line = self.browse(cr, uid, ids, context=context)
- return [(line.id, (line.act_from.name) + '+' + (line.act_to.name)) if line.signal == False else (line.id, line.signal) for line in line]
+ return [(line.id, (line.act_from.name) + '+' + (line.act_to.name)) if line.signal == False else (line.id, line.signal) for line in self.browse(cr, uid, ids, context=context)]
wkf_transition()