← Back to team overview

credativ team mailing list archive

[Merge] lp:~matthieuchoplin/credativ-openerp/ERP-425 into lp:credativ-openerp

 

Matthieu Choplin has proposed merging lp:~matthieuchoplin/credativ-openerp/ERP-425 into lp:credativ-openerp.

Requested reviews:
  credativ (credativ)

For more details, see:
https://code.launchpad.net/~matthieuchoplin/credativ-openerp/ERP-425/+merge/175096

It is related to ERP-425. The column "Cost Price" was for instance displayed 5 time (same name) whereas it the columns were dealing with different fields.

I think that the fix could be improved but I wanted to have your view before.

Cheers,

Matt
-- 
https://code.launchpad.net/~matthieuchoplin/credativ-openerp/ERP-425/+merge/175096
Your team credativ is requested to review the proposed merge of lp:~matthieuchoplin/credativ-openerp/ERP-425 into lp:credativ-openerp.
=== modified file 'base_report_creator/base_report_creator.py'
--- base_report_creator/base_report_creator.py	2012-08-10 12:00:33 +0000
+++ base_report_creator/base_report_creator.py	2013-07-16 17:59:25 +0000
@@ -152,10 +152,10 @@
             i = 0
             for f in report.field_ids:
                 if f.field_id.model:
-                    arch += '<field name="%s"/>' % ('field' + str(i),)
+                    arch += '<field name="%s" string="%s"/>' % ('field' + str(i), f.field_name)
                     i += 1
                 else:
-                    arch += '<field name="%s"/>' % ('column_count',)
+                    arch += '<field name="%s" string="%s"/>' % ('column_count', f.field_name)
         arch += '</%s>' % (view_type,)
         result = {
             'arch': arch,