콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3921 화면

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?

아바타
취소
작성자 베스트 답변

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

아바타
취소

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.

작성자

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.

관련 게시물 답글 화면 활동
3
12월 22
3717
2
4월 20
4657
1
4월 20
3613
2
9월 19
9212
2
6월 19
5655