Skip to content
Snippets Groups Projects
Commit 643e093a authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] purchase_stock : prevent wrong destination in PO


Steps to reproduce the bug:
- create 2 warehouses A & B
- create a new product and add a seller
- Create an Automated replenishment order of the created product for warehouse A
- click on “Automate orders”
- open PO
- in “other information” tab > change the picking type to the “warehouse B” picking type
- confirm order
- click on the receipt

Problem:
The destination location is “Warehouse A” instead of “Warehouse B”
The problem also appears after the duplication.

Solution:
Use the parent_path to check if the location that the user wants to use is below the original warehouse.

opw-2588082

closes odoo/odoo#75306

Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
Co-authored-by: default avatarfmdl <florent.mirieu@gmail.com>
parent 6193f9bf
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment