CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have create a new workflow 'stock.move.basic' for object 'stock.move', everything worked perfectly. But when I change and adde new activities and new transitions workflow, there is a problem, workflow walk only for new records created but for old records nothing works, the workflow buttons do nothing. I would like to know how to apply my workflow on all records (in OPENERP 7). thank you already for your answers.
In openerp 7, To apply a workflow to old records try the below code in the button,
def action_name(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_delete(uid, 'object.name', ids, cr)
wf_service.trg_create(uid, 'object.njame', ids, cr)
About This Community
Odoo Training Center
|Asked: 6/17/15, 2:39 AM|
|Seen: 1056 times|
|Last updated: 4/3/17, 3:38 PM|