odoo/odoo#201270

Created by Logistics, Pawel Fertyk (pafe)
Merged at 30e60b55736cfd5f3116ebbc680b49d9113ca419

Statuses:

label
odoo-dev:18.0-fix-returns-for-exchange-pafe
head
a8aa1df0edd83f4694ac3724088d21e78aaec7af
merged
6 months ago by Logistics, Steve Van Essche
odoo/odoo
18.0 #201270
saas-18.1 #203916
saas-18.2 #203937
saas-18.3
saas-18.4
19.0
master #203957

[FIX] {purchase_,}stock: fix returns for exchange for receipts

Currently, a return for exchange made on an incoming transfer (receipt) creates a procurement, which usually ends up with a purchase of the exchanged products.
After the "Return" popup is closed, the exchange transfer is not created; instead, Odoo creates a PO that needs to be approved first in order to create the exchange transfer.

That is a bit confusing for the users, who might expect the exchange to be created immediately.
Also, the procurement process requires the product to have a "Buy" route enabled (in "Inventory" tab) and at least one vendor configured in the "Purchase" tab. Without this configuration, the return for exchange process shows an error message.

After this commit, a return for exchange made on a receipt will ignore the procurement process, and instead it will create the exchange picking immediately.
That way users will see the exchange transfer immediately after closing the "Return" popup. Also, all 3 transfers (original, return, exchange) will be linked to the initial PO (if a PO was created).
Additionally, the exchange picking will be shown as a return of the return picking.

task-4453571