Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4833 Vizualizări

 

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


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mar. 16
3434
1
oct. 24
3228
0
nov. 20
5108
1
mai 16
9989
1
aug. 23
1636