odoo/odoo#111725

Created by fw-bot
Merged at bf666f77bff3013dc270dc463ab040e14ee4add4

Statuses:

label
odoo-dev:saas-16.1-15.0-stock-3145779-fix-mome-KI8M-fw
head
c6128a2e0eba3cc6ac7ad725421d0c62af264f8a
merged
2 years ago by Logistics, William Henrotin (whe)
odoo/odoo
15.0 #111256
saas-15.2 #111690
16.0 #111704
saas-16.1 #111725
17.0
saas-17.4
18.0
saas-18.1
saas-18.2
saas-18.3
master #111740

[FW][FIX] stock: Delivery address not on Delivery note

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

Forward-Port-Of: #111256