report_creator does not handle identical field names correctly

Bug #368885 reported by Ferdinand
4
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
Mantavya Gajjar (Open ERP)

Bug Description

using c2c_budget - this will happen everywhere - I just wanted to create a report based on this data

this query
 select
     min(c2c_budget_version.id) as id,
c2c_budget.name as field0,
c2c_budget_version.name as field1,
c2c_budget_item.name as field2
     from
     c2c_budget,
 c2c_budget_item,
 c2c_budget_version
  where
 c2c_budget.budget_item_id=c2c_budget_item.id and
 c2c_budget_version.budget_id=c2c_budget.id
                 group by
c2c_budget.name, c2c_budget_version.name, c2c_budget_item.name

returns
a report "Name","Version Name", "Name"
whereas the content of the second "Name" column is identical with the first "Name"
because the c2c_budget and c2c_budget_item both have a python "Name" label whereas c2c_budget_version has "Version Name"

this is probably a limit of the XML engine which obviously can not handle duplicate names

Possible workaround ?
use field0 string="Name", field1 string="Version Name", field2 string="Name" to construct the XML

Revision history for this message
Ferdinand (office-chricar) wrote :

or allow custom labels

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

Hello,

Well this is not that much complex task, and can be provide this feature easily

by adding a new column in model "base_report_creator.report.fields"

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

hello,

probably i will do this fix in trunk

Changed in openobject-addons:
assignee: nobody → mga (Open ERP) (mga)
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

hello,
its working now, can any one check and reply
thanks

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
milestone: none → 5.2
status: Fix Committed → Fix Released
Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

released in 5.2

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

release in 5.2

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

Hello,

as this feature goes to Trunk branch so, Here is a patch for the users of the 5.0.4

check that and reply
thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.