Merge lp:~openerp-dev/openobject-addons/6.1-opw-582068-msh into lp:openobject-addons/6.1

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-582068-msh
Merge into: lp:openobject-addons/6.1
Diff against target: 51 lines (+13/-9)
2 files modified
project/project.py (+12/-9)
project/report/project_cumulative.xml (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-582068-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+134630@code.launchpad.net

Description of the change

Hello,

Fixed the issue of view project.task.history.cumulative.graph, here filter project_id raise an error. "Backported from trunk" from branch https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1022509-mdi.

Demo :- Go to Project -> Reporting -> Tasks -> Cumulative Flows -> Now click on My Project filter(i.e. Projects), this will raise an error.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Already Fixed on Trunk (means that it was already fixed and merged in Trunk). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7069. By DJ Patel (OpenERP)

[FIX]Fixed the issue of view project.task.history.cumulative.graph, here filter project_id raise an error, Backported from trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project/project.py'
2--- project/project.py 2012-08-29 10:56:45 +0000
3+++ project/project.py 2012-11-16 10:32:23 +0000
4@@ -1217,23 +1217,26 @@
5 _auto = False
6 _columns = {
7 'end_date': fields.date('End Date'),
8- 'project_id': fields.related('task_id', 'project_id', string='Project', type='many2one', relation='project.project')
9+ 'project_id': fields.many2one('project.project', 'Project'),
10 }
11 def init(self, cr):
12 cr.execute(""" CREATE OR REPLACE VIEW project_task_history_cumulative AS (
13 SELECT
14- history.date::varchar||'-'||history.history_id::varchar as id,
15- history.date as end_date,
16+ history.date::varchar||'-'||history.history_id::varchar AS id,
17+ history.date AS end_date,
18 *
19 FROM (
20 SELECT
21- id as history_id,
22- date+generate_series(0, CAST((coalesce(end_date,DATE 'tomorrow')::date - date)AS integer)-1) as date,
23- task_id, type_id, user_id, kanban_state, state,
24- remaining_hours, planned_hours
25+ h.id AS history_id,
26+ h.date+generate_series(0, CAST((coalesce(h.end_date, DATE 'tomorrow')::date - h.date) AS integer)-1) AS date,
27+ h.task_id, h.type_id, h.user_id, h.kanban_state, h.state,
28+ greatest(h.remaining_hours, 1) AS remaining_hours, greatest(h.planned_hours, 1) AS planned_hours,
29+ t.project_id
30 FROM
31- project_task_history
32- ) as history
33+ project_task_history AS h
34+ JOIN project_task AS t ON (h.task_id = t.id)
35+
36+ ) AS history
37 )
38 """)
39 project_task_history_cumulative()
40
41=== modified file 'project/report/project_cumulative.xml'
42--- project/report/project_cumulative.xml 2011-12-13 04:33:44 +0000
43+++ project/report/project_cumulative.xml 2012-11-16 10:32:23 +0000
44@@ -25,6 +25,7 @@
45 <field name="type">graph</field>
46 <field name="arch" type="xml">
47 <graph string="Project Tasks" type="bar">
48+ <!-- <field name="project_id"/> -->
49 <field name="date"/>
50 <field name="planned_hours" operator="+"/>
51 <field name="type_id" group="True"/>