Tryton - Issues

 

Issue6705

Title KeyError in ShipmentIn.done
Priority bug Status testing
Superseder Nosy List ced, reviewbot
Type crash Components sale_supply
Assigned To ced Keywords review
Reviews 43391002
View: 43391002

Created on 2017-08-07.17:16:15 by ced, last changed by reviewbot.

Messages
review43391002 updated at https://codereview.tryton.org/43391002/#ps1
msg35067 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-08-07.17:18:51
The error happens if not all the products from incoming moves are not in the inventory moves.
review43391002 uses a defaultdict to avoid the KeyError.
msg35066 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-08-07.17:16:15
KeyError: Pool().get('product.product')(1482)
  File "trytond/protocols/dispatcher.py", line 169, in dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "trytond/model/modelview.py", line 622, in wrapper
    return func(cls, *args, **kwargs)
  File "trytond/modules/stock_skip_done/stock.py", line 21, in receive_and_done
    cls.done(shipments)
  File "trytond/model/modelview.py", line 622, in wrapper
    return func(cls, *args, **kwargs)
  File "trytond/model/workflow.py", line 33, in wrapper
    result = func(cls, filtered, *args, **kwargs)
  File "trytond/modules/sale_supply/stock.py", line 37, in done
    sale_line.assign_supplied(pbl[sale_line.product])
History
Date User Action Args
2017-08-07 17:34:45reviewbotsetnosy: + reviewbot
messages: + msg35068
2017-08-07 17:18:51cedsetstatus: in-progress -> testing
reviews: 43391002
messages: + msg35067
keyword: + review
2017-08-07 17:16:15cedcreate

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