Tryton - Issues

 

Message46963

Author jcm
Recipients
Date 2019-02-13.09:47:10
Content
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 <listcomp>
    lines = [l for l in self.lines or [] if l.quantity > 0]
TypeError: unorderable types: NoneType() > int()
History
Date User Action Args
2019-02-13 09:47:11jcmsetmessageid: <1550047631.3.0.409274363559.issue8108@tryton.org>
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)