long_term project : cannot launch scheduler

Bug #881839 reported by Aline (OpenERP)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
High
OpenERP R&D Addons Team 1

Bug Description

in project long term module, i get a bug while i am computing the scheduler :

To check, you have to update addons because we done some changes in this module. then, run the scheduler with demo data or without demo data (if you have no demo data, create one)

Compute the phase scheduler :

[2011-10-26 07:23:54,226][?] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/aline/source/server/trunk/openerp/osv/osv.py", line 120, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/aline/source/server/trunk/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/aline/source/server/trunk/openerp/osv/osv.py", line 163, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/aline/source/addons/trunk/project_long_term/wizard/project_compute_phases.py", line 39, in check_selection
    return self.compute_date(cr, uid, ids, context=context)
  File "/home/aline/source/addons/trunk/project_long_term/wizard/project_compute_phases.py", line 55, in compute_date
    project_pool.schedule_phases(cr, uid, project_ids, context=context)
  File "/home/aline/source/addons/trunk/project_long_term/project_long_term.py", line 297, in schedule_phases
    projects_gantt = Task.BalancedProject(local_dict['Project'])
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 3503, in __init__
    _AllocationPoject.__init__(self, top_task, scenario, id)
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 3378, in __init__
    self._generate()
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2412, in _generate
    task._compile(new_deferred, do_raise)
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2448, in _compile
    c._compile(deferred, do_raise)
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2442, in _compile
    self.__compile_function(deferred, do_raise, _MeProxy(self))
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2528, in __compile_function
    self._function()
  File "<string>", line 17, in Project_1
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 152, in __setattr__
    self.task._set_attrib(name, value)
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2593, in _set_attrib
    set_method(_val(value))
  File "/home/aline/source/addons/trunk/resource/faces/task.py", line 2842, in _set_working_days
    self.calendar.set_working_days(day_range, *tranges)
  File "/home/aline/source/addons/trunk/resource/faces/pcalendar.py", line 736, in set_working_days
    days = _to_days(day_range)
  File "/home/aline/source/addons/trunk/resource/faces/pcalendar.py", line 140, in _to_days
    tokens = src.split(",")
AttributeError: 'NoneType' object has no attribute 'split'

Changed in openobject-addons:
importance: Undecided → High
Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Hello,

This error usually comes under following circumstances:
1. There exists a calendar(working time) linked to Selected project for scheduling.
2. The working time has no working schedule defined(no o2m records).
3. OR The O2M field contains a record with NO day of the week defined.

There seems 3 possible ways to get rid of this situation.
A. Undoubtedly, the day of the week should be made mandatory.(I have no exceptional case as of now where we never need it defined).
B. Prompting the user to realize the configuration error.
C. If neither of the solutions can go as accepted, we can assign _defaults value.(We observed that the field is selection and no default is set, which is special mistake in itself). Still, GTK will have no issues, but web is subjected to throw error because web always adds a blank '' option to selection fields.

Attached branches contains the solutions.

Thanks,
Serpent Consulting Services.

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
Revision history for this message
Kuldeep Joshi(OpenERP) (kjo-openerp) wrote :

The above problem is solve in lp:~serpent-consulting-services/openobject-addons/trunk-881839-SerpentCS branch

Thanks
Serpent Consulting Services.

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Thanks for the merge Fabien(OpenERP).

Here I opt to set the bug as fixed.

Changed in openobject-addons:
status: Fix Committed → Fix Released
milestone: none → 6.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.