Fail to sort sale lines
If there are some lines with a shipping date and others without, this traceback is raised:
Traceback (most recent call last):
File "/home/ced/Projects/tryton/trytond/trytond/protocols/wrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/protocols/dispatcher.py", line 197, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/modelview.py", line 742, in wrapper
return func(cls, records, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/workflow.py", line 37, in wrapper
result = func(cls, filtered, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/modules/sale_stock_quantity/sale.py", line 26, in quote
cls._check_stock_quantity(sales)
File "/home/ced/Projects/tryton/trytond/trytond/modules/sale_stock_quantity/sale.py", line 40, in _check_stock_quantity
sale.check_stock_quantity()
File "/home/ced/Projects/tryton/trytond/trytond/modules/sale_stock_quantity/sale.py", line 143, in check_stock_quantity
sorted(lines, key=w_getter), key=w_getter):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'datetime.date' and 'NoneType'