# ACTION_ID : Action to launch
def run(self, cr, uid, ids, context={}):
- print 'Run Server Action'
logger = netsvc.Logger()
for action in self.browse(cr, uid, ids, context):
obj_pool = self.pool.get(action.model_id.model)
'uid' : uid
}
expr = eval(str(action.condition), cxt)
- print expr, action.state
if not expr:
- print 'Not Expr'
continue
if action.state=='client_action':
'object': fields.boolean('Is Object'),
'key': fields.selection([('action','Action'),('default','Default')], 'Type', size=128),
'key2' : fields.char('Event Type',help="The kind of action or button in the client side that will trigger the action.", size=128),
- #'key2' : fields.selection([('client_action_multi', 'client_action_multi'),
- # ('client_action_relate', 'client_action_relate'),
- # ('tree_but_open', 'tree_but_open'),
- # ('tree_but_action', 'tree_but_action'),
- # ('client_print_multi', 'client_print_multi')],
- # 'Event Type',
- # help="The kind of action or button in the client side that will trigger the action."),
'meta': fields.text('Meta Datas'),
'meta_unpickle': fields.function(_value_unpickle, fnct_inv=_value_pickle,
method=True, type='text', string='Metadata'),
'next action is %s' % next)
if next:
action = next.action_id
- print {
- 'view_mode': action.view_mode,
- 'view_type': action.view_type,
- 'view_id': action.view_id and [action.view_id.id] or False,
- 'res_model': action.res_model,
- 'type': action.type,
- 'target': action.target,
- }
return {
'view_mode': action.view_mode,
'view_type': action.view_type,