Tryton - Issues



Author jcm
Date 2019-02-13.09:47:10
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/", line 73, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 46, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/", line 44, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 176, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/", line 665, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/trytond/model/", line 36, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "/trytond/modules/sale_shipment_cost/", line 186, in quote
  File "/trytond/modules/sale_shipment_cost/", line 215, in set_shipment_cost
    with Transaction().set_context(self._get_carrier_context()):
  File "/trytond/modules/carrier_weight/", line 31, in _get_carrier_context
    lines = [l for l in self.lines or [] if l.quantity > 0]
  File "/trytond/modules/carrier_weight/", line 31, in <listcomp>
    lines = [l for l in self.lines or [] if l.quantity > 0]
TypeError: unorderable types: NoneType() > int()
Date User Action Args
2019-02-13 09:47:11jcmsetmessageid: <>
2019-02-13 09:47:11jcmlinkissue8108 messages
2019-02-13 09:47:10jcmcreate

Showing 10 items. Show all history (warning: this could be VERY long)