Odoo Help


This community 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.


How to restore an workflow

Hussain Behestee
on 5/27/13, 3:59 AM 2,089 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?

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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