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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
3
Replies
3178
Views
In openerp 7, To apply a workflow to old records try the below code in the button,
import netsvc
def action_name(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_delete(uid, 'object.name', ids[0], cr)
wf_service.trg_create(uid, 'object.njame', ids[0], cr)
#your code
return True
Hello,
I am Facing same issue in manufacturing.
It would be great if somebody please help me in this.
Thanks,
Hello,
what about delete workflow in odoo V10 ?
i haven't uid or cr parameters
ps: i'm noob in odoo
wf_service.trg_delete(uid, 'object.name', ids[0], cr)
wf_service.trg_create(uid, 'object.njame', ids[0], cr)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up