fails to compute carrier when there are some comment lines in the sale
When a comment line is added in the sale and a carrier with weight list-price is used, click on Quote button crashes.
IMHO the line type or the existence of quantity should be checked on li 31.
Traceback (most recent call last):
File "/trytond/wsgi.py", line 73, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 46, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 44, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 122, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 176, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 665, in wrapper
return func(cls, records, *args, **kwargs)
File "/trytond/model/workflow.py", line 36, in wrapper
result = func(cls, filtered, *args, **kwargs)
File "/trytond/modules/sale_shipment_cost/sale.py", line 186, in quote
removed.extend(sale.set_shipment_cost())
File "/trytond/modules/sale_shipment_cost/sale.py", line 215, in set_shipment_cost
with Transaction().set_context(self._get_carrier_context()):
File "/trytond/modules/carrier_weight/sale.py", line 31, in _get_carrier_context
lines = [l for l in self.lines or [] if l.quantity > 0]
File "/trytond/modules/carrier_weight/sale.py", line 31, in
lines = [l for l in self.lines or [] if l.quantity > 0]
TypeError: unorderable types: NoneType() > int()