Issue 7799

TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta'
Nosy list
Max452, ced, reviewbot, zinsky
Assigned to

Created on 2018-10-19.13:45:08 by zinsky, last changed 7 months ago by ced.


Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2018-11-08.00:01:14
Here is review62371002 but I would like to add some scenario to avoid such basic failure overtime.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2018-11-07.23:56:20
Well, I wrongly test it. It seems it just require some more fixes to work.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2018-11-07.23:38:14
This specific issue is quite simple to fix, we should replace:
   delay = 0
   delay = datetime.timedelta(0)

But when I tested this, I got many more issues. Indeed I think the module is not working at all.
I'm wondering if we should not drop it completely as I think nobody is using it otherwise we should have more bug reports.
Author: [hidden] (zinsky)
Date: 2018-10-19.13:45:07
Error occure when running Tasks Leveling wizard

Traceback (most recent call last):
  File "/trytond/", line 71, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/", line 42, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 167, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/", line 287, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/modules/project_plan/", line 650, in transition_leveling
  File "/trytond/modules/project_plan/", line 539, in create_leveling
    for sibling, delay in compute_delays(siblings):
  File "/trytond/modules/project_plan/", line 520, in compute_delays
    [delay + sibling.duration,
TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta'
Date User Action Args
2022-05-25 10:28:57cedlinkissue11516 superseder
2022-02-09 14:04:17cedsetassignedto: ced ->
2022-02-09 14:04:08cedlinkissue11231 superseder
2021-09-11 23:19:35cedlinkissue10743 superseder
2019-01-18 13:42:36Max452setnosy: + Max452
2018-11-08 00:14:58reviewbotsetnosy: + reviewbot
messages: + msg44815
2018-11-08 00:01:14cedsetstatus: chatting -> in-progress
reviews: 62371002
messages: + msg44814
keyword: + review
assignedto: ced
2018-11-07 23:56:20cedsetmessages: + msg44813
2018-11-07 23:38:14cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg44812
2018-10-19 13:45:08zinskycreate