timesheet_task : Crash when adding timesheet lines on a task
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HR - Timesheet Management |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
With the module timesheet_task, go to the form view of a task and try to add timesheet lines : it often crashes with this error message :
2014-03-26 08:37:02,754 2695 ERROR erpv70_aven1 openerp.sql_db: Programming error: column "task_id" does not exist
LINE 1: ...lect 1 from hr_analytic_
, in query select 1 from hr_analytic_
2014-03-26 08:37:02,755 2695 ERROR erpv70_aven1 openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
res = super(ProjectTask, self).write(cr, uid, ids, vals, context=context)
File "/home/
result = super(task, self).write(cr, uid, ids, vals, context=context)
File "/home/
result = super(mail_thread, self).write(cr, uid, ids, values, context=context)
File "/home/
result += self._columns[
File "/home/
cr.
File "/home/
return f(self, *args, **kwargs)
File "/home/
res = self._obj.
ProgrammingError: column "task_id" does not exist
LINE 1: ...lect 1 from hr_analytic_
This crash is not systematic, but it happens very often. I noticed that usually it works for the first timesheet line that you create+save, but it crashes on the next one that you create+save.
There is no field task_id on hr_analytic_
Here is a step-by-step scenario to reproduce the bug on an up-to-date OCB 7.0 environnement and an up-to-date lp:hr-timesheet branch. I'm using Firefox 28.
1) create a new DB with demo data _task
2) install the moduletimesheet
3) Go to the menu Project > Projects, then select the project "E-learning Integration"
4) Click on the task "Dataflow Design" ; it should bring to to the form view of this task
5) Click on "Edit", then "Add an item" in the one2many widget in the first tab. For this line, enter :
Description : TS test1
Quantity : 12
Click on "Save" -> it works
6) Click on "Edit", then "Add an item". For this new line, enter :
Description : TS test2
Quantity : 24
Click on "Save" -> it crashes with the following backtrace :
File "/home/ alexis/ new_boite/ dev/hr- timesheet/ timesheet_ task/project_ task.py" , line 97, in write alexis/ new_boite/ dev/addons- 70/project/ project. py", line 1203, in write alexis/ new_boite/ dev/addons- 70/mail/ mail_thread. py", line 291, in write alexis/ new_boite/ dev/server- 70/openerp/ osv/orm. py", line 4251, in write field]. set(cr, self, id, field, vals[field], user, context= rel_context) or [] alexis/ new_boite/ dev/server- 70/openerp/ osv/fields. py", line 574, in set execute( "select 1 from {0} where id=%s and {1}=%s" .format( _table, self._fields_id), (act[1], id)) alexis/ new_boite/ dev/server- 70/openerp/ sql_db. py", line 161, in wrapper alexis/ new_boite/ dev/server- 70/openerp/ sql_db. py", line 226, in execute execute( query, params) timesheet where id=6 and task_id=14
res = super(ProjectTask, self).write(cr, uid, ids, vals, context=context)
File "/home/
result = super(task, self).write(cr, uid, ids, vals, context=context)
File "/home/
result = super(mail_thread, self).write(cr, uid, ids, values, context=context)
File "/home/
result += self._columns[
File "/home/
cr.
File "/home/
return f(self, *args, **kwargs)
File "/home/
res = self._obj.
ProgrammingError: column "task_id" does not exist
LINE 1: ...elect 1 from hr_analytic_