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

I want to add Times new Arabic or Arial(Body (CS)) to my Invoice Qweb view for all the arabic words

here are some code:

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

To use the Times New Arabic or Arial (Body CS) font in the report, you first need to add it to the font-family in your system or configuration. Once it is added, you can reference it in the report template like this:

<div class="row" style="width:99%;margin-left:4px;margin-top:50px">

    <style>

        .arabic-text {

            font-family: 'Times New Arabic', sans-serif;

        }

    </style>

    <table style="width:100%;border:1px solid black;min-height:1vh !important;text-align:right;height:40px;">

        <tr>

            <td style="width:16.6%">

                <t t-esc="o.partner_id.vat" />

            </td>

            <td style="width:16.8%;background-color:#D3D3D3;" class="arabic-text">الضريبي العميل</td>

            <td style="width:50%">

                <t t-esc=" o.partner_id.name " />

            </td>

            <td style="width:16.6%;background-color:#D3D3D3;" class="arabic-text">إسم العميل</td>

        </tr>

    </table>

</div>

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

Hi,

Please add 'font-family' to the styling for the required line.


font-family: 'Times New Arabic', serif;



<div class="row" style="width:99%;margin-left:4px;margin-top:50px">

    <div>

        <table style="width:100%;border:1px solid black;min-height:1vh !important;text-align:right;height:40px;">

            <tr>

                <td style="width:16.6%"><t t-esc="o.partner_id.vat" /></td>

                <td style="width:16.8%;background-color:#D3D3D3; font-family: 'Times New Arabic', 

                    serif;">العميل الضريبي</td>

                <td style="width:50%"><t t-esc="o.partner_id.name" /></td>

                <td style="width:16.6%;background-color:#D3D3D3; font-family: 'Times New Arabic',

                 serif;">اسم العميل</td>

            </tr>

        </table>


        <table style="width:100%;border:1px solid black;min-height:1vh !important;text-align:right;height:40px;margin-top:3px">

            <tr>

                <td style="width:16.6%"><t t-esc="o.invoice_user_id.name" /></td>

                <td style="width:16.6%;background-color:#D3D3D3; font-family: 'Times New Arabic',

                      serif;">المندوب</td>

                <td style="width:18.6%"><t t-esc="o.partner_id.phone" /></td>

                <td style="width:14.6%;background-color:#D3D3D3; font-family: 'Times New Arabic',

                     serif;">هاتف</td>

                <td style="width:16.6%" />

                <td style="width:16.6%;background-color:#D3D3D3; font-family: 'Times New Arabic',

                    serif;">رقم العميل</td>

            </tr>

        </table>

    </div>

</div>



Hope it helps,



Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for your answer
But its not working

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 25
2192
0
thg 5 24
1295
0
thg 9 18
4393
0
thg 12 24
1496
0
thg 8 24
1937