This question has been flagged

I'm working on tweaking the print layout for the view stock.report_picking.  The default looks like it has both "Customer Address" and "Delivery Address", which makes me think that "Customer Address" should be equivalent to a "Bill To" address, and "Delivery Address" should be equivalent to a "Ship To" address.  However, when I create a sales order with different "Customer" and "Delivery" address selections, it looks like the "Delivery" address is actually what gets printed in the "Customer Address" spot.  (Meaning that the "partner_id" field of stock.picking is actually the ID of the partner from the "Delivery" address on the Sales Order.)  If this is so, then how do I get the actual billing address from the sales order?  I don't see an actual link from stock.picking back to sale.order.  The "origin" field is the textual name of the sales order, not the ID of the sale.order record.

In the original code, I see this for the delivery address:  "o.move_lines[0].partner_id".  However, I don't see a "move_lines" column defined for class stock.picking in stock.py.  What is the "move_lines" array, and where is it coming from?

Avatar
Discard