تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4870 أدوات العرض

 

Hi everyone, i'm using Odoo 13 and  i'm trying to use border-image in order to export pdf with border, i try this code 


1-This is my xml report

<data>
    <template id="report_double" inherit_id="web.report_assets_common">
      <xpath expr="." position="inside">
        <link rel="stylesheet" href="/report_sale/static/src/css/report.css"/>
      </xpath>
    </template>
    <template id="test_border">
      <t t-call="web.html_container">
        <t t-foreach="docs" t-as="doc">
          <t t-call="web.basic_layout">
            <div class="my-border">
              <div class="page">
                <h1>teeeeeeeest</h1>
              </div>
            </div>
          </t>
        </t>
      </t>
    </template>
    <report string="report dashed"
            id="report__dashed"
            model="sale.order"
            report_type="qweb-pdf"
            name="argos_sale.test_border"
            file="argos_sale.test_border"
    />
  </data>

2-My css


.my-border {
padding: 16px;
border: 17px solid transparent;
border-image: 17 repeating-linear-gradient(-45deg, #EF4135 0, #EF4135 16px, transparent 0, transparent 32px,#0055a4 0, #0055a4 48px, transparent 0, transparent 64px);
width: auto;
height: auto;
}

The border is displayed in html but not in pdf

Please any suggestion

Thank you


الصورة الرمزية
إهمال
أفضل إجابة

Hi

Please try this code,

<template id="report_double" inherit_id="web.report_assets_common">
      <xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/report_sale/static/src/css/report.css"/> </xpath>
 </template>

Hope it works

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 16
3460
1
أكتوبر 24
3260
0
نوفمبر 20
5160
1
مايو 16
10031
1
أغسطس 23
1670