Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3923 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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])

Awatar
Odrzuć

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.

Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
3
gru 22
3717
2
kwi 20
4658
1
kwi 20
3613
2
wrz 19
9213
2
cze 19
5655