From d1c37a80b646be2a38c804e1534ff52423fb8ba2 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 9 Mar 2010 11:13:27 +0530 Subject: [PATCH 01/10] [FIX] event: Registration by events: you can create a new event since list view, but the one is not editable lp bug: https://launchpad.net/bugs/534493 fixed bzr revid: mra@tinyerp.com-20100309054327-9oynsicikp90ort7 --- addons/event/event_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 92c08594c11..55dea914ac5 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -338,7 +338,7 @@ - + From 1e8622118905179e2a1f665dabe44d0abad15b4c Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 9 Mar 2010 12:06:03 +0530 Subject: [PATCH 02/10] [FIX] hr_timesheet_sheet: to link attendaces with timesheet (employee now attchaed with resource so change the query) bzr revid: mra@tinyerp.com-20100309063603-3sxf2efirreqoneq --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index a738ee55ace..b7d395ac2e0 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -482,7 +482,7 @@ class hr_attendance(osv.osv): res[line_id] = False return res - def _sheet_search(self, cursor, user, obj, name, args): + def _sheet_search(self, cursor, user, obj, name, args, context={}): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') @@ -525,9 +525,11 @@ class hr_attendance(osv.osv): LEFT JOIN (hr_attendance a \ LEFT JOIN hr_employee e \ ON (a.employee_id = e.id)) \ + LEFT JOIN resource_resource r \ + ON (e.resource_id = r.id) \ ON (s.date_to >= date_trunc(\'day\',a.name) \ AND s.date_from <= a.name \ - AND s.user_id = e.user_id) ' + \ + AND s.user_id = r.user_id) ' + \ qu1, qu2) res = cursor.fetchall() if not len(res): From 836636905c9356c7cc0b4133616b66dbe63c061c Mon Sep 17 00:00:00 2001 From: "HDA (OpenERP)" Date: Tue, 9 Mar 2010 12:58:46 +0530 Subject: [PATCH 03/10] [IMP] scrum: improved burndown chart bzr revid: hda@tinyerp.com-20100309072846-5mylm9v12z60lt7m --- addons/scrum/report/__init__.py | 1 - addons/scrum/report/sprint_burndown.py | 16 +++++++++++----- addons/scrum/scrum_report.xml | 6 +----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/addons/scrum/report/__init__.py b/addons/scrum/report/__init__.py index 2e7bbe68cd0..6112b117959 100644 --- a/addons/scrum/report/__init__.py +++ b/addons/scrum/report/__init__.py @@ -19,7 +19,6 @@ # ############################################################################## -import task_burndown import sprint_burndown # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/scrum/report/sprint_burndown.py b/addons/scrum/report/sprint_burndown.py index 79a549ff81f..cdc837fe96b 100644 --- a/addons/scrum/report/sprint_burndown.py +++ b/addons/scrum/report/sprint_burndown.py @@ -50,9 +50,6 @@ class report_tasks(report_int): cr.execute('select id,date_start,date_stop from scrum_sprint where id=%s', (datas['id'],)) for (id,date_start,date_stop) in cr.fetchall(): - date_to_int = lambda x: int(x.ticks()) - int_to_date = lambda x: '/a60{}'+DateTime.localtime(x).strftime('%d/%m/%Y') - cr.execute('select id from project_task where product_backlog_id in(select id from scrum_product_backlog where sprint_id=%s)', (id,)) ids = map(lambda x: x[0], cr.fetchall()) @@ -71,7 +68,9 @@ class report_tasks(report_int): if (not result) or result[-1]<>res: result.append(res) return result - + + guideline__data=[(datas[0][0],max_hour), (datas[-1][0],0)] + ar = area.T(x_grid_style=line_style.gray50_dash1, x_axis=axis.X(label="Date", format=int_to_date), y_axis=axis.Y(label="Burndown Chart - Planned Hours"), @@ -80,7 +79,14 @@ class report_tasks(report_int): y_range = (0,max_hour), legend = None, size = (680,450)) - ar.add_plot(line_plot.T(data=datas)) + ar.add_plot(line_plot.T(data=guideline__data, line_style=line_style.red)) + ar.add_plot(line_plot.T(data=datas, line_style=line_style.green)) + + entr1 = pychart.legend.Entry(label="guideline", line_style=line_style.red) + entr2 = pychart.legend.Entry(label="burndownchart",line_style=line_style.green) + legend = pychart.legend.T(nr_rows=2, inter_row_sep=5) + legend.draw(ar,[entr1,entr2],canv) + ar.draw(canv) canv.close() diff --git a/addons/scrum/scrum_report.xml b/addons/scrum/scrum_report.xml index a5b3a672986..845a677c356 100644 --- a/addons/scrum/scrum_report.xml +++ b/addons/scrum/scrum_report.xml @@ -1,10 +1,6 @@ - - - - + - From 33c94dc95f8bd9283864d43a15c4c8fc4c836faf Mon Sep 17 00:00:00 2001 From: "noz@tinyerp.com" <> Date: Tue, 9 Mar 2010 13:58:27 +0530 Subject: [PATCH 04/10] [FIX] Wrong context syntax. bzr revid: noz@tinyerp.com-20100309082827-w33bvmg1dsoyzcgu --- addons/account/partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 44cf3afde69..1b4603cd8ed 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -91,7 +91,7 @@ - +
From 03bce49375554543318d486a6829cc7f09c16aa9 Mon Sep 17 00:00:00 2001 From: "noz@tinyerp.com" <> Date: Tue, 9 Mar 2010 15:06:01 +0530 Subject: [PATCH 05/10] [FIX] Correction in context syntax. bzr revid: noz@tinyerp.com-20100309093601-bdkrn8h0dxyzvzwz --- addons/account/partner_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 1b4603cd8ed..0b2291224a9 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -91,7 +91,7 @@ - + From 0129ecbcf76f5a2076ddf9278fda4e23b70b175e Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 9 Mar 2010 10:56:19 +0100 Subject: [PATCH 06/10] [IMP] project issue form bzr revid: fp@tinyerp.com-20100309095619-r2d676mg94jhsc1u --- addons/crm/crm.py | 3 +- addons/project_issue/project_issue.py | 28 +-- addons/project_issue/project_issue_view.xml | 188 +++++++++----------- 3 files changed, 98 insertions(+), 121 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 8bc6f56117d..ce318aeca4f 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -224,6 +224,7 @@ class crm_case(osv.osv): 'email_from': fields.char('Email', size=128, help="These people will receive email."), 'email_cc': fields.text('Watchers Emails', size=252 , help="These people will receive a copy of the future" \ " communication between partner and users by email"), + 'probability': fields.float('Probability'), 'email_last': fields.function(_email_last, method=True, string='Latest E-Mail', type='text'), 'partner_id': fields.many2one('res.partner', 'Partner'), @@ -318,7 +319,7 @@ class crm_case(osv.osv): if section in s: st = case.stage_id.id or False s[section] = dict([(v, k) for (k, v) in s[section].iteritems()]) - if st in s[section]: + if st and st in s[section]: stage_value = self.pool.get('crm.case.stage').read(cr, uid,s[section][st] ,['probability'], context) self.write(cr, uid, [case.id], {'stage_id': s[section][st],'probability':stage_value['probability']}) return True diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index f0441c0263c..48492f44675 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -29,10 +29,8 @@ from tools.translate import _ import tools from osv import fields,osv,orm from osv.orm import except_orm - from crm import crm - class project_issue(osv.osv): _name = "project.issue" _description = "Project Issue" @@ -45,30 +43,22 @@ class project_issue(osv.osv): 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128), 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \ " With each commercial opportunity, you can indicate the canall which is this opportunity source."), - 'planned_revenue': fields.float('Planned Revenue'), - 'planned_cost': fields.float('Planned Costs'), - 'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \ - "the partner mentality in relation to our services.The scale has" \ - "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."), 'categ_id': fields.many2one('crm.case.categ','Category', domain="[('object_id.model', '=', 'crm.project.bug')]"), - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), - 'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('object_id.model', '=', 'project.issue')]"), - + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Severity'), + 'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"), 'partner_name': fields.char("Employee's Name", size=64), 'partner_mobile': fields.char('Mobile', size=32), 'partner_phone': fields.char('Phone', size=32), 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"), 'project_id':fields.many2one('project.project', 'Project'), 'duration': fields.float('Duration'), - 'probability': fields.float('Probability (%)'), 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]") } - def _get_project(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid, context=context) if user.context_project_id: return user.context_project_id - return False + return False def _convert(self, cr, uid, ids, xml_id, context=None): data_obj = self.pool.get('ir.model.data') @@ -79,7 +69,7 @@ class project_issue(osv.osv): if categ_id: self.write(cr, uid, ids, {'categ_id': categ_id}) return True - + def convert_to_feature(self, cr, uid, ids, context=None): return self._convert(cr, uid, ids, 'feature_request_categ', context=context) @@ -92,14 +82,10 @@ class project_issue(osv.osv): stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context) if not stage.on_change: return {'value':{}} - return {'value':{'probability':stage.probability}} + return {'value':{}} _defaults = { - 'project_id':_get_project, - 'probability':lambda *a:0.0, - 'planned_cost':lambda *a:0.0, - 'planned_revenue':lambda *a:0.0, - } - + 'project_id':_get_project, + } project_issue() diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 305db272f4c..2a82ef783d3 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -11,22 +11,22 @@ Issue Categories crm.case.categ form - - [('object_id.model', '=', 'project.issue')] - {'object_id':'project.issue'} + + [('object_id.model', '=', 'project.issue')] + {'object_id':'project.issue'} # ------------------------------------------------------ - # Stage - # ------------------------------------------------------ - - Issue Stages - crm.case.stage - form - - [('object_id.model', '=', 'project.issue')] - {'object_id':'project.issue'} - - + # Stage + # ------------------------------------------------------ + + Issue Stages + crm.case.stage + form + + [('object_id.model', '=', 'project.issue')] + {'object_id':'project.issue'} + + Project Issue Tracker Form @@ -34,50 +34,38 @@ form - - - + + + + - - -