Steps to reproduce:
- install Stock
- Go to Inventory > Delivery Orders > Configuration
- Activate Show Detailed Operation
- Create a delivery order and set the delivery address
- Create a detailed operation
- Save
- Print the delivery slip
- The delivery slip don't have the delivery address
Bug:
There are 2 flows to create `stock.move` from a delivery order:
1- Create it directly from the operation tab:
* In this case `stock.picking.onchange_partner_id` handles the
`partner_id` field of the `stock.move`
2- Create a detailed operation then the move is created in `create_move`:
* There is nothing handling the assignation of the `partner_id`
field of the `stock.move`
* This creates an issue as `should_print_delivery_address` expects
the `stock.move` to have its `partner_id` set to print the
delivery address on the delivery slip
Fix:
Set the `partner_id` in `create_move`
OPW-3145779
closesodoo/odoo#111740
X-original-commit: 6bea6d99050746bfa8a70bbfc8975090ab47fdbe
Signed-off-by: William Henrotin (whe) <whe@odoo.com>