Fail to create/modifiy a task if project_id is empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HR - Timesheet Management |
Fix Released
|
Undecided
|
Sébastien BEAU - http://www.akretion.com |
Bug Description
Creating/Updating a task without a project_id will generate an error.
I think for that case code is better than explication
def _store_
# Hack to avoid redefining most of function fields of project.project model
# This is mainly due to the fact that orm _store_set_values use direct access to database.
# So when modifiy aa line the _store_set_values as it uses cursor directly to update tasks
# project triggers on task are not called
res = super(ProjectTask, self)._
for row in self.browse(cr, SUPERUSER_ID, ids, context=context):
if row.project_id:
return res
We just have to test if the project_id is null.
Related branches
- Alexandre Fayolle - camptocamp: Needs Fixing
-
Diff: 17 lines (+6/-0) (has conflicts)1 file modifiedtimesheet_task/project_task.py (+6/-0)
Sorry It was fix with the merge of "Pedro Manuel Baeza".
It's crazy how bug are fix so quickly ;)