Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Â¿How can I deliver a delivery order that is ready to deliver using the XML-RPC API?
This is what I have tried so far:
When you activate developer mode you can see that the Deliver button in Delivery Order forms (when the delivery order is ready to deliver) refers to object "stock.picking.out" and method "action_process".
But if I call exec_workflow method of XML-RPC API with parameters "stock.picking.out" and "action_process", it always returns False and the delivery order does not change. This is the call I make from VB.Net:
res = proxyObject.exec_workflow(databaseName, userId, password, "stock.picking.out", "action_process", deliveryOrderId).
Â¿Should I use another parameter instead of "action_process"?
I have also tried with the execute method of XML-RPC API with the parameters "stock.picking.out", "action_process" and this list of arguments:
Dim argId(2) As String argId(0) = "picking_id" argId(1) = "=" argId(2) = deliveryOrderId Dim list As New List(Of Array) list.Add(argId) res = proxyObject.execute(databaseName, userId, password, "stock.picking.out", "action_process", list.ToArray())
But it returns a dictionary with "res_model" = "stock.partial.picking" and the delivery order does not change either.
I finally figured out how to do it. I checked the stock.picking.basic workflow in Settings->Technical->Workflows->Workflows, and I found that the signal for transition from "asigned" activity to "move" activity is called "button_done". So with this line of code:
res = proxyObject.exec_workflow(databaseName, userId, password, "stock.picking.out", "button_done", deliveryOrderId)
The delivery order changed its state to "delivered", even though the result is still "False".
Good morning Zensel
I want to do something similar, but when trying to deliver the products can not find the button to check availability from xml-rpc and I can not use the "button_done" because they are not yet "asigned" but are "confirmed", not passing them to this state as .
Could you help.
In this league are my steps I do:
h t t p ://help.openerp.com/question/36696/confirm-sales-via-python-xml-rpc/
Thanks and regards.
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/20/13, 12:02 PM|
|Seen: 5029 times|
|Last updated: 10/15/15, 3:19 PM|