Skip to Content
Menu
This question has been flagged
1 Reply
3390 Views

We recently migrated from Odoo 8 to Odoo 12.

In Odoo 8 we used the xmlrpc and python 3 to create and modify invoices, sales orders, purchase orders, etc.

Now with Odoo 12 the functionality of exec_workflow has been removed. For example, we used it in the following manner:

models.exec_workflow(db, uid, password, 'purchase.order', 'bid_received', PO_id)

models.exec_workflow(db, uid, password, 'purchase.order', 'purchase_confirm', PO_id)

models.exec_workflow(db, uid, password, 'account.invoice', 'invoice_open', INVOIC_id)

I read that it is deprecated since Odoo 10 but I could not find what replaced it since then.

Could someone point me in the right direction?

Avatar
Discard
Author Best Answer

Think I found the answer myself. 

It is now done by triggering buttons, so for confirming a purchase order it is:

models.execute_kw(db, uid, password, 'purchase.order', 'button_confirm', [po_id])

Avatar
Discard

so odoo removed a feature that was being used by you guys and now you had to implement it your own way?

i now really hate the fact that they are removing features. cause im searching for official documents on the workflow for v13 but could only find it for v10.

Author

So they deprecated the exec_workflow functionality since Odoo V10 I believe, it was still available back then. In Odoo V11 or V12 they removed it completely.

These two lines:

models.exec_workflow(db, uid, password, 'purchase.order', 'bid_received', PO_id)

models.exec_workflow(db, uid, password, 'purchase.order', 'purchase_confirm', PO_id)

where to confirm purchase orders using workflow, now that workflows are removed you are able to do the equivalent process by the following line:

models.execute_kw(db, uid, password, 'purchase.order', 'button_confirm', [po_id])

"button_confirm" is the name of the button you would be pressing to confirm a purchase order on the frontend of Odoo.

So if I am correct it is still possible to trigger these 'workflows' but now using the actual buttons you see in the frontend.

Related Posts Replies Views Activity
3
Dec 22
2628
2
Apr 20
3552
1
Apr 20
2412
2
Sep 19
7199
2
Jun 19
4491