diff --git a/purchase.py b/purchase.py index 9b8638ef6b..069008a97b 100644 --- a/purchase.py +++ b/purchase.py @@ -573,7 +573,7 @@ class Purchase(ModelWorkflow, ModelSQL, ModelView): def search_rec_name(self, cursor, user, name, args, context=None): args2 = [] i = 0 - while i < lend(args): + while i < len(args): names = args[i][2].split(' - ', 1) ids = self.search(cursor, user, ['OR', ('reference', args[i][1], names[0]),