Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3922 Prikazi

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
Opusti
Avtor 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
Opusti

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.

Avtor

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 Odgovori Prikazi Aktivnost
3
dec. 22
3717
2
apr. 20
4657
1
apr. 20
3613
2
sep. 19
9212
2
jun. 19
5655