Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] stock: wrong address on delivery slip when using packages
The delivery slip of a picking with a package doesn't print the delivery address of the partner. Steps to reproduce: 1. Go to Settings > Inventory > Operations and enable 'Packages' 2. Go to Inventory > Configuration > Warehouse Management > Operations Types 3. Open operation type 'Delivery Orders' and enable 'Show Detailed Operations' and 'Move Entire Packages' 4. Create a package: in Purchase, new RFQ, select products, confirm order, receive products, click on 'Put in Pack' and validate 5. In Inventory create a new Delivery Order, select a Delivery Address and the package you just created 6. Mark it as Done, validate and print the delivery slip 7. The delivery address is not the right one (the one selected on step 5) Cause: When creating the moves for the items in the package the partner_id is not given. So the moves don't have the field partner_id. When the method should_print_delivery_address() of stock_picking is called it returns False as self.move_ids[0].partner_id is undefined and the delivery address is not printed. Solution: Add the partner_id in _generate_moves() of stock_package_level to create the moves with the selected partner_id. opw-3901104
- Loading branch information