Odoo Help


How to display records side by side in Qweb report

Abdullah Sofan
on 12/2/14, 2:15 PM 882 views

I wrote this Qweb report to display student IDs for printing:


<?xml version="1.0" encoding="utf-8"?>
        <template id="report_students">
            <t t-call="report.html_container">
            <t t-foreach="docs" t-as="o">
                                <table width="40%">
                                            <img t-att-src="'data:image/png;base64,%s' % o.student_image" style="max-height:4cm; max-width:4cm;"/>
                                                <h5 t-field="o.name"/>
                                                <h5 t-field="o.student_number"/>



Now when I try to print, the records are stacked on top of each other. How can I change the Qweb report so that it displays two records per row?

Thanks in advance



Can someone help... I am sure it's a very easy task for pros here.

Abdullah Sofan
on 12/3/14, 1:36 AM
Sajin Aziz
On 12/3/14, 1:50 AM

try this .

 <t t-foreach="docs" t-as="o">
                <div class="col-xs-6">
                <p> <span t-field="o.name" /> </p>

Thanks Sajin. Your code works. I really appreciate your help.

Abdullah Sofan
on 12/3/14, 2:24 AM

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

1 follower(s)


Asked: 12/2/14, 2:15 PM
Seen: 882 times
Last updated: 3/16/15, 8:10 AM