Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
10178 Lượt xem

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>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất


" Inside

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

not worked in odoo8 !!!!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Just tested, It works using: https://css-tricks.com/snippets/css/text-rotation/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 25
1136
0
thg 1 25
3177
1
thg 8 23
14404
change password Đã xử lý
1
thg 8 23
13112
1
thg 7 23
10108