diff --git a/address.py b/address.py index 1002d402e0..17bc7c5209 100644 --- a/address.py +++ b/address.py @@ -1,6 +1,8 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. 'Address' +from sql import Null + from trytond.model import ModelView, ModelSQL, fields from trytond.pyson import Eval, If from trytond.transaction import Transaction @@ -61,7 +63,7 @@ class Address(ModelSQL, ModelView): @staticmethod def order_sequence(tables): table, _ = tables[None] - return [table.sequence == None, table.sequence] + return [table.sequence == Null, table.sequence] @staticmethod def default_active(): diff --git a/contact_mechanism.py b/contact_mechanism.py index 5c28c34dde..aba75b5b94 100644 --- a/contact_mechanism.py +++ b/contact_mechanism.py @@ -1,5 +1,7 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. +from sql import Null + from trytond.model import ModelView, ModelSQL, fields from trytond.pyson import Eval from trytond.transaction import Transaction @@ -102,7 +104,7 @@ class ContactMechanism(ModelSQL, ModelView): @staticmethod def order_sequence(tables): table, _ = tables[None] - return [table.sequence == None, table.sequence] + return [table.sequence == Null, table.sequence] @staticmethod def default_type(): diff --git a/setup.py b/setup.py index 3582e9b483..88c55d28b3 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ if minor_version % 2: 'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % ( name[8:], name, version)) -requires = ['python-sql'] +requires = ['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))