From 4257ded1ee76a0df33c1bff72e05ce61f74157cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 9 Dec 2008 00:57:37 +0100 Subject: [PATCH] Check operator at the beginning of __where_calc to allow to use inselect for fields function search --- trytond/osv/orm.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 791c9fb7dc..014de4bef4 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2400,13 +2400,14 @@ class ORM(object): context=None): if context is None: context = {} + + for arg in args: + if arg[1] not in OPERATORS: + raise Exception('ValidateError', 'Argument "%s" not supported' \ + % args[i][1]) i = 0 joins = [] while i < len(args): - if args[i][1] not in OPERATORS: - raise Exception('ValidateError', 'Argument "%s" not supported' \ - % args[i][1]) - table = self fargs = args[i][0].split('.', 1) if fargs[0] in self._inherit_fields: