diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py
index 726e87b5979..b5ff85fcc3c 100644
--- a/addons/project/__openerp__.py
+++ b/addons/project/__openerp__.py
@@ -56,7 +56,8 @@ work done on tasks, eso. It is able to render planning, order tasks, eso.
'board_project_demo.xml',
],
'test':[
- 'test/test_project.yml'
+ 'test/test_project.yml',
+ 'test/test_project_delegation.yml',
],
'installable': True,
'active': False,
diff --git a/addons/project/project.py b/addons/project/project.py
index 59e435f7dfa..12be7a0144d 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -355,6 +355,13 @@ class task(osv.osv):
if task['date_start'] > task['date_end']:
return False
return True
+
+ def _check_deadline_date(self, cr, uid, ids, context=None):
+ task = self.read(cr, uid, ids[0], ['date_start', 'date_deadline'])
+ if task['date_start'] and task['date_deadline']:
+ if task['date_deadline'] < task['date_start']:
+ return False
+ return True
_columns = {
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the task without removing it."),
@@ -403,7 +410,8 @@ class task(osv.osv):
_order = "sequence, priority, date_start, id"
_constraints = [
- (_check_dates, 'Error! task start-date must be lower then task end-date.', ['date_start', 'date_end'])
+ (_check_dates, 'Error! task start-date must be lower then task end-date.', ['date_start', 'date_end']),
+ (_check_deadline_date, 'Error! task deadline-date must be greater then task start-date.', ['date_deadline', 'date_start'])
]
#
# Override view according to the company definition
diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml
index 8b5e0ca89d8..34779ce4b3d 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -96,7 +96,6 @@
Internal testing + Software Install
- 2008-06-06
17
@@ -210,7 +209,6 @@
open
In house training
- 2007-06-06
50
@@ -253,7 +251,6 @@
Latest in house tests
- 2010-05-27
Follow the procedure of Configuration wizard.
diff --git a/addons/project_gtd/__openerp__.py b/addons/project_gtd/__openerp__.py
index ba46d295234..971b2e8e324 100644
--- a/addons/project_gtd/__openerp__.py
+++ b/addons/project_gtd/__openerp__.py
@@ -43,10 +43,8 @@ performing those tasks.
'update_xml': [
'project_gtd_data.xml',
'project_gtd_view.xml',
- 'project_gtd_wizard.xml',
'security/ir.model.access.csv',
'wizard/project_gtd_empty_view.xml',
- 'wizard/project_gtd_daily_view.xml',
'wizard/project_gtd_fill_view.xml',
],
'demo_xml': ['project_gtd_demo.xml'],
diff --git a/addons/project_gtd/project_gtd_view.xml b/addons/project_gtd/project_gtd_view.xml
index 919412cd27d..f880d6fc499 100644
--- a/addons/project_gtd/project_gtd_view.xml
+++ b/addons/project_gtd/project_gtd_view.xml
@@ -96,7 +96,7 @@
-
+
diff --git a/addons/project_gtd/project_gtd_wizard.xml b/addons/project_gtd/project_gtd_wizard.xml
deleted file mode 100644
index e01db8218c6..00000000000
--- a/addons/project_gtd/project_gtd_wizard.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/project_gtd/wizard/__init__.py b/addons/project_gtd/wizard/__init__.py
index e92fa265ed3..aa2bbc22c45 100644
--- a/addons/project_gtd/wizard/__init__.py
+++ b/addons/project_gtd/wizard/__init__.py
@@ -19,8 +19,8 @@
#
##############################################################################
-import project_gtd_daily
import project_gtd_empty
import project_gtd_fill
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_gtd/wizard/project_gtd_daily.py b/addons/project_gtd/wizard/project_gtd_daily.py
deleted file mode 100644
index bacc1af85d9..00000000000
--- a/addons/project_gtd/wizard/project_gtd_daily.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# 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 .
-#
-##############################################################################
-from osv import osv, fields
-from tools.translate import _
-
-class project_timebox_open(osv.osv_memory):
-
- _name = 'project.timebox.open'
- _description = 'Project Timebox Open'
-
- def open_tb(self, cr, uid, data, context=None):
- ids = self.pool.get('project.gtd.timebox').search(cr, uid, [])
- if not len(ids):
- raise osv.except_osv(_('Error !'), _('No timebox of the type defined !'))
- if len(ids) >= 1:
- domain = "[('id','in',["+','.join(map(str, ids))+"])]"
- value = {
- 'domain': domain,
- 'name': 'My Daily Timebox',
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'project.gtd.timebox',
- 'view_id': False,
- 'type': 'ir.actions.act_window'
- }
- if len(ids) == 1:
- value['res_id'] = ids[0]
- value['context'] = {'record_id':ids[0]}
- return value
-
-project_timebox_open()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/project_gtd/wizard/project_gtd_daily_view.xml b/addons/project_gtd/wizard/project_gtd_daily_view.xml
deleted file mode 100644
index c49585f9112..00000000000
--- a/addons/project_gtd/wizard/project_gtd_daily_view.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
- My Daily Timebox
- project.timebox.open
- form
-
-
-
-
-
-
- My Daily Timebox
- ir.actions.act_window
- project.timebox.open
- form
- form
-
- {'record_id' : active_id}
- new
-
-
-
-
-
- My Daily Timebox
- client_action_multi
-
- action
- project.gtd.timebox
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/project_gtd/wizard/project_gtd_fill_view.xml b/addons/project_gtd/wizard/project_gtd_fill_view.xml
index 1c3d221c6ac..6206a0a5d89 100644
--- a/addons/project_gtd/wizard/project_gtd_fill_view.xml
+++ b/addons/project_gtd/wizard/project_gtd_fill_view.xml
@@ -8,8 +8,8 @@
form