Odoo Help


How do i return a report with multiple duplicate keys

Tarun Behal
on 5/4/14, 11:42 AM 918 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

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


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