This question has been flagged
2 Replies
2244 Views

Hello,

I have the following problem.

I would like to customize my report_lot_label because the individual barcodes are displayed below each other instead of next to each other. How can I change my bootstrap grid to show two products side by side? When I set <div class="col 6"> nothing happens.



This is my code:


<?xml version="1.0"?>
<t t-name="stock.report_lot_label">
    <t t-call="web.basic_layout">
        <t t-foreach="docs" t-as="o">
            <t>
                <div class="page">
                    <div class="oe_structure"/>
                    <div class="row">
                        <div class="col 6">
                            <table class="table table_condensed" style="border-bottom: 40px solid  white !important;width: 3in;">
                                <tr>
                                  <th style="text-align: left;">
                                    <span t-field="o.product_id.display_name"/>
                                  </th>
                                </tr>
                                <tr>
                                    <td>
                                        LN/SN:
                                        <span t-field="o.name"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: center; vertical-align: middle;" class="col-5">
                                        <img t-if="o.name" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 150)" style="width:100%;height:20%;"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </t>
        </t>
    </t>
</t>

Avatar
Discard
Best Answer

You can find  documentation in bootstrap website, since Odoo using bootstrap css class

https://getbootstrap.com/docs/4.3/getting-started/introduction/ for Odoo 13

Avatar
Discard
Best Answer

Hi,

Try using  class="col-xs-6"  everywhere instead of just using 'col 6'.
                                            Or

Instead of using class like oe_structure and row , just play with 

<table>

<tbody>

<tr style="width:100%;">

<td style="width:50%;"></td>
<td style="width:50%;"></td>

</tr></tbody></table>

Hope it helps,

Thanks


Avatar
Discard