Workflow Activity "python action" can't use cr, uid, model, ids
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP's Framework R&D |
Bug Description
Python actions defined on Workflow Activities don't have available any variables such as cr, uid, ids, etc.
This can be confirmed by adding to an activite some python code such as:
print cr, uid
Digging into the trunk code, /openerp/
But actually that's not the case:
(Pdb) l
53 ret=True
54 elif line =='False':
55 ret=False
56 else:
57 env = Env(cr, uid, model, ids)
58 -> ret = eval(line, env, nocopy=True)
59 return ret
60
61 def execute_action(cr, ident, workitem, activity):
62 obj = pooler.
63 ctx = {'active_
(Pdb) p cr, uid, model, ids
(<openerp.
(Pdb) pp env
{'__builtins__': {'False': False,
(Pdb)
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Why this is a WishList?