Browse Source

[ADD] Beescard

w
pull/15/head
Thibault Francois 8 years ago
parent
commit
3c6ee31e41
  1. 3
      beesdoo_base/__openerp__.py
  2. 165
      beesdoo_base/report/beescard.xml
  3. BIN
      beesdoo_base/static/font/Roboto-Bold.ttf
  4. BIN
      beesdoo_base/static/font/Roboto-Regular.ttf
  5. BIN
      beesdoo_base/static/src/img/logo.png
  6. BIN
      beesdoo_base/static/src/img/redline.png

3
beesdoo_base/__openerp__.py

@ -15,7 +15,7 @@
'category': 'Project Management',
'version': '0.1',
'depends': ['point_of_sale', 'purchase'],
'depends': ['point_of_sale', 'purchase', 'report'],
'data': [
'security/groups.xml',
@ -24,5 +24,6 @@
'wizard/views/member_card.xml',
'wizard/views/partner.xml',
'data/default_contact.xml',
'report/beescard.xml',
],
}

165
beesdoo_base/report/beescard.xml

@ -0,0 +1,165 @@
<odoo>
<report id="report_beescard_cm" string="Beescaard" model="res.partner"
report_type="qweb-html" file="beesdoo_base.beescard_template_cm"
name="beesdoo_base.beescard_template_cm" />
<!-- Use paper format a4 low margin -->
<template id="beescard_template_cm">
<head>
<style type="text/css">
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'),
url('/beesdoo_base/static/font/Roboto-Regular.ttf')
format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'),
url('/beesdoo_base/static/font/Roboto-Bold.ttf')
format('truetype');
}
</style>
</head>
<!-- X1.133 -->
<t t-call="report.html_container">
<div class="page">
<t t-foreach="docs" t-as="partner">
<table
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
<tr>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
<tr>
<td></td>
<td
style="width: 4.98cm;vertical-align:bottom;height: 6.87cm;">
<div
style="padding-top:0.2cm;padding-left:0.1cm;padding-bottom:0.2cm;">
<img alt="Embedded Image"
t-att-src="'data:image/png;base64,' + partner.image"
style="width:4.7cm;height:6.4cm" />
</div>
</td>
<td
style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;">
<p
style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;">
<span t-raw="partner.first_name and partner.first_name[:30] or ''"
style="font-family:Roboto-Regular" />
<br />
<span t-raw="partner.last_name and partner.last_name[:26] or ''"
style="font-family:Roboto-Bold;" />
<br />
</p>
<p
style="font-size: 0.8em;font-family:Roboto-Regular">
<t t-if="partner.parent_eater_id">
<span
t-raw="'[' + (partner.parent_eater_id.first_name and partner.parent_eater_id.first_name[:30] or '') + ' ' + (partner.parent_eater_id.last_name and partner.parent_eater_id.last_name[:30] or '') + ']'"
style="font-family:Roboto-Regular" />
</t>
</p>
<div style="position: absolute;bottom: 0;">
<div style="padding-top:0.3cm">
<img
t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;humanreadable=%s'%('EAN13', partner.barcode if not partner.parent_eater_id else partner.parent_barcode, 340, 70, 1)"
style="width:7.2cm;height:2.52cm" />
</div>
<div
style="padding-top:0.2cm;padding-bottom:0.2cm;">
<img
src="/beesdoo_base/static/src/img/redline.png"
style="width:7.2cm;height:0.2cm" />
</div>
</div>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td colspan="2"
style="vertical-align:center;height: 1.20cm;">
<p
style="text-align:center;font-size:0.8em;font-family:Roboto-Regular">En cas de perte,
prévenez-nous via
membre@bees-coop.be
</p>
</td>
<td></td>
</tr>
<tr>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
</table>
<table
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
<tr>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
<tr>
<td></td>
<td style="width: 12.7cm;height: 6.87cm;">
<img
src="/beesdoo_base/static/src/img/logo.png"
style="display: block;margin-left: auto;margin-right: auto;margin-top:0.2cm;margin-bottom:0.2cm;width:6.46cm;height:6.46cm" />
</td>
<td></td>
</tr>
<tr>
<td></td>
<td style="height: 1.20cm;">
<p
style="text-align:center;font-family:Roboto-Regular;font-size:1.1em;">www.bees-coop.be
</p>
</td>
<td></td>
</tr>
<tr>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
</table>
<br />
</t>
</div>
</t>
</template>
</odoo>

BIN
beesdoo_base/static/font/Roboto-Bold.ttf

BIN
beesdoo_base/static/font/Roboto-Regular.ttf

BIN
beesdoo_base/static/src/img/logo.png

After

Width: 567  |  Height: 567  |  Size: 42 KiB

BIN
beesdoo_base/static/src/img/redline.png

After

Width: 430  |  Height: 12  |  Size: 223 B

Loading…
Cancel
Save