Odoo Help


Is it possible to get order id using picking id?

on 3/17/15, 4:44 PM 2,183 views

I want to print customer reference in picking slip. When i observe stock,picking table, it does not contain relation with sale.order.line or sale.order. How can i get customer reference in to picking slip. Can any one help me please?


Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 5 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 3/30/15, 3:03 AM

In stock.picking table, you have sale order as reference at field "sale_id".
In sale.order, you have related stock pickings at "picking_ids"




| 5 3 8
Pondicherry, India
On 3/18/15, 1:30 AM

Hi samba,

After confirming the sale in Sale order, you can see the "View Deliver Order" button. While clicking that you can go to the stock_picking table.In that, there is a tab called "Additional Info". Inside that tab there is a field called "Procurement Group". you can see the Procurement and picking details in that.

Thank you, Vasanth but that is reference. I am searching for direct relation with sale.order table. I hope there should be direct relation with that.

on 3/18/15, 9:42 AM
On 3/18/15, 1:59 AM

using origin='S0001' you can retrive the id bro....

Ankit Gauri
On 2/29/16, 6:53 AM
  1. Hello samba
    please check below code through this you will get all the delivery for the particular products which state is in waiting for availability state so now you do changes based on your requirement :
    for operation_product_ids in self.pack_operation_product_ids:
         product_id = operation_product_ids.product_id.id
         stock_move_obj = self.env['stock.move']
         stock_move_ids = stock_move_obj.search([('product_id','=', product_id),('state','=','confirmed')])

    Thank you

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

2 follower(s)


Asked: 3/17/15, 4:44 PM
Seen: 2183 times
Last updated: 2/29/16, 6:53 AM