Tryton - Issues

 

Issue7799

Title TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta'
Priority bug Status in-progress
Superseder Nosy List ced, reviewbot, zinsky
Type crash Components project_plan
Assigned To ced Keywords review
Reviews 62371002
View: 62371002

Created on 2018-10-19.13:45:08 by zinsky, last changed by reviewbot.

Messages
review62371002 updated at https://codereview.tryton.org/62371002/#ps1
msg44814 (view) 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.
msg44813 (view) 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.
msg44812 (view) 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
by 
   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.
msg44480 (view) Author: [hidden] (zinsky) Date: 2018-10-19.13:45:07
Error occure when running Tasks Leveling wizard

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 167, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 287, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/modules/project_plan/work.py", line 650, in transition_leveling
    Work(Transaction().context['active_id']).create_leveling()
  File "/trytond/modules/project_plan/work.py", line 539, in create_leveling
    for sibling, delay in compute_delays(siblings):
  File "/trytond/modules/project_plan/work.py", line 520, in compute_delays
    [delay + sibling.duration,
TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta'
History
Date User Action Args
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

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