}
_order="sequence,id"
+ def name_get(self, cr, uid, ids, context=None):
+ return [(rec.id, rec.action_id.name) for rec in self.browse(cr, uid, ids, context=context)]
+
+ def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
- if not args:
++ if args is None:
+ args = []
- ids = []
+ if name:
+ ids = self.search(cr, user, [('action_id', operator, name)] + args, limit=limit)
- else:
- super(ir_actions_todo, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
- return self.name_get(cr, user, ids, context=context)
++ return self.name_get(cr, user, ids, context=context)
++ return super(ir_actions_todo, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
++
+
def action_launch(self, cr, uid, ids, context=None):
""" Launch Action of Wizard"""
wizard_id = ids and ids[0] or False
'arch': fields.text('View Architecture', required=True),
}
+ def name_get(self, cr, uid, ids, context=None):
+ return [(rec.id, rec.user_id.name) for rec in self.browse(cr, uid, ids, context=context)]
+
+ def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
- if not args:
++ if args is None:
+ args = []
- ids = []
+ if name:
+ ids = self.search(cr, user, [('user_id', operator, name)] + args, limit=limit)
- else:
- super(view_custom, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
- return self.name_get(cr, user, ids, context=context)
++ return self.name_get(cr, user, ids, context=context)
++ return super(view_custom, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
++
+
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\'')
_defaults = {
'condition': lambda *a: 'True',
}
+
+ def name_get(self, cr, uid, ids, context=None):
+ 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)]
+
+ def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
- if not args:
++ if args is None:
+ args = []
- ids = []
+ if name:
+ ids = self.search(cr, user, ['|',('act_from', operator, name),('act_to', operator, name)] + args, limit=limit)
- else:
- super(wkf_transition, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
- return self.name_get(cr, user, ids, context=context)
++ return self.name_get(cr, user, ids, context=context)
++ return super(wkf_transition, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
++
+
wkf_transition()
class wkf_instance(osv.osv):