跳至內容
選單
此問題已被標幟
4 回覆
9975 瀏覽次數

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>

頭像
捨棄
最佳答案

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>

頭像
捨棄
最佳答案


" Inside

頭像
捨棄
最佳答案

not worked in odoo8 !!!!

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 25
964
0
1月 25
3076
1
8月 23
14202
1
8月 23
12900
1
7月 23
9955