Tryton - Issues

 

Message46217

Author resteve
Recipients
Date 2019-01-24.13:29:24
Content
Install sale_supply_drop_shipment

Scenario:

1- Create a purchase request from a sale
2- Create a purchase from the purchase request
3- The purchase created from the purchase request, add new line.
4- Process the purchase -> create shipment drop in wait state and crash


Traceback (most recent call last):
  File "/trytond/wsgi.py", line 71, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 42, 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 178, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/model/modelview.py", line 644, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/trytond/modules/sale_supply/purchase.py", line 74, in process
    super(Purchase, cls).process(purchases)
  File "/trytond/model/modelview.py", line 644, in wrapper
    return func(cls, records, *args, **kwargs)
  File "/trytond/modules/purchase/purchase.py", line 887, in process
    purchase.create_move('in')
  File "/trytond/modules/sale_supply_drop_shipment/purchase.py", line 164, in create_move
    DropShipment.wait([drop_shipment])
  File "/trytond/model/modelview.py", line 644, 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_supply_drop_shipment/stock.py", line 560, in wait
    sale_line = request2sline[pline2request[move.origin]]
KeyError: Pool().get('purchase.line')(4995)


Debug data:

(Pdb) pline2request
{Pool().get('purchase.line')(4994): Pool().get('purchase.request')(15192)}
(Pdb) move.origin
Pool().get('purchase.line')(4995)
(Pdb) pline2request.get(move.origin)
History
Date User Action Args
2019-01-24 13:29:24restevesetmessageid: <1548332964.64.0.175552782474.issue8038@tryton.org>
2019-01-24 13:29:24restevelinkissue8038 messages
2019-01-24 13:29:24restevecreate

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