Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff -r 91e0c59c47aa tryton/common/domain_parser.py
--- a/tryton/common/domain_parser.py Thu Jan 03 16:29:35 2013 +0100
+++ b/tryton/common/domain_parser.py Sat Jan 19 13:33:42 2013 -0800
@@ -749,9 +749,9 @@
def string_(clause):
if not clause:
return ''
- if (isinstance(clause[0], basestring)
- and (clause[0] in self.fields
- or clause[0] == 'rec_name')):
+ if isinstance(clause[0], basestring) and clause[0] not in ('AND', 'OR'):
+ assert clause[0] in self.fields or clause[0] == 'rec_name',
+ "Field in clause is not available to parser."
name, operator, value = clause
if name not in self.fields:
escaped = value.replace('%%', '__')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.