diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-16 11:23:48 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-16 11:23:48 +0530 |
| commit | 7d5e28fbb8d49b8a2825bfdd525938d99574e234 (patch) | |
| tree | c1e90a7757ef2b3fee2190a44a4f7d448707d23b /addons/project | |
| parent | 953a15d2a7391370414462402198780b06d45243 (diff) | |
| parent | 4e307d022c8fbdba848b8a4f57d668a4b6bd036f (diff) | |
[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rpa@tinyerp.com-20101216055348-7yrvv48hjq15grv9
Diffstat (limited to 'addons/project')
| -rw-r--r-- | addons/project/i18n/fr.po | 6 | ||||
| -rw-r--r-- | addons/project/i18n/project.pot | 50 | ||||
| -rw-r--r-- | addons/project/project.py | 34 | ||||
| -rw-r--r-- | addons/project/wizard/project_task_delegate.py | 2 |
4 files changed, 48 insertions, 44 deletions
diff --git a/addons/project/i18n/fr.po b/addons/project/i18n/fr.po index 42281cffd3a..548fe2f3c05 100644 --- a/addons/project/i18n/fr.po +++ b/addons/project/i18n/fr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2010-12-03 15:44+0000\n" -"PO-Revision-Date: 2010-11-30 16:41+0000\n" -"Last-Translator: Numérigraphe <Unknown>\n" +"PO-Revision-Date: 2010-12-15 03:18+0000\n" +"Last-Translator: OpenERP Administrators <Unknown>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-12-14 04:56+0000\n" +"X-Launchpad-Export-Date: 2010-12-15 04:39+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: project diff --git a/addons/project/i18n/project.pot b/addons/project/i18n/project.pot index 42cae0e9680..d999a94a51e 100644 --- a/addons/project/i18n/project.pot +++ b/addons/project/i18n/project.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 6.0.0-rc1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-12-03 15:44:18+0000\n" -"PO-Revision-Date: 2010-12-03 15:44:18+0000\n" +"POT-Creation-Date: 2010-12-15 15:06:08+0000\n" +"PO-Revision-Date: 2010-12-15 15:06:08+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -330,6 +330,11 @@ msgid "Mail Header" msgstr "" #. module: project +#: view:project.installer:0 +msgid "Configure Your Project Management Application" +msgstr "" + +#. module: project #: model:process.node,name:project.process_node_donetask0 msgid "Done task" msgstr "" @@ -399,8 +404,8 @@ msgid "Estimated time to close this task by the delegated user" msgstr "" #. module: project -#: field:project.task,work_ids:0 -msgid "Work done" +#: view:project.project:0 +msgid "Reactivate Project" msgstr "" #. module: project @@ -716,6 +721,11 @@ msgid "New title of the task delegated to the user" msgstr "" #. module: project +#: view:project.installer:0 +msgid "Various OpenERP applications are available to manage your projects with different level of control and flexibility." +msgstr "" + +#. module: project #: view:project.vs.hours:0 msgid "Project vs Planned and Total Hours" msgstr "" @@ -796,8 +806,8 @@ msgid "Project Management" msgstr "" #. module: project -#: field:project.installer,progress:0 -msgid "Configuration Progress" +#: selection:report.project.task.user,month:0 +msgid "August" msgstr "" #. module: project @@ -914,8 +924,8 @@ msgid "Gives the sequence order when displaying a list of task" msgstr "" #. module: project -#: field:project.project,warn_customer:0 -msgid "Warn Partner" +#: model:ir.actions.act_window,help:project.open_view_project_all +msgid "A project contains a set of tasks or issues that will be performed by your assigned personnel. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project's duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on. If you have personalized your Project application in order to invoice the time spent on a task, you can choose to invoice or not one project in the billing section." msgstr "" #. module: project @@ -1031,8 +1041,8 @@ msgid "Stages" msgstr "" #. module: project -#: selection:report.project.task.user,month:0 -msgid "August" +#: view:project.installer:0 +msgid "Configure" msgstr "" #. module: project @@ -1047,6 +1057,11 @@ msgid "New state of your own task. Pending will be reopened automatically when t msgstr "" #. module: project +#: field:project.project,warn_customer:0 +msgid "Warn Partner" +msgstr "" + +#. module: project #: selection:report.project.task.user,month:0 msgid "June" msgstr "" @@ -1173,8 +1188,8 @@ msgid "User's projects" msgstr "" #. module: project -#: view:project.project:0 -msgid "Reactivate Project" +#: field:project.installer,progress:0 +msgid "Configuration Progress" msgstr "" #. module: project @@ -1429,11 +1444,6 @@ msgid "Bill Time on Tasks" msgstr "" #. module: project -#: model:ir.actions.act_window,help:project.open_view_project_all -msgid "A project contains a set of tasks or issues that will be performed by your assigned personnel. A project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure with different phases spread over the project's duration cycle. Each user can set his default project in his own preferences, in order to filter automatically the tasks or issues he usually works on. If you have personalized your Project application in order to invoice the time spent on a task, you can choose to invoice or not one project in the billing section." -msgstr "" - -#. module: project #: view:board.board:0 msgid "My Remaining Hours by Project" msgstr "" @@ -1487,6 +1497,7 @@ msgstr "" #. module: project #: model:ir.actions.act_window,name:project.action_project_installer +#: view:project.installer:0 msgid "Project Application Configuration" msgstr "" @@ -1694,6 +1705,11 @@ msgid "Task '%s' cancelled" msgstr "" #. module: project +#: field:project.task,work_ids:0 +msgid "Work done" +msgstr "" + +#. module: project #: help:project.task.delegate,planned_hours_me:0 msgid "Estimated time for you to validate the work done by the user to whom you delegate this task" msgstr "" diff --git a/addons/project/project.py b/addons/project/project.py index 7aa94fba079..1df4b0dca96 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -104,16 +104,12 @@ class project(osv.osv): return res def _get_project_task(self, cr, uid, ids, context=None): - if context is None: - context = {} result = {} for task in self.pool.get('project.task').browse(cr, uid, ids, context=context): if task.project_id: result[task.project_id.id] = True return result.keys() def _get_project_work(self, cr, uid, ids, context=None): - if context is None: - context = {} result = {} for work in self.pool.get('project.task.work').browse(cr, uid, ids, context=context): if work.task_id and work.task_id.project_id: result[work.task_id.project_id.id] = True @@ -168,12 +164,12 @@ class project(osv.osv): } # TODO: Why not using a SQL contraints ? - def _check_dates(self, cr, uid, ids): - for leave in self.read(cr, uid, ids, ['date_start', 'date']): + def _check_dates(self, cr, uid, ids, context=None): + for leave in self.read(cr, uid, ids, ['date_start', 'date'], context=context): if leave['date_start'] and leave['date']: if leave['date_start'] > leave['date']: return False - return True + return True _constraints = [ (_check_dates, 'Error! project start-date must be lower then project end-date.', ['date_start', 'date']) @@ -382,8 +378,6 @@ class task(osv.osv): return res def _get_task(self, cr, uid, ids, context=None): - if context is None: - context = {} result = {} for work in self.pool.get('project.task.work').browse(cr, uid, ids, context=context): if work.task_id: result[work.task_id.id] = True @@ -451,8 +445,8 @@ class task(osv.osv): _order = "sequence, priority, date_start, id" - def _check_recursion(self, cr, uid, ids): - obj_task = self.browse(cr, uid, ids[0]) + def _check_recursion(self, cr, uid, ids, context=None): + obj_task = self.browse(cr, uid, ids[0], context=context) parent_ids = [x.id for x in obj_task.parent_ids] children_ids = [x.id for x in obj_task.child_ids] @@ -487,7 +481,7 @@ class task(osv.osv): # read uom as admin to avoid access rights issues, e.g. for portal/share users, # this should be safe (no context passed to avoid side-effects) - obj_tm = users_obj.browse(cr, 1, uid).company_id.project_time_mode_id + obj_tm = users_obj.browse(cr, 1, uid, context=context).company_id.project_time_mode_id tm = obj_tm and obj_tm.name or 'Hours' res = super(task, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu) @@ -537,8 +531,6 @@ class task(osv.osv): """ Close Task """ - if context is None: - context = {} request = self.pool.get('res.request') for task in self.browse(cr, uid, ids, context=context): project = task.project_id @@ -569,8 +561,6 @@ class task(osv.osv): return True def do_reopen(self, cr, uid, ids, context=None): - if context is None: - context = {} request = self.pool.get('res.request') for task in self.browse(cr, uid, ids, context=context): @@ -629,8 +619,6 @@ class task(osv.osv): """ Delegate Task to another users. """ - if context is None: - context = {} task = self.browse(cr, uid, task_id, context=context) new_task_id = self.copy(cr, uid, task.id, { 'name': delegate_data['name'], @@ -642,17 +630,17 @@ class task(osv.osv): 'description': delegate_data['new_task_description'] or '', 'child_ids': [], 'work_ids': [] - }, context) + }, context=context) newname = delegate_data['prefix'] or '' self.write(cr, uid, [task.id], { 'remaining_hours': delegate_data['planned_hours_me'], 'planned_hours': delegate_data['planned_hours_me'] + (task.effective_hours or 0.0), 'name': newname, - }, context) + }, context=context) if delegate_data['state'] == 'pending': self.do_pending(cr, uid, [task.id], context) else: - self.do_close(cr, uid, [task.id], context) + self.do_close(cr, uid, [task.id], context=context) user_pool = self.pool.get('res.users') delegate_user = user_pool.browse(cr, uid, delegate_data['user_id'], context=context) message = _("The task '%s' has been delegated to %s.") % (delegate_data['name'], delegate_user.name) @@ -715,11 +703,11 @@ class project_work(osv.osv): cr.execute('update project_task set remaining_hours=remaining_hours - %s where id=%s', (vals.get('hours',0.0), vals['task_id'])) return super(project_work,self).create(cr, uid, vals, *args, **kwargs) - def write(self, cr, uid, ids,vals,context={}): + def write(self, cr, uid, ids, vals, context=None): if 'hours' in vals and (not vals['hours']): vals['hours'] = 0.00 if 'hours' in vals: - for work in self.browse(cr, uid, ids, context): + for work in self.browse(cr, uid, ids, context=context): cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id)) return super(project_work,self).write(cr, uid, ids, vals, context) diff --git a/addons/project/wizard/project_task_delegate.py b/addons/project/wizard/project_task_delegate.py index 61fec536e50..72b32f7db68 100644 --- a/addons/project/wizard/project_task_delegate.py +++ b/addons/project/wizard/project_task_delegate.py @@ -79,7 +79,7 @@ class project_task_delegate(osv.osv_memory): def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): res = super(project_task_delegate, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu) users_pool = self.pool.get('res.users') - obj_tm = users_pool.browse(cr, uid, uid, context).company_id.project_time_mode_id + obj_tm = users_pool.browse(cr, uid, uid, context=context).company_id.project_time_mode_id tm = obj_tm and obj_tm.name or 'Hours' if tm in ['Hours','Hour']: return res |
