Help

2

odoo8: How to print vertical text in qweb report?

Avatar
JC

I added the following code to one of the report but it did not work,  please provide an example how to print vertical text.

 

.vertical-text { transform: rotate(90deg); transform-origin: left top 0; }

    transform: rotate(90deg); transform-origin: left top 0; }

    transform-origin: left top 0; }

}


<div class="vertical-text">Hello Vertical Texter!</div>

Avatar
Discard
3 Answers
1
Avatar
Bharat Parmar (bhp)
Best Answer

You need to override your css.

1.)create css file in your module with this path

your_module/static/src/css/my_css.css

my_css.css

//put your css here to it in report.
//like,
.vertical-text {
    /* Safari */
    -webkit-transform: rotate(-90deg);
    
    /* Firefox */
    -moz-transform: rotate(-90deg);
    
    /* IE */
    -ms-transform: rotate(-90deg);
    
    /* Opera */
    -o-transform: rotate(-90deg);
    
    /* Internet Explorer */
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

2.)create xml file in your_module/views/css_view.xml

<?xml version="1.0"?>
<odoo>
    <data>
        <template id="assets_backend" name="mymodule css assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <link rel="stylesheet" href="/your_module/static/src/css/my_css.css"/>
            </xpath>
        </template>
    </data>
</odoo>

3.)change in __manifest__.py or __openerp__.py

'data': [ 'views/css_view.xml']

and then you can use it in your report

<div class="vertical-text">Hello Vertical Texter!</div>

Avatar
Discard
0
Avatar
Ahmed Bedda
Best Answer

not worked in odoo8 !!!!

Avatar
Discard
0
Best Answer
Avatar
Discard