Tryton - Issues

 

Issue6705

Title KeyError in ShipmentIn.done
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
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 roundup-bot.

Messages
New changeset 45a998d5064b by Cédric Krier in branch '4.4':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/45a998d5064b

New changeset 51cb59b20266 by Cédric Krier in branch '4.2':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/51cb59b20266

New changeset 4e8124ee4f44 by Cédric Krier in branch '4.0':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/4e8124ee4f44

New changeset a773206ce77e by Cédric Krier in branch '3.8':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/a773206ce77e

New changeset cf0f3877faef by Cédric Krier in branch '3.6':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/cf0f3877faef
New changeset 7e30d8574afb by Cédric Krier in branch 'default':
Use defaultdict to avoid KeyError
http://hg.tryton.org/modules/sale_supply/rev/7e30d8574afb
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-09-05 23:36:25roundup-botsetmessages: + msg35552
2017-08-28 18:25:25roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg35380
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)