Odoo Help


How to restore an workflow

Hussain Behestee
on 5/27/13, 3:59 AM 2,990 views

I have modified Purchase Order Workflow to meet my requirements. I had modified many where. Now I got stuck and my purchase Order doesn't works. I also forgot exactly where I had modified.

Now i want to restore the default workflow. How can I do that?




| 5 4 7
On 5/27/13, 3:30 PM

To reset workflow you need to update the module it comes from, in you case you simply need to go to Settings-->Modules and update purchase module. This assumes you have not modified purchase workflow in purchase module directly.


Omal Bastin

--Omal Bastin--

| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 5/27/13, 5:17 AM

You cannot restore the workflow!!. You have to restart or delete the workflow. You can find an example at account payment module.

def set_to_draft(self, cr, uid, ids, *args):
    self.write(cr, uid, ids, {'state': 'draft'})
    wf_service = netsvc.LocalService("workflow")
    for id in ids:
        wf_service.trg_create(uid, 'your.model.name', id, cr)
    return True

or you can delete the workflow

wf_service.trg_delete(uid, 'your.model.name', id, cr)

Actually i need the reset to factory settings feature. Though your code help me a lot to know the way to add remove workflow through code. Thanks for your code.

Hussain Behestee
on 6/17/13, 2:48 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/27/13, 3:59 AM
Seen: 2990 times
Last updated: 3/16/15, 8:10 AM