From 805502c3a93558edc4961bc59e2e9423e39ae76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Voet=20=28ryv=29?= Date: Thu, 31 Dec 2020 08:35:16 +0000 Subject: [PATCH] [FIX] stock: avoid warning log during `_get_orderpoint_action` `o.location_id.id == g['location_id']` => `Comparing apples and oranges: stock.location(243,) == (219 ...` replace by the correct code and avoid warning. task-2390516 X-original-commit: 461a3e737c4ffe048b738dd09f83571602324257 --- addons/stock/models/stock_orderpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/stock_orderpoint.py b/addons/stock/models/stock_orderpoint.py index aabf43f0eb9..3a322c8aef2 100644 --- a/addons/stock/models/stock_orderpoint.py +++ b/addons/stock/models/stock_orderpoint.py @@ -272,7 +272,7 @@ class StockWarehouseOrderpoint(models.Model): for g in rules_groups: if not g.get('route_id'): continue - orderpoints = self.filtered(lambda o: o.location_id == g['location_id']) + orderpoints = self.filtered(lambda o: o.location_id.id == g['location_id'][0]) orderpoints.route_id = g['route_id'] def _get_product_context(self):