From 5e48b8af730288b128201fe8fc1b4daa5bb3d448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 1 Oct 2022 15:35:33 +0200 Subject: [PATCH] Use length of field name instead of lstrip to get nested part of clause issue11714 review437381003 --- stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index ce31bda51e..b4186dc717 100644 --- a/stock.py +++ b/stock.py @@ -343,8 +343,8 @@ class LotsByLocations(ModelSQL, ModelView): @classmethod def search_lot(cls, name, clause): - nested = clause[0].lstrip(name) - return [('lot.' + name + nested,) + tuple(clause[1:])] + nested = clause[0][len(name):] + return [('lot.' + name + nested, *clause[1:])] class LotByWarehouseContext(LotByLocationContext):