Issue 11895

fromisoformat: argument must be str when compute quantities grouping by date with move without date
Nosy list
ced, reviewbot, roundup-bot
Assigned to
backport, review

Created on 2022-11-16.17:32:39 by ced, last changed 5 days ago by roundup-bot.


New changeset 18445cc4b176 by Cédric Krier in branch 'default':
Do not convert empty grouped date when computing quantities
New changeset d10733408252 by Cédric Krier in branch 'default':
Do not convert empty grouped date when computing quantities
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-11-16.17:32:39

When computing quantities grouped by date and there is a move with no planned or effective date, this traceback is raised:

Traceback (most recent call last):
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 119, in dispatch_request
    return endpoint(request, **requestview_args)
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 49, in rpc
    return methodsget(requestrpc_method, _dispatch)(                                        
  File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 86, in auth_required
    return wrapped(*args, **kwargs)                                                           
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/wrapperspy", line 162, in wrapper
    return func(request, pool, *args, **kwargs)                                         
  File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 207, in _dispatch
    result = rpcresult(meth(*c_args, **c_kwargs))                                                
  File "/usr/local/lib/python39/dist-packages/trytond/wizard/wizardpy", line 328, in execute
    return wizard_execute(state_name)                                                                
  File "/usr/local/lib/python39/dist-packages/trytond/wizard/wizardpy", line 361, in _execute
    result = self_execute(transition())                                                     
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock_supply/stockpy", line 72, in transition_create_
    created |= bool(getattr(self, 'generate_%s' % type_)(first))                             
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock_supply/stockpy", line 116, in generate_purchase
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock_supply/purchase_requestpy", line 114, in generate_requests
    shortages = clsget_shortage(                                                                                   
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock_supply/purchase_requestpy", line 321, in get_shortage
    pbl = Productproducts_by_location(                                                                                        
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock/productpy", line 283, in products_by_location
    quantities = Movecompute_quantities(query, location_ids, with_childs,                                                
  File "/usr/local/lib/python39/dist-packages/trytond/modules/stock/movepy", line 1572, in compute_quantities
    key[i] = datetimedatefromisoformat(key[i])                                                                   
TypeError: fromisoformat: argument must be str                           
Date User Action Args
2022-11-24 19:23:09roundup-botsetmessages: + msg80196
2022-11-24 19:23:00roundup-botsetmessages: + msg80195
nosy: + roundup-bot
status: testing -> resolved
2022-11-16 17:52:54reviewbotsetmessages: + msg80087
nosy: + reviewbot
2022-11-16 17:34:23cedsetkeyword: + backport
2022-11-16 17:34:19cedsetkeyword: + review
reviews: 418731005
status: in-progress -> testing
2022-11-16 17:32:39cedcreate

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