Odoo Help


This community 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.


How do i return a report with multiple duplicate keys

Tarun Behal
on 5/4/14, 11:42 AM 558 views

I've a function which return a pdf report return { 'type': 'ir.actions.report.xml', 'report_name':'hotel.product.label', 'datas': { 'model':'hotel.product', 'ids': pids and pids or [], 'report_type': 'pdf' }, 'nodestroy': True }

pids is list of ids with duplicate keys eg: pids = [1,1,1,2,2,2,2,2,3,3,3]

The function returns a report for only unique ids i.e. [1,2,3] only. I did debugging and saw that werkzeug serving.py line #130 assert type(data) is str, 'applications must write bytes' self.wfile.write(data) self.wfile.flush()

has all keys in data attribute which is last function called before returning the report. Please let me know if to provide more specifications for the issue. Any guidance or help would be highly appreciated.

Regards, Tarun Behal tarunbehal@hotmail.com

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 5/4/14, 11:42 AM
Seen: 558 times
Last updated: 3/16/15, 8:10 AM