This question has been flagged
3 Replies
17734 Views

Hello,

I have created a custom qweb report in odoo-9.0 which is works perfect.

Now, I have to migrate odoo-9.0 code to odoo-12.0, but col-xs-4 or col-4 is not working.

Here is the code and I try with col-xs-4 and col-4 but the result was same.

For Ex:-

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="report_custom_custom">
        <t t-call="web.basic_layout">                      <!-- Instead of <t t-call="web.html_container"> -->
            <t t-foreach="docs" t-as="o">
                <div class="page">
                    <div class="row">
                        <div class="col-4">
                            TEST
                        </div>
                        <div class="col-4">
                            TEST2
                        </div>
                        <div class="col-4">
                            TEST3
                        </div>
                    </div>
                </div>
            </t>
        </t>
    </template>
</odoo>


Expected Result :-

TEST
TEST2
TEST3
Actual Result :-
TEST
TEST2
TEST3


How to solve this issue in odoo12.0 ?

Any answer will be appreciable.

Thanks,

Avatar
Discard

Thank you, It helps me

Best Answer

Hey try this 

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_custom_custom">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">

<div class="page">
<div class="row mt32 mb32">
<div class="col-xs-4">
<strong>TEST</strong>
</div>

<div class="col-xs-4">
<strong>TEST</strong>
</div>
<div class="col-xs-4">
<strong>TEST</strong>

</div>
</div>
</div>
</t>
</t>
</template>
</odoo>


Avatar
Discard
Author

Hello Rakesh, Thank you for your answer. In odoo-12.0, <t t-call="web.basic_layout"> is used instead of <t t-call="web.html_container"> and <div class="col-4"> is used instead of <div class="col-xs-4">.

Best Answer

Good solution


Thanks

Avatar
Discard
Best Answer

follow this:

first div creates 12 column then use how much you wanted for one column. total must be 12 column.

<div class="col-xs-12">
<div class="col-xs-4">
<strong>TEST</strong>
</div>

<div class="col-xs-4">
<strong>TEST</strong>
</div>
<div class="col-xs-4">
<strong>TEST</strong>

</div>
</div>
Avatar
Discard