Merge lp://qastaging/~openerp-dev/openobject-server/trunk-bug-516966-ysa into lp://qastaging/openobject-server

Proposed by Yogesh (SerpentCS)
Status: Work in progress
Proposed branch: lp://qastaging/~openerp-dev/openobject-server/trunk-bug-516966-ysa
Merge into: lp://qastaging/openobject-server
Diff against target: 63 lines (+19/-14)
2 files modified
openerp/report/render/rml2pdf/trml2pdf.py (+1/-1)
openerp/report/report_sxw.py (+18/-13)
To merge this branch: bzr merge lp://qastaging/~openerp-dev/openobject-server/trunk-bug-516966-ysa
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Fixing
Raphael Collet (OpenERP) (community) Needs Fixing
Vo Minh Thu Pending
Review via email: mp+62127@code.qastaging.launchpad.net

Description of the change

fix problem of <pageCount/> tag in rml file.

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

this will give the uniform behaviour whether the attachments are kept or not also there is no need of explicitly adding <pageNumberReset> before the <story> tag in rml's.

Thanks

review: Approve
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

This breaks the test hr_attendance_error. The generation of report "hr.attendance.error" invokes the method report_sxw.create_source_pdf with ids=[] (the ids are provided through the field "datas".) In that case, the method returns None.

The problem is in the method _rml_template.render (openerp/report/render/trml2pdf.py). The element pageCount is rendered only once for all tags <story>, while each story should have its own value for pageCount. Moreover, pageCount is rendered after a PageReset, which explains why the value is 0...

Raphael

review: Needs Fixing
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

yes...also the code would not work for the report other then *PDF*.

review: Needs Fixing

Unmerged revisions

3426. By Yogesh (SerpentCS)

[FIX] fix problem of <pageCount/> tag in rml file.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.