diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 3ef24386c2d..d865823e9cd 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -668,7 +668,7 @@
-
+
-
+
1
@@ -26,7 +26,7 @@
4
Merge
-
+
1
@@ -39,7 +39,6 @@
10
Study + Prototype
-
@@ -47,7 +46,6 @@
20
Specific Developements
-
@@ -55,11 +53,10 @@
30
Install, data import, configuration
-
-
+
38.0
diff --git a/addons/project_caldav/__terp__.py b/addons/project_caldav/__terp__.py
index 0cd26f06334..1ac69933623 100644
--- a/addons/project_caldav/__terp__.py
+++ b/addons/project_caldav/__terp__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,22 +15,22 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
{
- "name" : "Caldav task management",
- "version" : "1.0",
- "author" : "Tiny",
- "category" : "Generic Modules/Others",
- "description": """ Synchronize between Project task and Caldav Vtodo.""",
- "depends" : ["project", "caldav"],
- "init_xml" : ["project_caldav_data.xml"],
- "demo_xml" : [],
- "update_xml" : ["project_caldav_view.xml",
- "project_caldav_wizard.xml"],
- "active": False,
- "website": "http://www.openerp.com",
- "installable": True,
+ "name" : "Caldav task management",
+ "version" : "1.0",
+ "author" : "Tiny",
+ "category" : "Generic Modules/Others",
+ "description": """ Synchronize between Project task and Caldav Vtodo.""",
+ "depends" : ["project", "caldav", "base_calendar"],
+ "init_xml" : ["project_caldav_data.xml"],
+ "demo_xml" : [],
+ "update_xml" : ["project_caldav_view.xml",
+ "project_caldav_wizard.xml"],
+ "active": False,
+ "website": "http://www.openerp.com",
+ "installable": True,
}
diff --git a/addons/project_caldav/project_caldav_view.xml b/addons/project_caldav/project_caldav_view.xml
index d4fc7115491..541cc3c396e 100644
--- a/addons/project_caldav/project_caldav_view.xml
+++ b/addons/project_caldav/project_caldav_view.xml
@@ -1,7 +1,7 @@
-
+
project.task.caldav.form
project.task
@@ -46,8 +46,8 @@
-
-
+
+
project.task.caldav.form1
project.task
@@ -58,8 +58,8 @@
-
-
+
+
project.task.caldav.form2
project.task
@@ -68,8 +68,10 @@
-
+-->
-
+
project.task.caldav.form3
project.task
@@ -94,6 +96,6 @@
-
+
diff --git a/addons/project_retro_planning/project_retro_planning.py b/addons/project_retro_planning/project_retro_planning.py
index 0f35ddb4338..60c8279f16f 100644
--- a/addons/project_retro_planning/project_retro_planning.py
+++ b/addons/project_retro_planning/project_retro_planning.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
@@ -29,12 +29,12 @@ class project_project(osv.osv):
_description = 'project.project'
def write(self, cr, uid, ids,vals, *args, **kwargs):
- if 'date_end' in vals and vals['date_end']:
+ if 'date' in vals and vals['date']:
data_project = self.browse(cr,uid,ids)
for prj in data_project:
- c= date(*time.strptime(vals['date_end'],'%Y-%m-%d')[:3])
- if prj.date_end:
- d= date(*time.strptime(prj.date_end,'%Y-%m-%d')[:3])
+ c= date(*time.strptime(vals['date'],'%Y-%m-%d')[:3])
+ if prj.date:
+ d= date(*time.strptime(prj.date,'%Y-%m-%d')[:3])
for task in prj.tasks:
start_dt = (datetime(*time.strptime(task.date_start,'%Y-%m-%d %H:%M:%S')[:6])+(c-d)).strftime('%Y-%m-%d %H:%M:%S')
if task.date_deadline:
@@ -42,7 +42,7 @@ class project_project(osv.osv):
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt, 'date_deadline':deadline_dt})
else:
self.pool.get('project.task').write(cr,uid,task.id,{'date_start':start_dt})
- return super(project_project,self).write(cr, uid, ids,vals, *args, **kwargs)
+ return super(project_project,self).write(cr, uid, ids, vals, *args, **kwargs)
project_project()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py
index fbafdb4a60a..a6743b10330 100644
--- a/addons/project_timesheet/project_timesheet.py
+++ b/addons/project_timesheet/project_timesheet.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
from osv import fields, osv
@@ -58,11 +58,12 @@ class project_work(osv.osv):
res['general_account_id'] = a
res['product_uom_id'] = emp.product_id.uom_id.id
return res
-
+
def create(self, cr, uid, vals, *args, **kwargs):
- obj = self.pool.get('hr.analytic.timesheet')
+ obj_timesheet = self.pool.get('hr.analytic.timesheet')
+ task_obj = self.pool.get('project.task')
vals_line = {}
- obj_task = self.pool.get('project.task').browse(cr, uid, vals['task_id'])
+ obj_task = task_obj.browse(cr, uid, vals['task_id'])
result = self.get_user_related_details(cr, uid, vals.get('user_id', uid))
vals_line['name'] = '%s: %s' % (tools.ustr(obj_task.name), tools.ustr(vals['name']) or '/')
vals_line['user_id'] = vals['user_id']
@@ -71,33 +72,36 @@ class project_work(osv.osv):
vals_line['unit_amount'] = vals['hours']
acc_id = obj_task.project_id.category_id.id
vals_line['account_id'] = acc_id
- res = obj.on_change_account_id(cr, uid, False, acc_id)
+ res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id)
if res.get('value'):
vals_line.update(res['value'])
vals_line['general_account_id'] = result['general_account_id']
vals_line['journal_id'] = result['journal_id']
vals_line['amount'] = 00.0
vals_line['product_uom_id'] = result['product_uom_id']
- timeline_id = obj.create(cr, uid, vals_line, {})
-
+ amount = vals_line['unit_amount']
+ prod_id = vals_line['product_id']
+ unit = False
+ timeline_id = obj_timesheet.create(cr, uid, vals=vals_line, context=kwargs['context'])
+
# Compute based on pricetype
- amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
- vals_line['product_id'], vals_line['unit_amount'], unit, context)
-
- vals_line['amount'] = (-1) * vals['hours']* (unit_amount or 0.0)
- obj.write(cr, uid,[timeline_id], vals_line, {})
+ amount_unit=obj_timesheet.on_change_unit_amount(cr, uid, timeline_id,
+ prod_id, amount, unit, context=kwargs['context'])
+
+ vals_line['amount'] = (-1) * vals['hours']* (amount_unit['value']['amount'] or 0.0)
+ obj_timesheet.write(cr, uid,[timeline_id], vals_line, {})
vals['hr_analytic_timesheet_id'] = timeline_id
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
def write(self, cr, uid, ids, vals, context=None):
vals_line = {}
-
- task = self.pool.get('project.task.work').browse(cr, uid, ids)[0]
+ obj = self.pool.get('hr.analytic.timesheet')
+ timesheet_obj = self.pool.get('hr.analytic.timesheet')
+ task = self.pool.get('project.task.work').browse(cr, uid, ids, context=context)[0]
line_id = task.hr_analytic_timesheet_id
# in case,if a record is deleted from timesheet,but we change it from tasks!
- list_avail_ids = self.pool.get('hr.analytic.timesheet').search(cr, uid, [])
+ list_avail_ids = timesheet_obj.search(cr, uid, [], context=context)
if line_id in list_avail_ids:
- obj = self.pool.get('hr.analytic.timesheet')
if 'name' in vals:
vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/')
if 'user_id' in vals:
@@ -111,13 +115,13 @@ class project_work(osv.osv):
vals_line['date'] = vals['date'][:10]
if 'hours' in vals:
vals_line['unit_amount'] = vals['hours']
-
# Compute based on pricetype
- amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
- vals_line['product_id'], vals_line['unit_amount'], unit, context)
-
- vals_line['amount'] = (-1) * vals['hours'] * (amount_unit or 0.0)
- obj.write(cr, uid, [line_id], vals_line, {})
+ unit = False
+ amount_unit=obj.on_change_unit_amount(cr, uid, line_id,
+ vals_line['product_id'], vals_line['unit_amount'], unit, context=context)
+
+ vals_line['amount'] = (-1) * vals['hours'] * (amount_unit['value']['amount'] or 0.0)
+ obj.write(cr, uid, [line_id], vals_line, context=context)
return super(project_work,self).write(cr, uid, ids, vals, context)
@@ -147,9 +151,9 @@ class task(osv.osv):
if task_obj.work_ids:
work_ids = [x.id for x in task_obj.work_ids]
self.pool.get('project.task.work').unlink(cr, uid, work_ids, *args, **kwargs)
-
+
return super(task,self).unlink(cr, uid, ids, *args, **kwargs)
-
+
def write(self, cr, uid, ids,vals,context={}):
if (vals.has_key('project_id') and vals['project_id']) or (vals.has_key('name') and vals['name']):
vals_line = {}