From beaea311e6becd65dbb29925ba56016d4c249a68 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 10 Mar 2017 10:39:20 +0100 Subject: [PATCH] [FIX] stock: typo In method `_check_delivery_resupply`, `new_location` is used in a `write` call. This expects an integer (id). However, `new_location` is the result of `_get_input_output_locations`, which returns a recordset. opw-716141 --- addons/stock/models/stock_warehouse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index aa386c6b8b7..5aede1cda52 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -552,7 +552,7 @@ class Warehouse(models.Model): routes = self.env['stock.location.route'].search([('supplier_wh_id', '=', self.id)]) pulls = Pull.search(['&', ('route_id', 'in', routes.ids), ('location_id.usage', '=', 'transit')]) pulls.write({ - 'location_src_id': new_location, + 'location_src_id': new_location.id, 'procure_method': change_to_multiple and "make_to_order" or "make_to_stock"}) if not change_to_multiple: # If single delivery we should create the necessary MTO rules for the resupply