Merge lp:~openerp-dev/openobject-server/trunk-opw-576781-port-kbh into lp:openobject-server

Proposed by Khushboo Bhatt(openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-server/trunk-opw-576781-port-kbh
Merge into: lp:openobject-server
Diff against target: 72 lines (+14/-14)
2 files modified
openerp/addons/base/report/corporate_odt_header.xml (+13/-13)
openerp/report/report_sxw.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-opw-576781-port-kbh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+138384@code.launchpad.net

Description of the change

Hello

"[FIX](1) Reprort extension is not changing after changing the report type from report action (2) while opening the report with report type odt the report will take the hard coded header and footer from corporate_odt_header file"

Steps :
(1). Reprort extension is not changing after changing the report type from report action
1.1) Goto : Settings/Customization/Low Level Objects/Actions/Reports, change the report type to odt and try to generate the report.
Report is generated but with extension .sxw it should created with .odt

(2) While opening the report with report type odt the report will take the hard coded header and footer from corporate_odt_header file"
2.1) After applying the fix of "report_sxw.py" try to open the report with report type odt the report will take the hard coded header and footer from corporate_odt_header file, it should take from companies header and footer. Changes in corporate_odt_header solved the issue.

Code is forward port from 6.1

Thanks,
khushboo.

To post a comment you must log in.
4644. By Khushboo Bhatt(openerp)

[FIX]indentation problem

4645. By Khushboo Bhatt(openerp)

[FIX]indentation problem

Unmerged revisions

4645. By Khushboo Bhatt(openerp)

[FIX]indentation problem

4644. By Khushboo Bhatt(openerp)

[FIX]indentation problem

4643. By ado

[FIX](1) Reprort extension is not changing after changing the report type from report action (2) while opening the report with report type odt the report will take the hard coded header and footer from file not from database

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/report/corporate_odt_header.xml'
2--- openerp/addons/base/report/corporate_odt_header.xml 2009-01-29 22:22:23 +0000
3+++ openerp/addons/base/report/corporate_odt_header.xml 2012-12-06 10:43:21 +0000
4@@ -198,16 +198,16 @@
5 <table:table-column table:style-name="Table2.A"/>
6 <table:table-column table:style-name="Table2.B"/>
7 <table:table-row>
8- <table:table-cell table:style-name="Table2.A1" office:value-type="string">
9- <text:p text:style-name="P1">Tiny sprl</text:p>
10- </table:table-cell>
11- <table:table-cell table:style-name="Table2.A1" office:value-type="string">
12- <text:p text:style-name="P2"/>
13- </table:table-cell>
14+ <table:table-cell table:style-name="Table2.A1" table:value-type="string">
15+ <text:p text:style-name="P1">[[ company.partner_id.name ]]</text:p>
16+ </table:table-cell>
17+ <table:table-cell table:style-name="Table2.A1" table:value-type="string">
18+ <text:p text:style-name="P2">[[ company.rml_header1 ]]</text:p>
19+ </table:table-cell>
20 </table:table-row>
21 </table:table>
22- <text:p text:style-name="P3"/>
23- <text:p text:style-name="P3">- </text:p>
24+ <text:p text:style-name="P3">[[ company.partner_id.address and company.partner_id.address[0].street ]]</text:p>
25+ <text:p text:style-name="P3">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</text:p>
26 <table:table table:name="Table3" table:style-name="Table3">
27 <table:table-column table:style-name="Table3.A"/>
28 <table:table-column table:style-name="Table3.B"/>
29@@ -216,7 +216,7 @@
30 <text:p text:style-name="P4">Phone :</text:p>
31 </table:table-cell>
32 <table:table-cell table:style-name="Table3.A1" office:value-type="string">
33- <text:p text:style-name="P5"/>
34+ <text:p text:style-name="P5">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</text:p>
35 </table:table-cell>
36 </table:table-row>
37 <table:table-row>
38@@ -224,7 +224,7 @@
39 <text:p text:style-name="P4">Mail :</text:p>
40 </table:table-cell>
41 <table:table-cell table:style-name="Table3.A2" office:value-type="string">
42- <text:p text:style-name="P5"/>
43+ <text:p text:style-name="P5">[[ company.partner_id.address and company.partner_id.address[0].email ]]</text:p>
44 </table:table-cell>
45 </table:table-row>
46 </table:table>
47@@ -235,9 +235,9 @@
48 <table:table-column table:style-name="Table1.A"/>
49 <table:table-row>
50 <table:table-cell table:style-name="Table1.A1" office:value-type="string">
51- <text:p text:style-name="P7"/>
52- <text:p text:style-name="P7"/>
53- <text:p text:style-name="P7">Contact : Administrator</text:p>
54+ <text:p text:style-name="P7">[[ company.rml_footer ]]</text:p>
55+ <text:p text:style-name="P7">[[ company.rml_footer_readonly ]]</text:p>
56+ <text:p text:style-name="P7">Contact : [[ user.name ]]</text:p>
57 </table:table-cell>
58 </table:table-row>
59 </table:table>
60
61=== modified file 'openerp/report/report_sxw.py'
62--- openerp/report/report_sxw.py 2012-03-30 04:57:52 +0000
63+++ openerp/report/report_sxw.py 2012-12-06 10:43:21 +0000
64@@ -644,7 +644,7 @@
65 sxw_z.close()
66 final_op = sxw_io.getvalue()
67 sxw_io.close()
68- return (final_op, mime_type)
69+ return (final_op, report_type)
70
71 def create_single_html2html(self, cr, uid, ids, data, report_xml, context=None):
72 if not context: