← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 881839] Re: long_term project : cannot launch scheduler

 

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.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/881839

Title:
  long_term project : cannot launch scheduler

Status in OpenERP Addons (modules):
  Confirmed

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'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/881839/+subscriptions


References