From ef1ab18b3bdd9de553361bca72b43cb08e43a4ae Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Tue, 2 May 2023 09:34:46 +0200 Subject: [PATCH] [FIX] rma: dropship from vendor as outgoing --- rma/wizards/rma_make_picking.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rma/wizards/rma_make_picking.py b/rma/wizards/rma_make_picking.py index ce79afa3..f2841609 100644 --- a/rma/wizards/rma_make_picking.py +++ b/rma/wizards/rma_make_picking.py @@ -102,17 +102,19 @@ class RmaMakePicking(models.TransientModel): def _get_procurement_data(self, item, group, qty, picking_type): line = item.line_id delivery_address_id = self._get_address(item) + location, warehouse, route = False, False, False if picking_type == "incoming": if line.customer_to_supplier: location = self._get_address_location(delivery_address_id, "supplier") - elif line.supplier_to_customer: - location = self._get_address_location(delivery_address_id, "customer") else: location = line.location_id warehouse = line.in_warehouse_id route = line.in_route_id - else: - location = self._get_address_location(delivery_address_id, line.type) + elif picking_type == "outgoing": + if line.supplier_to_customer: + location = self._get_address_location(delivery_address_id, "customer") + else: + location = self._get_address_location(delivery_address_id, line.type) warehouse = line.out_warehouse_id route = line.out_route_id if not route: