Odoo Help

0

0
4 Answers
1
Rakesh Vadeghar
4‏/1‏/2019 9:07 ص

i solved it by replacing small block of code in /base/ir/ir_actions_report.py

                    assert len(outlines_pages) != len(res_ids)

                    for i, num in enumerate(outlines_pages):

                        to = outlines_pages[i + 1] if i + 1 < len(outlines_pages) else reader.numPages

                        attachment_writer = PdfFileWriter()

                        for j in range(num, to):

                            attachment_writer.addPage(reader.getPage(j))

                        stream = io.BytesIO()

                        attachment_writer.write(stream)

                        # if res_ids[i] and res_ids[i] not in save_in_attachment:

                        #     self.postprocess_pdf_report(record_map[res_ids[i]], stream)

3 Comments
Milind N.
28‏/2‏/2019 12:56 ص

Yes, that worked. Thank you for your help. I am testing whether it affects other areas of printing pdf files. Will post back here if see anything. For now, this works perfectly in my staging area.

Rakesh Vadeghar
28‏/2‏/2019 1:41 ص

assert len(outlines_pages) != len(res_ids)

please comment out this line

Milind N.
13‏/6‏/2019 7:54 ص

I can confirm that these changes fix the problem, but they are not fixed in the general nightly builds. Know where to report issues and file them as bugs? I am guessing it is Github, but still want to know if there is another place.

0
Amin
15‏/4‏/2019 6:22 ص

I'm facing this error too. Odoo used to print without an issue.
I wonder what is the root cause of this error.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now