Use Null constant from python-sql for comparisons

issue4143
review13701003
This commit is contained in:
Robin Baumgartner
2014-11-24 14:02:11 +01:00
parent d148c30b0b
commit 1feafe6529
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
#this repository contains the full copyright notices and license terms.
from decimal import Decimal
from sql import Null
from simpleeval import simple_eval
from trytond.model import ModelView, ModelSQL, MatchMixin, fields
@@ -99,7 +100,7 @@ class PriceListLine(ModelSQL, ModelView, MatchMixin):
@staticmethod
def order_sequence(tables):
table, _ = tables[None]
return [table.sequence == None, table.sequence]
return [table.sequence == Null, table.sequence]
@staticmethod
def default_formula():
+1 -1
View File
@@ -41,7 +41,7 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
requires = ['simpleeval']
requires = ['simpleeval', 'python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))