diff --git a/trytond/model/model.py b/trytond/model/model.py index a09ef0385d..686ae986c6 100644 --- a/trytond/model/model.py +++ b/trytond/model/model.py @@ -4,6 +4,7 @@ import copy import collections import warnings +from functools import total_ordering from trytond.model import fields from trytond.error import WarningErrorMixin @@ -16,6 +17,7 @@ from trytond.rpc import RPC __all__ = ['Model'] +@total_ordering class Model(WarningErrorMixin, URLMixin, PoolBase): """ Define a model in Tryton. @@ -490,11 +492,6 @@ class Model(WarningErrorMixin, URLMixin, PoolBase): return NotImplemented return self.id < other.id - # TODO: replace by total_ordering when 2.6 will be dropped - __gt__ = lambda self, other: not (self < other or self == other) - __le__ = lambda self, other: self < other or self == other - __ge__ = lambda self, other: not self < other - def __ne__(self, other): if not isinstance(other, Model): return NotImplemented