Odoo Help


update state of delivery order using action_process method

on 12/8/14, 8:39 AM 1,215 views


i am working on a module to set the status of a delivery order based on a csv input. 

I am using this code where delivery ID is the id of a specific delivery order:

 picking_pool = self.pool.get('stock.picking.out')


for delivery_order in picking_pool.browse(cr, uid, delivery_id):
                   self.pool.get('activity.log').create_log(cr, uid, "delivery order: %s" % (delivery_order.name))


the script, if triggered, runs without any error, but the delivery order is not changed to delivered. Any ideas what's wrong?



On 12/8/14, 9:09 AM

thanks for the reply. I understand, but which method do I have to use to change the state of the delivery order? Or do i have to update the field state explicetly? 

You analyse method do_partial(). Change state of delivery order is associated with multiple operations. Usually one stock.picking is related to many stock.move. Additionaly change to this state generatses stock valutaions and accounts post. You need to perform several operations as easily as you want rather not be.

on 12/8/14, 12:20 PM

I got that. I have been trying around and obviously changing the states of delivery orders and subsequently of the move_line within the delivery order results in a state where delivery order and stock moves are shown correctly and the stock is updated correctly as well. However, I seem to be missing something, since the the respective deliveries in magento are not updated correclty via the connector. Checking do_partial() in stock_invoice_directly/stock_invoice.py does not really help since it seems to be more related to invoicing. Just copying these calls won't fix it i suppose... Can anyone help? Hoe can I actually get the information which function is actually called if i manually flag a delivery as shipped? I did not find any documentation on this topic... Thanks Peter

on 12/8/14, 1:18 PM


| 6 5 7
Lodz, Poland

On 12/8/14, 9:06 AM

Method action_process() is used only to open the partial picking wizard.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/8/14, 8:39 AM
Seen: 1215 times
Last updated: 3/16/15, 8:10 AM