From f33ede7c6fc5c1321644a906f74bd2a9e5a15e2b Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Fri, 12 Aug 2011 15:47:42 +0530 Subject: [PATCH 01/49] [IMP] Project time shoudl consider it;s parents also bzr revid: jam@tinyerp.com-20110812101742-njb0418if0uhgbbw --- addons/project/project.py | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index b1461da424c..c474bb620ba 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -80,6 +80,16 @@ class project(osv.osv): pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False return {'value':{'contact_id': addr['contact'], 'pricelist_id': pricelist_id}} + def get_childs(self, cr, uid, ids, context=None): + cr.execute("""SELECT id FROM project_project WHERE analytic_account_id IN ( + SELECT id FROM account_analytic_account WHERE parent_id = ( + SELECT id FROM account_analytic_account WHERE id = ( + SELECT analytic_account_id FROM project_project WHERE id = %s + ) + ) + )"""%(ids)) + return cr.fetchall() + def _progress_rate(self, cr, uid, ids, names, arg, context=None): res = {}.fromkeys(ids, 0.0) if not ids: @@ -93,14 +103,31 @@ class project(osv.osv): state<>'cancelled' GROUP BY project_id''', (tuple(ids),)) - progress = dict(map(lambda x: (x[0], (x[1],x[2],x[3],x[4])), cr.fetchall())) + progress = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) for project in self.browse(cr, uid, ids, context=context): - s = progress.get(project.id, (0.0,0.0,0.0,0.0)) + childs = self.get_childs( cr, uid, project.id, context) + project_ids = [project.id] + if childs: + project_ids += [ child[0] for child in childs ] res[project.id] = { - 'planned_hours': s[0], - 'effective_hours': s[2], - 'total_hours': s[1], - 'progress_rate': s[1] and round(100.0*s[2]/s[1],2) or 0.0 + 'planned_hours':0.0, + 'effective_hours': 0.0, + 'total_hours': 0.0, + 'progress_rate':0.0 + } + planned_hours, effective_hours, total_hours= 0.0, 0.0,0.0 + for child in project_ids: + s = progress.get(child, (0.0,0.0,0.0,0.0)) + planned_hours, effective_hours, total_hours = planned_hours+s[0] or 0.0, effective_hours+s[2] or 0.0, total_hours+s[1] or 0.0 + if planned_hours == 0: + rnd = 0.0 + else: + rnd = round((effective_hours/planned_hours)*100,2) or 0.0 + res[project.id] = { + 'planned_hours': res.get(project.id).get('planned_hours')+ planned_hours, + 'effective_hours': res.get(project.id).get('effective_hours')+ effective_hours, + 'total_hours': res.get(project.id).get('total_hours')+ total_hours, + 'progress_rate': rnd } return res From aad408531416354fafbedce2ff883382bce2a51d Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Fri, 12 Aug 2011 16:03:54 +0530 Subject: [PATCH 02/49] imporved injection sql bzr revid: jam@tinyerp.com-20110812103354-0mo9szu5u7wzr3zn --- addons/project/project.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index c474bb620ba..762ad6add8c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -82,12 +82,12 @@ class project(osv.osv): def get_childs(self, cr, uid, ids, context=None): cr.execute("""SELECT id FROM project_project WHERE analytic_account_id IN ( - SELECT id FROM account_analytic_account WHERE parent_id = ( - SELECT id FROM account_analytic_account WHERE id = ( - SELECT analytic_account_id FROM project_project WHERE id = %s - ) - ) - )"""%(ids)) + SELECT id FROM account_analytic_account WHERE parent_id = ( + SELECT analytic_account_id FROM project_project project + LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id + WHERE project.id = %s + ) + )"""%(ids)) return cr.fetchall() def _progress_rate(self, cr, uid, ids, names, arg, context=None): From 65051f36952efe2997b9d5e6e306ce657ec34739 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Tue, 27 Sep 2011 15:55:14 +0530 Subject: [PATCH 03/49] [FIX] project - returnof the store bzr revid: jam@tinyerp.com-20110927102514-rge1jer11yyznttx --- addons/project/project.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index 136008aef79..1b728b538d1 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -133,7 +133,12 @@ class project(osv.osv): def _get_project_task(self, cr, uid, ids, context=None): 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 + if task.project_id: + result[task.project_id.id] = True + if task.project_id.parent_id: + cr.execute('''SELECT id FROM project_project WHERE analytic_account_id = '%s' '''%task.project_id.parent_id.id) + for parent in cr.fetchall(): + result[parent[0]] = True return result.keys() def _get_project_work(self, cr, uid, ids, context=None): From 1a4a2b4dd8feb0e7d861eae0656b60e0d6e4cdcf Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Wed, 28 Sep 2011 18:30:33 +0530 Subject: [PATCH 04/49] [FIX] project - calcaulting parent child caluesonchnage of task and parent_id bzr revid: jam@tinyerp.com-20110928130033-el7n8edu0erp95b6 --- addons/project/project.py | 81 ++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 27 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 1b728b538d1..99ec9df8db5 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -79,20 +79,37 @@ class project(osv.osv): pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False return {'value':{'contact_id': addr['contact'], 'pricelist_id': pricelist_id}} - def get_childs(self, cr, uid, ids, context=None): + def _get_childs(self, cr, uid, ids, childs,context=None): cr.execute("""SELECT id FROM project_project WHERE analytic_account_id IN ( SELECT id FROM account_analytic_account WHERE parent_id = ( SELECT analytic_account_id FROM project_project project LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id WHERE project.id = %s ) - )"""%(ids)) - return cr.fetchall() + )"""%(ids)) + for child in cr.fetchall(): + if child: + if child[0] not in childs: childs.append(child[0]) + self._get_childs( cr, uid, child[0], childs,context) + return childs + + + def _get_parents(self, cr, uid, ids, parents,context=None): + for project in self.read(cr, uid, ids, ['id', 'parent_id'],context): + if project.get('parent_id'): + cr.execute('''SELECT id FROM project_project WHERE analytic_account_id = '%s' '''%project.get('parent_id')[0]) + for child in cr.fetchall(): + if child[0] not in parents: parents.append(child[0]) + child_rec= self.read(cr, uid, child[0], ['id', 'parent_id'],context) + if child_rec.get('parent_id'): + parents = self._get_parents(cr, uid, [child[0]], parents,context) + return parents def _progress_rate(self, cr, uid, ids, names, arg, context=None): res = {}.fromkeys(ids, 0.0) if not ids: return res + parents = self._get_parents(cr, uid, ids, ids,context) cr.execute('''SELECT project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) FROM @@ -103,31 +120,41 @@ class project(osv.osv): GROUP BY project_id''', (tuple(ids),)) progress = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) - for project in self.browse(cr, uid, ids, context=context): - childs = self.get_childs( cr, uid, project.id, context) - project_ids = [project.id] - if childs: - project_ids += [ child[0] for child in childs ] + for project in self.browse(cr, uid, parents, context=context): + childs = [] + childs = self._get_childs(cr, uid, project.id, childs,context) + s = progress.get(project.id, (0.0,0.0,0.0,0.0)) res[project.id] = { - 'planned_hours':0.0, - 'effective_hours': 0.0, - 'total_hours': 0.0, - 'progress_rate':0.0 + 'planned_hours': s[0], + 'effective_hours': s[2], + 'total_hours': s[1], + 'progress_rate': s[1] and round(100.0*s[2]/s[1],2) or 0.0 } planned_hours, effective_hours, total_hours= 0.0, 0.0,0.0 - for child in project_ids: - s = progress.get(child, (0.0,0.0,0.0,0.0)) - planned_hours, effective_hours, total_hours = planned_hours+s[0] or 0.0, effective_hours+s[2] or 0.0, total_hours+s[1] or 0.0 - if planned_hours == 0: - rnd = 0.0 - else: - rnd = round((effective_hours/planned_hours)*100,2) or 0.0 - res[project.id] = { - 'planned_hours': res.get(project.id).get('planned_hours')+ planned_hours, - 'effective_hours': res.get(project.id).get('effective_hours')+ effective_hours, - 'total_hours': res.get(project.id).get('total_hours')+ total_hours, - 'progress_rate': rnd - } + if childs: + cr.execute('''SELECT + project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) + FROM + project_task + WHERE + project_id in %s AND + state<>'cancelled' + GROUP BY + project_id''', (tuple(childs),)) + progress2 = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) + for child in childs: + s2 = progress2.get(child, (0.0,0.0,0.0,0.0)) + planned_hours, effective_hours, total_hours = planned_hours+s2[0], effective_hours+s2[2] , total_hours+s2[1] + if planned_hours == 0: + rnd = 0.0 + else: + rnd = round((effective_hours/planned_hours)*100,2) or 0.0 + res[project.id] = { + 'planned_hours': res.get(project.id).get('planned_hours')+ planned_hours, + 'effective_hours': res.get(project.id).get('effective_hours')+ effective_hours, + 'total_hours': res.get(project.id).get('total_hours')+ total_hours, + 'progress_rate': res.get(project.id).get('progress_rate')+ rnd + } return res def _get_project_task(self, cr, uid, ids, context=None): @@ -166,13 +193,13 @@ class project(osv.osv): 'tasks': fields.one2many('project.task', 'project_id', "Project tasks"), 'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store = { - 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks'], 10), + 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks', 'parent_id'], 10), 'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours','state'], 10), }), 'effective_hours': fields.function(_progress_rate, multi="progress", string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects."), 'total_hours': fields.function(_progress_rate, multi="progress", string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects.", store = { - 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks'], 10), + 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks','parent_id'], 10), 'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours','state'], 10), }), 'progress_rate': fields.function(_progress_rate, multi="progress", string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo."), From 66f7f0ac91b9419c959e19a927bd2e91630692ca Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Mon, 3 Oct 2011 11:44:54 +0530 Subject: [PATCH 05/49] [FIX] project added child in fields.function trigger bzr revid: jam@tinyerp.com-20111003061454-aoakxovqrw9uxtl8 --- addons/project/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index e8c1d96be89..8b13955b803 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -193,13 +193,13 @@ class project(osv.osv): 'tasks': fields.one2many('project.task', 'project_id', "Project tasks"), 'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store = { - 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks', 'parent_id'], 10), + 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks', 'parent_id', 'child_ids'], 10), 'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours','state'], 10), }), 'effective_hours': fields.function(_progress_rate, multi="progress", string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects."), 'total_hours': fields.function(_progress_rate, multi="progress", string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects.", store = { - 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks','parent_id'], 10), + 'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks','parent_id', 'child_ids'], 10), 'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours','state'], 10), }), 'progress_rate': fields.function(_progress_rate, multi="progress", string='Progress', type='float', group_operator="avg", help="Percent of tasks closed according to the total of tasks todo."), From eb0dfa2555ed939468d32e230d9f19850657371b Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Mon, 3 Oct 2011 15:17:19 +0530 Subject: [PATCH 06/49] [FIX] cide usabality bzr revid: jam@tinyerp.com-20111003094719-c3tepdje2wd81xyb --- addons/project/project.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 8b13955b803..1fb828c78d4 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -88,9 +88,8 @@ class project(osv.osv): ) )"""%(ids)) for child in cr.fetchall(): - if child: - if child[0] not in childs: childs.append(child[0]) - self._get_childs( cr, uid, child[0], childs,context) + if child[0] not in childs: childs.append(child[0]) + self._get_childs( cr, uid, child[0], childs,context) return childs @@ -130,7 +129,7 @@ class project(osv.osv): 'total_hours': s[1], 'progress_rate': s[1] and round(100.0*s[2]/s[1],2) or 0.0 } - planned_hours, effective_hours, total_hours= 0.0, 0.0,0.0 + if childs: cr.execute('''SELECT project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) @@ -141,19 +140,18 @@ class project(osv.osv): state<>'cancelled' GROUP BY project_id''', (tuple(childs),)) - progress2 = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) + child_progress = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) + planned_hours, effective_hours, total_hours, rnd= 0.0, 0.0,0.0, 0.0 for child in childs: - s2 = progress2.get(child, (0.0,0.0,0.0,0.0)) - planned_hours, effective_hours, total_hours = planned_hours+s2[0], effective_hours+s2[2] , total_hours+s2[1] - if planned_hours == 0: - rnd = 0.0 - else: - rnd = round((effective_hours/planned_hours)*100,2) or 0.0 + ch_vals = child_progress.get(child, (0.0,0.0,0.0,0.0)) + planned_hours, effective_hours, total_hours = planned_hours+ch_vals[0], effective_hours+ch_vals[2] , total_hours+ch_vals[1] + if res.get(project.id).get('planned_hours')+ planned_hours > 0: + rnd = round(( res.get(project.id).get('effective_hours')+effective_hours)/(res.get(project.id).get('planned_hours')+ planned_hours)*100,2) or 0.0 res[project.id] = { 'planned_hours': res.get(project.id).get('planned_hours')+ planned_hours, 'effective_hours': res.get(project.id).get('effective_hours')+ effective_hours, 'total_hours': res.get(project.id).get('total_hours')+ total_hours, - 'progress_rate': res.get(project.id).get('progress_rate')+ rnd + 'progress_rate': rnd } return res From b839539b83dcc7f2eee9f4885186a64f6fe4e056 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Wed, 30 Nov 2011 16:38:52 +0530 Subject: [PATCH 07/49] [FIX] ActiveId Ref on New Task When from Project>Tasks act_window and Query Code refectoring bzr revid: jam@tinyerp.com-20111130110852-ox1y0dfnvvmc44yx --- addons/project/project.py | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 9b588e88659..466c937ac6f 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -109,20 +109,18 @@ class project(osv.osv): parents = self._get_parents(cr, uid, [child[0]], parents,context) return parents + def _get_project(self,cr, ids): + cr.execute('''SELECT project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) + FROM project_task WHERE project_id in %s AND state<>'cancelled' + GROUP BY project_id''', (tuple(ids),)) + return cr + def _progress_rate(self, cr, uid, ids, names, arg, context=None): res = {}.fromkeys(ids, 0.0) if not ids: return res parents = self._get_parents(cr, uid, ids, ids,context) - cr.execute('''SELECT - project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) - FROM - project_task - WHERE - project_id in %s AND - state<>'cancelled' - GROUP BY - project_id''', (tuple(ids),)) + cr = self._get_project(cr,ids) progress = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) for project in self.browse(cr, uid, parents, context=context): childs = [] @@ -136,15 +134,7 @@ class project(osv.osv): } if childs: - cr.execute('''SELECT - project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours) - FROM - project_task - WHERE - project_id in %s AND - state<>'cancelled' - GROUP BY - project_id''', (tuple(childs),)) + cr = self._get_project(cr, childs) child_progress = dict(map(lambda x: (x[0], (x[1] or 0.0 ,x[2] or 0.0 ,x[3] or 0.0 ,x[4] or 0.0)), cr.fetchall())) planned_hours, effective_hours, total_hours, rnd= 0.0, 0.0,0.0, 0.0 for child in childs: @@ -588,8 +578,8 @@ class task(osv.osv): def _default_project(self, cr, uid, context=None): if context is None: context = {} - if 'project_id' in context and context['project_id']: - return int(context['project_id']) + if 'default_project_id' in context and context['default_project_id']: + return int(context['default_project_id']) return False def duplicate_task(self, cr, uid, map_ids, context=None): From 6d1cf5dc29ad4739e69817317ff9bac553710818 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Fri, 2 Dec 2011 14:13:12 +0530 Subject: [PATCH 08/49] [FIX] project: Change the help of dealy hours lp bug: https://launchpad.net/bugs/898644 fixed bzr revid: kjo@tinyerp.com-20111202084312-qofmgnjmwicko9wi --- addons/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index abebd2d35ff..742681cf1c3 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -625,7 +625,7 @@ class task(osv.osv): 'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours','state'], 10), 'project.task.work': (_get_task, ['hours'], 10), }), - 'delay_hours': fields.function(_hours_get, string='Delay Hours', multi='hours', help="Computed as difference of the time estimated by the project manager and the real time to close the task.", + 'delay_hours': fields.function(_hours_get, string='Delay Hours', multi='hours', help="Computed as difference between planned hours by the project manager and the total hours of the task.", store = { 'project.task': (lambda self, cr, uid, ids, c={}: ids, ['work_ids', 'remaining_hours', 'planned_hours'], 10), 'project.task.work': (_get_task, ['hours'], 10), From 79942408d1935e863091765ec7485fce87e2250a Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Mon, 5 Dec 2011 16:59:11 +0530 Subject: [PATCH 09/49] [FIX] project: delay hours help text change in project.pot bzr revid: kjo@tinyerp.com-20111205112911-nbwvyc0ynabrqhwa --- addons/project/i18n/project.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/i18n/project.pot b/addons/project/i18n/project.pot index 3566e54b5aa..9d5c6c7d2b1 100644 --- a/addons/project/i18n/project.pot +++ b/addons/project/i18n/project.pot @@ -1440,7 +1440,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 -msgid "Computed as difference of the time estimated by the project manager and the real time to close the task." +msgid "Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project From d82624a20b80170c2f9ec7b1c0b01af88c2e043e Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Mon, 5 Dec 2011 17:46:25 +0530 Subject: [PATCH 10/49] [FIX] project: delay hours help text change in po file bzr revid: kjo@tinyerp.com-20111205121625-b6wprh41kilh9hvb --- addons/project/i18n/ar.po | 3 +-- addons/project/i18n/bg.po | 3 +-- addons/project/i18n/bs.po | 3 +-- addons/project/i18n/ca.po | 3 +-- addons/project/i18n/cs.po | 3 +-- addons/project/i18n/de.po | 3 +-- addons/project/i18n/el.po | 3 +-- addons/project/i18n/es.po | 3 +-- addons/project/i18n/es_AR.po | 3 +-- addons/project/i18n/es_EC.po | 3 +-- addons/project/i18n/es_MX.po | 3 +-- addons/project/i18n/es_PY.po | 3 +-- addons/project/i18n/es_VE.po | 3 +-- addons/project/i18n/et.po | 3 +-- addons/project/i18n/eu.po | 3 +-- addons/project/i18n/fi.po | 3 +-- addons/project/i18n/fr.po | 3 +-- addons/project/i18n/gl.po | 3 +-- addons/project/i18n/hr.po | 3 +-- addons/project/i18n/hu.po | 3 +-- addons/project/i18n/id.po | 3 +-- addons/project/i18n/it.po | 3 +-- addons/project/i18n/ko.po | 3 +-- addons/project/i18n/lt.po | 3 +-- addons/project/i18n/lv.po | 3 +-- addons/project/i18n/mn.po | 3 +-- addons/project/i18n/nb.po | 3 +-- addons/project/i18n/nl.po | 3 +-- addons/project/i18n/nl_BE.po | 3 +-- addons/project/i18n/pl.po | 3 +-- addons/project/i18n/pt.po | 3 +-- addons/project/i18n/pt_BR.po | 3 +-- addons/project/i18n/ro.po | 3 +-- addons/project/i18n/ru.po | 3 +-- addons/project/i18n/sk.po | 3 +-- addons/project/i18n/sl.po | 3 +-- addons/project/i18n/sq.po | 3 +-- addons/project/i18n/sv.po | 3 +-- addons/project/i18n/tlh.po | 3 +-- addons/project/i18n/tr.po | 3 +-- addons/project/i18n/uk.po | 3 +-- addons/project/i18n/vi.po | 3 +-- addons/project/i18n/zh_CN.po | 3 +-- addons/project/i18n/zh_TW.po | 3 +-- 44 files changed, 44 insertions(+), 88 deletions(-) diff --git a/addons/project/i18n/ar.po b/addons/project/i18n/ar.po index 20c0766fe08..1acd3fe4a9d 100644 --- a/addons/project/i18n/ar.po +++ b/addons/project/i18n/ar.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/bg.po b/addons/project/i18n/bg.po index 71eea6d0e77..811d474f55a 100644 --- a/addons/project/i18n/bg.po +++ b/addons/project/i18n/bg.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/bs.po b/addons/project/i18n/bs.po index 4211107d667..2bd47395016 100644 --- a/addons/project/i18n/bs.po +++ b/addons/project/i18n/bs.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/ca.po b/addons/project/i18n/ca.po index f41bf9ec9b5..90f3c12b1dc 100644 --- a/addons/project/i18n/ca.po +++ b/addons/project/i18n/ca.po @@ -1579,8 +1579,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculat com la diferència del temps previst pel responsable del projecte i " "el temps real per tancar la tasca." diff --git a/addons/project/i18n/cs.po b/addons/project/i18n/cs.po index 4648ea77aae..3192bf8ebe2 100644 --- a/addons/project/i18n/cs.po +++ b/addons/project/i18n/cs.po @@ -1534,8 +1534,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Spočítá rozdíl odhadovaného času vedoucím projektu a skutečným časem do " "uzavření úkolu." diff --git a/addons/project/i18n/de.po b/addons/project/i18n/de.po index 739be62dda6..f2a4d676e73 100644 --- a/addons/project/i18n/de.po +++ b/addons/project/i18n/de.po @@ -1576,8 +1576,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Berechnung durch die Differenz der geplanten Zeit und der tatsächlich " "benötigten Zeit." diff --git a/addons/project/i18n/el.po b/addons/project/i18n/el.po index 5e9c0753d8c..3e0448c7a74 100644 --- a/addons/project/i18n/el.po +++ b/addons/project/i18n/el.po @@ -1521,8 +1521,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/es.po b/addons/project/i18n/es.po index 3cd989e1ca1..5a67a6ff1b1 100644 --- a/addons/project/i18n/es.po +++ b/addons/project/i18n/es.po @@ -1575,8 +1575,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculado como la diferencia del tiempo estimado por el responsable del " "proyecto y el tiempo real para cerrar la tarea." diff --git a/addons/project/i18n/es_AR.po b/addons/project/i18n/es_AR.po index 2fd1d382cc0..a2ff96f22ca 100644 --- a/addons/project/i18n/es_AR.po +++ b/addons/project/i18n/es_AR.po @@ -1519,8 +1519,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/es_EC.po b/addons/project/i18n/es_EC.po index 6c53b21aa72..ec2c6c99d03 100644 --- a/addons/project/i18n/es_EC.po +++ b/addons/project/i18n/es_EC.po @@ -1571,8 +1571,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculado como diferencia del tiempo estimado por administrador de proyecto\n" " y el tiempo real para cerrar la tarea." diff --git a/addons/project/i18n/es_MX.po b/addons/project/i18n/es_MX.po index 22b2e410bcb..2e854f3424a 100644 --- a/addons/project/i18n/es_MX.po +++ b/addons/project/i18n/es_MX.po @@ -1576,8 +1576,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculado como la diferencia del tiempo estimado por el responsable del " "proyecto y el tiempo real para cerrar la tarea." diff --git a/addons/project/i18n/es_PY.po b/addons/project/i18n/es_PY.po index ca5ae97a3af..74d4cecf489 100644 --- a/addons/project/i18n/es_PY.po +++ b/addons/project/i18n/es_PY.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/es_VE.po b/addons/project/i18n/es_VE.po index 22b2e410bcb..2e854f3424a 100644 --- a/addons/project/i18n/es_VE.po +++ b/addons/project/i18n/es_VE.po @@ -1576,8 +1576,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculado como la diferencia del tiempo estimado por el responsable del " "proyecto y el tiempo real para cerrar la tarea." diff --git a/addons/project/i18n/et.po b/addons/project/i18n/et.po index 8313b419ba2..3848ea728b5 100644 --- a/addons/project/i18n/et.po +++ b/addons/project/i18n/et.po @@ -1513,8 +1513,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/eu.po b/addons/project/i18n/eu.po index 78b39b6dea1..dbf9f0d83cb 100644 --- a/addons/project/i18n/eu.po +++ b/addons/project/i18n/eu.po @@ -1502,8 +1502,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/fi.po b/addons/project/i18n/fi.po index 3db27c29f88..01f8c628367 100644 --- a/addons/project/i18n/fi.po +++ b/addons/project/i18n/fi.po @@ -1529,8 +1529,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Laskettu erotuksena projektipäällikön arvion ja projektin valmistumiseen " "kuluneen todellisen ajan mukaan" diff --git a/addons/project/i18n/fr.po b/addons/project/i18n/fr.po index 6b57de99e8f..52374ca7a0f 100644 --- a/addons/project/i18n/fr.po +++ b/addons/project/i18n/fr.po @@ -1587,8 +1587,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calcul correspondant à la différence entre le temps estimé par le " "Responsable Projet et le temps réel pour fermer la tâche" diff --git a/addons/project/i18n/gl.po b/addons/project/i18n/gl.po index 7052dc0db8a..8a6eb7bf7aa 100644 --- a/addons/project/i18n/gl.po +++ b/addons/project/i18n/gl.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/hr.po b/addons/project/i18n/hr.po index efc9c66ee4a..3e2070d26d1 100644 --- a/addons/project/i18n/hr.po +++ b/addons/project/i18n/hr.po @@ -1513,8 +1513,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/hu.po b/addons/project/i18n/hu.po index 08777fcc511..5c92f3f349e 100644 --- a/addons/project/i18n/hu.po +++ b/addons/project/i18n/hu.po @@ -1572,8 +1572,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "A projektmenedzser által becsült idő és a feladat lezárásához szükséges " "tényleges idő különbözeteként kerül kiszámításra." diff --git a/addons/project/i18n/id.po b/addons/project/i18n/id.po index 870ccf889a2..4f0c7020b32 100644 --- a/addons/project/i18n/id.po +++ b/addons/project/i18n/id.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/it.po b/addons/project/i18n/it.po index d03192323bb..2d9286f0e82 100644 --- a/addons/project/i18n/it.po +++ b/addons/project/i18n/it.po @@ -1578,8 +1578,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calcolato come la differenza fra il tempo stimato dal project manager ed il " "tempo reale impiegato per concludere l'attività." diff --git a/addons/project/i18n/ko.po b/addons/project/i18n/ko.po index 29f6944390c..cca514337aa 100644 --- a/addons/project/i18n/ko.po +++ b/addons/project/i18n/ko.po @@ -1503,8 +1503,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/lt.po b/addons/project/i18n/lt.po index b9595c015ff..fdca59d52a4 100644 --- a/addons/project/i18n/lt.po +++ b/addons/project/i18n/lt.po @@ -1517,8 +1517,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/lv.po b/addons/project/i18n/lv.po index 3dbe0406fbd..bc73af27250 100644 --- a/addons/project/i18n/lv.po +++ b/addons/project/i18n/lv.po @@ -1565,8 +1565,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Tiek aprēķināts kā starpība starp projektu vadītāja novērtēto un reālo " "uzdevuma pabeigšanas laiku." diff --git a/addons/project/i18n/mn.po b/addons/project/i18n/mn.po index ef864360d05..74e7f85bb6c 100644 --- a/addons/project/i18n/mn.po +++ b/addons/project/i18n/mn.po @@ -1505,8 +1505,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/nb.po b/addons/project/i18n/nb.po index 2cba8c54a3e..12a173d1571 100644 --- a/addons/project/i18n/nb.po +++ b/addons/project/i18n/nb.po @@ -1524,8 +1524,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Beregnet som: Total tid - estimert tid. Det gir differansen mellom tiden " "estimert av prosjektlederen og den reelle tiden det tok å fullføre oppgaven." diff --git a/addons/project/i18n/nl.po b/addons/project/i18n/nl.po index 8a4c2a29018..41bff4470d7 100644 --- a/addons/project/i18n/nl.po +++ b/addons/project/i18n/nl.po @@ -1569,8 +1569,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Berekend als het verschil tussen de door de project manager geschatte tijd " "en de werkelijke tijd tot sluiting van de taak." diff --git a/addons/project/i18n/nl_BE.po b/addons/project/i18n/nl_BE.po index f8e11682628..d54a5ea03ed 100644 --- a/addons/project/i18n/nl_BE.po +++ b/addons/project/i18n/nl_BE.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/pl.po b/addons/project/i18n/pl.po index a56ebf019c4..e2099f45b18 100644 --- a/addons/project/i18n/pl.po +++ b/addons/project/i18n/pl.po @@ -1560,8 +1560,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Obliczone jako różnica pomiędzy czasem szacowanym przez menedżera, a " "rzeczywistym czasem do zamknięcia zadania." diff --git a/addons/project/i18n/pt.po b/addons/project/i18n/pt.po index 268534e898c..0622ba21729 100644 --- a/addons/project/i18n/pt.po +++ b/addons/project/i18n/pt.po @@ -1516,8 +1516,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/pt_BR.po b/addons/project/i18n/pt_BR.po index 3ba453713f0..18af2aa08af 100644 --- a/addons/project/i18n/pt_BR.po +++ b/addons/project/i18n/pt_BR.po @@ -1572,8 +1572,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" "Calculado como diferença de tempo estimado pelo gerente de projetos e o " "tempo real para concluir a tarefa." diff --git a/addons/project/i18n/ro.po b/addons/project/i18n/ro.po index 094d3feb7e0..dfc7d31684a 100644 --- a/addons/project/i18n/ro.po +++ b/addons/project/i18n/ro.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/ru.po b/addons/project/i18n/ru.po index 679d33f190f..f134a44f214 100644 --- a/addons/project/i18n/ru.po +++ b/addons/project/i18n/ru.po @@ -1519,8 +1519,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/sk.po b/addons/project/i18n/sk.po index 85c7e6fb429..9aa0a1abc34 100644 --- a/addons/project/i18n/sk.po +++ b/addons/project/i18n/sk.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/sl.po b/addons/project/i18n/sl.po index 9655b687ef9..63906cf7d56 100644 --- a/addons/project/i18n/sl.po +++ b/addons/project/i18n/sl.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/sq.po b/addons/project/i18n/sq.po index 780b30c2413..d7f9252eaae 100644 --- a/addons/project/i18n/sq.po +++ b/addons/project/i18n/sq.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/sv.po b/addons/project/i18n/sv.po index d73ac6923fa..3209e4a6ada 100644 --- a/addons/project/i18n/sv.po +++ b/addons/project/i18n/sv.po @@ -1513,8 +1513,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/tlh.po b/addons/project/i18n/tlh.po index 56577ced268..e4aac792d17 100644 --- a/addons/project/i18n/tlh.po +++ b/addons/project/i18n/tlh.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/tr.po b/addons/project/i18n/tr.po index 8253777bedf..082bcb747cf 100644 --- a/addons/project/i18n/tr.po +++ b/addons/project/i18n/tr.po @@ -1505,8 +1505,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/uk.po b/addons/project/i18n/uk.po index de752130814..54cddbc8891 100644 --- a/addons/project/i18n/uk.po +++ b/addons/project/i18n/uk.po @@ -1497,8 +1497,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/vi.po b/addons/project/i18n/vi.po index e3acf3c2c37..6167475c56a 100644 --- a/addons/project/i18n/vi.po +++ b/addons/project/i18n/vi.po @@ -1498,8 +1498,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project diff --git a/addons/project/i18n/zh_CN.po b/addons/project/i18n/zh_CN.po index 26e66ac4198..55d28f76c28 100644 --- a/addons/project/i18n/zh_CN.po +++ b/addons/project/i18n/zh_CN.po @@ -1512,8 +1512,7 @@ msgstr "本项目和相关项目的任务实际花费的小时数合计" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "计算公式为:项目经理估算的时间和实际花费的时间的差" #. module: project diff --git a/addons/project/i18n/zh_TW.po b/addons/project/i18n/zh_TW.po index 008442910bb..1772eff4a79 100644 --- a/addons/project/i18n/zh_TW.po +++ b/addons/project/i18n/zh_TW.po @@ -1501,8 +1501,7 @@ msgstr "" #. module: project #: help:project.task,delay_hours:0 msgid "" -"Computed as difference of the time estimated by the project manager and the " -"real time to close the task." +"Computed as difference between planned hours by the project manager and the total hours of the task." msgstr "" #. module: project From 61c3841ed72f765d0d723620fb9579af91484438 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 17 Jan 2012 18:21:53 +0100 Subject: [PATCH 11/49] [MRG] from c2c swiss localization bzr revid: yannick.vaucher@camptocamp.com-20120117172153-elginy094q5rvt7s --- addons/l10n_ch/bank.py | 45 ++++++++++++- addons/l10n_ch/demo/demo.xml | 2 +- addons/l10n_ch/demo/dta_demo.xml | 2 +- addons/l10n_ch/report/report_webkit_html.py | 22 +++--- addons/l10n_ch/wizard/bvr_import.py | 5 +- addons/l10n_ch/wizard/create_dta.py | 74 +++++++++++++++++---- addons/l10n_ch/wizard/create_dta_view.xml | 4 +- 7 files changed, 120 insertions(+), 34 deletions(-) diff --git a/addons/l10n_ch/bank.py b/addons/l10n_ch/bank.py index fd69dec625f..ac57eca8903 100644 --- a/addons/l10n_ch/bank.py +++ b/addons/l10n_ch/bank.py @@ -21,6 +21,7 @@ from tools.translate import _ from osv import fields, osv +import re class Bank(osv.osv): """Inherit res.bank class in order to add swiss specific field""" @@ -42,8 +43,8 @@ class ResPartnerBank(osv.osv): _columns = { 'name': fields.char('Description', size=128, required=True), - 'post_number': fields.char('Post number', size=64), - 'bvr_adherent_num': fields.char('BVR adherent number', size=11), + 'post_number': fields.char('Post number', size=64, help="Postal number 0x-xxxxxx-x or xxxxx"), + 'bvr_adherent_num': fields.char('Bank BVR adherent number', size=11, help="Your Bank adherent number to be printed in references of your BVR. This is not a postal account number."), 'dta_code': fields.char('DTA code', size=5), 'print_bank': fields.boolean('Print Bank on BVR'), 'print_account': fields.boolean('Print Account Number on BVR'), @@ -69,10 +70,48 @@ class ResPartnerBank(osv.osv): def _prepare_name(self, bank): "Hook to get bank number of bank account" res = super(ResPartnerBank, self)._prepare_name(bank) + res = res or u'' if bank.post_number: - res = u"%s - %s" % (res, bank.post_number) + if res: + res = u"%s - %s" % (res, bank.post_number) + else: + res = bank.post_number return res + def _check_9_pos_postal_num(self, number): + """ + check if a postal number in format xx-xxxxxx-x is correct, + return true if it matches the pattern + and if check sum mod10 is ok + """ + from tools import mod10r + pattern = r'^[0-9]{2}-[0-9]{1,6}-[0-9]$' + if not re.search(pattern, number): + return False + num, checksum = (number.replace('-','')[:-1], number[-1:]) + return mod10r(num)[-1:] == checksum + + + def _check_5_pos_postal_num(self, number): + """ + check if a postal number on 5 positions is correct + """ + pattern = r'^[0-9]{1,5}$' + if not re.search(pattern, number): + return False + return True + + def _check_postal_num(self, cursor, uid, ids): + banks = self.browse(cursor, uid, ids) + for b in banks: + return self._check_9_pos_postal_num(b.post_number) or \ + self._check_5_pos_postal_num(b.post_number) + + + _constraints = [(_check_postal_num, + 'Please enter a correct postal number. (01-23456-5 or 12345)', + ['post_number'])] + _sql_constraints = [('bvr_adherent_uniq', 'unique (bvr_adherent_num)', 'The BVR adherent number must be unique !')] diff --git a/addons/l10n_ch/demo/demo.xml b/addons/l10n_ch/demo/demo.xml index fbe09024966..f13546150b3 100644 --- a/addons/l10n_ch/demo/demo.xml +++ b/addons/l10n_ch/demo/demo.xml @@ -11,7 +11,7 @@ 11-1234-1 bvrbank - 11-1234-1 + 70-004152-8 0000000 diff --git a/addons/l10n_ch/demo/dta_demo.xml b/addons/l10n_ch/demo/dta_demo.xml index cdddb0d7a74..4f44ad21cc0 100644 --- a/addons/l10n_ch/demo/dta_demo.xml +++ b/addons/l10n_ch/demo/dta_demo.xml @@ -12,7 +12,7 @@ 123456 bvrbank - 234567 + 01-23456-5 diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py index 8b179e7ae58..e6f7239c4e4 100644 --- a/addons/l10n_ch/report/report_webkit_html.py +++ b/addons/l10n_ch/report/report_webkit_html.py @@ -124,28 +124,24 @@ class l10n_ch_report_webkit_html(report_sxw.rml_parse): invoice_obj = pool.get('account.invoice') ids = invoice_ids for invoice in invoice_obj.browse(cursor, self.uid, ids): + invoice_name = "%s %s" %(invoice.name, invoice.number) if not invoice.partner_bank_id: raise except_osv(_('UserError'), - _('No bank specified on invoice:\n' + \ - invoice_obj.name_get(cursor, self.uid, [invoice.id], - context={})[0][1])) + _('No bank specified on invoice:\n%s' %(invoice_name))) if not self._compile_check_bvr.match( invoice.partner_bank_id.post_number or ''): raise except_osv(_('UserError'), - _('Your bank BVR number should be of the form 0X-XXX-X! ' + - 'Please check your company ' + - 'information for the invoice:\n' + - invoice_obj.name_get(cursor, self.uid, [invoice.id], - context={})[0][1])) + _(('Your bank BVR number should be of the form 0X-XXX-X! ' + 'Please check your company ' + 'information for the invoice:\n%s') + %(invoice_name))) if invoice.partner_bank_id.bvr_adherent_num \ and not self._compile_check_bvr_add_num.match( invoice.partner_bank_id.bvr_adherent_num): raise except_osv(_('UserError'), - _('Your bank BVR adherent number must contain exactly seven' + - 'digits!\nPlease check your company ' + - 'information for the invoice:\n' + - invoice_obj.name_get(cursor, self.uid, [invoice.id], - context={})[0][1])) + _(('Your bank BVR adherent number must contain only ' + 'digits!\nPlease check your company ' + 'information for the invoice:\n%s') %(invoice_name))) return '' class BVRWebKitParser(webkit_report.WebKitParser): diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py index e98053513cd..e5c5b7e5053 100644 --- a/addons/l10n_ch/wizard/bvr_import.py +++ b/addons/l10n_ch/wizard/bvr_import.py @@ -71,6 +71,9 @@ def _import(self, cursor, user, data, context=None): statement_obj = self.pool.get('account.bank.statement') property_obj = self.pool.get('ir.property') file = data['form']['file'] + if not file: + raise osv.except_osv(_('UserError'), + _('Please select a file first!')) statement_id = data['id'] records = [] total_amount = 0 @@ -239,7 +242,7 @@ def _import(self, cursor, user, data, context=None): class bvr_import_wizard(osv.osv_memory): _name = 'bvr.import.wizard' _columns = { - 'file':fields.binary('BVR File', readonly=True) + 'file':fields.binary('BVR File') } def import_bvr(self, cr, uid, ids, context=None): diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py index 7abb1d7ca7c..e9b0585d4c8 100644 --- a/addons/l10n_ch/wizard/create_dta.py +++ b/addons/l10n_ch/wizard/create_dta.py @@ -28,6 +28,8 @@ import pooler from tools.translate import _ import unicode2ascii +import re + TRANS=[ (u'é','e'), (u'è','e'), @@ -346,6 +348,14 @@ def c_ljust(s, size): s = s.decode('utf-8').encode('latin1','replace').ljust(size) return s +def _is_9_pos_bvr_adherent(adherent_num): + """ + from a bvr adherent number, + return true if + """ + pattern = r'[0-9]{2}-[0-9]{1,6}-[0-9]' + return re.search(pattern, adherent_num) + def _create_dta(obj, cr, uid, data, context=None): v = {} v['uid'] = str(uid) @@ -435,10 +445,24 @@ def _create_dta(obj, cr, uid, data, context=None): or False v['partner_bvr'] = pline.bank_id.post_number or '' if v['partner_bvr']: - v['partner_bvr'] = v['partner_bvr'].replace('-','') - if len(v['partner_bvr']) < 9: - v['partner_bvr'] = v['partner_bvr'][:2] + '0' * \ - (9 - len(v['partner_bvr'])) + v['partner_bvr'][2:] + is_9_pos_adherent = None + # if adherent bvr number is a 9 pos number + # add 0 to fill 2nd part plus remove '-' + # exemple: 12-567-C becomes 12000567C + if _is_9_pos_bvr_adherent(v['partner_bvr']): + parts = v['partner_bvr'].split('-') + parts[1] = parts[1].rjust(6, '0') + v['partner_bvr'] = ''.join(parts) + is_9_pos_adherent = True + # add 4*0 to bvr adherent number with 5 pos + # exemple: 12345 becomes 000012345 + elif len(v['partner_bvr']) == 5: + v['partner_bvr'] = v['partner_bvr'].rjust(9, '0') + is_9_pos_adherent = False + else: + raise osv.except_osv(_('Error'), + _('Wrong postal number format.\n' + 'It must be 12-123456-9 or 12345 format')) if pline.bank_id.bank: v['partner_bank_city'] = pline.bank_id.bank.city or False @@ -518,15 +542,39 @@ def _create_dta(obj, cr, uid, data, context=None): elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost': from tools import mod10r - if v['reference']: - v['reference'] = v['reference'].replace(' ', - '').rjust(27).replace(' ', '0') - if not v['reference'] \ - or (mod10r(v['reference'][:-1]) != v['reference'] and \ - not len(v['reference']) == 15): - raise osv.except_osv(_('Error'), _('You must provide ' \ - 'a valid BVR reference number \n' \ - 'for the line: %s') % pline.name) + if not v['reference']: + raise osv.except_osv(_('Error'), + _('You must provide ' \ + 'a BVR reference number \n' \ + 'for the line: %s') % pline.name) + v['reference'] = v['reference'].replace(' ', '') + if is_9_pos_adherent: + if len(v['reference']) > 27: + raise osv.except_osv(_('Error'), + _('BVR reference number is not valid \n' + 'for the line: %s. \n' + 'Reference is too long.') % pline.name) + # do a mod10 check + if mod10r(v['reference'][:-1]) != v['reference']: + raise osv.except_osv(_('Error'), + _('BVR reference number is not valid \n' + 'for the line: %s. \n' + 'Mod10 check failed') % pline.name) + # fill reference with 0 + v['reference'] = v['reference'].rjust(27, '0') + else: + # reference of BVR adherent with 5 positions number + # have 15 positions references + if len(v['reference']) > 15: + raise osv.except_osv(_('Error'), + _('BVR reference number is not valid \n' + 'for the line: %s. \n' + 'Reference is too long ' + 'for this type of beneficiary.') % pline.name) + # complete 15 first digit with 0 on left and complete 27 digits with trailing spaces + # exemple: 123456 becomes 00000000012345____________ + v['reference'] = v['reference'].rjust(15, '0').ljust(27, ' ') + if not v['partner_bvr']: raise osv.except_osv(_('Error'), _('You must provide a BVR number\n' 'for the bank account: %s' \ diff --git a/addons/l10n_ch/wizard/create_dta_view.xml b/addons/l10n_ch/wizard/create_dta_view.xml index 11cd2095e28..df0544aa0b7 100644 --- a/addons/l10n_ch/wizard/create_dta_view.xml +++ b/addons/l10n_ch/wizard/create_dta_view.xml @@ -8,8 +8,7 @@ form
- - +