Browse Source

RF pdf

dev-rcn
root 3 years ago
parent
commit
092cd145c5
4 changed files with 177 additions and 152 deletions
  1. +2
    -1
      __manifest__.py
  2. +21
    -0
      report/report.xml
  3. +9
    -151
      report/report_donationtax.xml
  4. +145
    -0
      static/src/css/rf.css

+ 2
- 1
__manifest__.py View File

@ -31,7 +31,8 @@
'views/contactus.xml',
'views/partner.xml',
'views/partnerimport.xml',
'report/report_donationtax.xml'
'report/report_donationtax.xml',
'report/report.xml'
],
# only loaded in demonstration mode


+ 21
- 0
report/report.xml View File

@ -0,0 +1,21 @@
<odoo>
<record id="paperformat_lowmargin" model="report.paperformat">
<field name="name">European A4 low margin</field>
<field name="default" eval="True" />
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">4</field>
<field name="margin_bottom">4</field>
<field name="margin_left">4</field>
<field name="margin_right">4</field>
<field name="header_line" eval="False" />
<field name="header_spacing">0</field>
<field name="dpi">90</field>
</record>
<!-- <record id="donation_base.report_donation_tax_receipt" model="ir.actions.report.xml">
<field name="paperformat_id" ref="kalachakra.paperformat_lowmargin" />
</record> -->
</odoo>

+ 9
- 151
report/report_donationtax.xml View File

@ -4,164 +4,23 @@
<template id="kalachakra_template_donation_tax_receipt" inherit_id="donation_base.report_donationtaxreceipt_document">
<xpath expr="//t[@t-call='web.internal_layout']" position="replace">
<!-- <xpath expr="//div[@class='page']" position="replace"> -->
<html>
<style>
/*hr {
border:none;
border-top:1px dotted #f00;
color:#fff;
background-color:#fff;
height:1px;
width:50%;
}*/
#head, #contact_info, #body, #receipt {
font-size: 16px;
font-family: 'arial', serif;
}
#head {
width:100%;
}
#head, #head tr, #head td {
border:none;
}
#head img {
width: 100px;
}
<xpath expr="." position="inside">
<link href="/kalachakra/static/src/css/rf.css" rel="stylesheet"/>
#head .right {
margin-left: 20px;
vertical-align: middle;
}
#head .title {
font-weight: bold;
font-size: 16px;
/* font-family: "Times New Roman", Times, serif; */
}
#head .subtitle {
/* font-family: "Times New Roman", Times, serif; */
font-size: 12px;
}
</xpath>
#contact_info {
text-align: justify;
position: relative;
left: 70%;
}
#contact_info .coordinates {
font-weight: bold;
}
#body {
margin-top:30px;
text-indent:30px;
}
#body div {
margin-top: 25px;
}
#body .first_line {
padding-left: 20px;
}
.clear {
clear: both;
}
#separator img {
width: 32px;
}
<!-- <xpath expr="//t[@t-call='web.internal_layout']" position="replace"> -->
#receipt_head {
/* width: 100%;*/
}
#receipt_head table {
border: solid 1px;
width: 99%;
text-align:center;
}
#receipt_head table td {
width: 33%;
}
#recipient .title {
text-align: center;
font-weight: bold;
}
#recipient .subtitle {
font-weight: bold;
}
#recipient .object {
margin-top:20px;
font-size:14px;
}
#recipient, #donor {
border: solid 1px;
margin-top: 10px;
padding:5px;
width:99%;
}
#recipient table {
width: 98%;
}
#recipient table td {
width: 49%;
}
#donor .title {
text-align:center;
}
#donor .donor_infos {
font-weight:bold;
}
#donor .donation_infos {
width: 98%;
}
#donor .donation_infos td.left {
padding-left:0px;
width: 40%;
}
#donor .donation_infos td.right {
width: 60%;
}
#donor .last {
padding-left: 50px;
}
#donor .signature {
font-weight:bold;
text-align:center;
}
/*#donor .signature {
text-align:center;
}*/
#donor .signatory {
text-align:right;
}
.signature img {
width: 120px;
position:relative;
left:150px;
}
#scissors {
width: 30px;
}
#separator .dotted {
border:none;
border-top: dashed 1px;
width:100%;
text-align:center;
/*padding-top:10px;*/
}
</style>
<xpath expr="//div[@class='page']" position="replace">
<div class="page" style="font-size: 15px !important;">
<table id="head">
<tr>
<td><img src="https://www.centre-kalachakra.com/images/logocentre-resized.jpg"></img></td>
<td>
<div class="title">Association Cultuelle Kalachakra – Roue de la Vie</div>
<div class="title">Associationnn Cultuelle Kalachakra – Roue de la Vie</div>
<div class="subtitle">Association Lois 1901 et 1905 -5 passage Delessert – 75010 PARIS</div>
<div class="phone">Tél/Fax : 01 40 05 02 22</div>
</td>
@ -240,9 +99,8 @@
</div>
</div>
</div>
</div>
</html>


+ 145
- 0
static/src/css/rf.css View File

@ -0,0 +1,145 @@
/*hr {
border:none;
border-top:1px dotted #f00;
color:#fff;
background-color:#fff;
height:1px;
width:50%;
}*/
#head, #contact_info, #body, #receipt {
font-size: 9px;
font-family: 'arial', serif;
}
#head {
width:100%;
}
#head, #head tr, #head td {
border:none;
}
#head img {
width: 100px;
}
#head .right {
margin-left: 20px;
vertical-align: middle;
}
#head .title {
font-weight: bold;
font-size: 16px;
/* font-family: "Times New Roman", Times, serif; */
}
#head .subtitle {
/* font-family: "Times New Roman", Times, serif; */
font-size: 12px;
}
#contact_info {
text-align: justify;
position: relative;
left: 70%;
}
#contact_info .coordinates {
font-weight: bold;
}
#body {
margin-top:30px;
text-indent:30px;
}
#body div {
margin-top: 25px;
}
#body .first_line {
padding-left: 20px;
}
.clear {
clear: both;
}
#separator img {
width: 32px;
}
#receipt_head {
/* width: 100%;*/
}
#receipt_head table {
border: solid 1px;
width: 99%;
text-align:center;
}
#receipt_head table td {
width: 33%;
}
#recipient .title {
text-align: center;
font-weight: bold;
}
#recipient .subtitle {
font-weight: bold;
}
#recipient .object {
margin-top:20px;
font-size:14px;
}
#recipient, #donor {
border: solid 1px;
margin-top: 10px;
padding:5px;
width:99%;
}
#recipient table {
width: 98%;
}
#recipient table td {
width: 49%;
}
#donor .title {
text-align:center;
}
#donor .donor_infos {
font-weight:bold;
}
#donor .donation_infos {
width: 98%;
}
#donor .donation_infos td.left {
padding-left:0px;
width: 40%;
}
#donor .donation_infos td.right {
width: 60%;
}
#donor .last {
padding-left: 50px;
}
#donor .signature {
font-weight:bold;
text-align:center;
}
/*#donor .signature {
text-align:center;
}*/
#donor .signatory {
text-align:right;
}
.signature img {
width: 120px;
position:relative;
left:150px;
}
#scissors {
width: 30px;
}
#separator .dotted {
border:none;
border-top: dashed 1px;
width:100%;
text-align:center;
/*padding-top:10px;*/
}

Loading…
Cancel
Save