|
@@ -0,0 +1,154 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+
|
|
|
+ <!-- Declarar el informe -->
|
|
|
+ <report
|
|
|
+ id="action_eiru_ticket_sharon"
|
|
|
+ string="Ticket"
|
|
|
+ model="account.invoice"
|
|
|
+ report_type="qweb-html"
|
|
|
+ name="eiru_ticket_sharon.partner_report"
|
|
|
+ file="ticket"
|
|
|
+ />
|
|
|
+
|
|
|
+ <record id="action_eiru_ticket_sharon" model="ir.actions.report.xml">
|
|
|
+ <field name="paperformat_id" ref="eiru_ticket_sharon.paperformat_ticker_sharon"/>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <!-- Informe -->
|
|
|
+ <template id="partner_report">
|
|
|
+ <t t-call="report.html_container">
|
|
|
+ <t t-foreach="doc_ids" t-as="doc_id">
|
|
|
+ <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'eiru_ticket_sharon.partner_report_document')"/>
|
|
|
+ </t>
|
|
|
+ </t>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template id="ticket">
|
|
|
+ <div class="page" style="font-size:10px;">
|
|
|
+ <style>
|
|
|
+ body {
|
|
|
+ color: #000;
|
|
|
+ font-family: Arial, Helvetica, sans-serif;
|
|
|
+ font-size: 14px;
|
|
|
+ letter-spacing: 0.0px;
|
|
|
+ line-height: 20px;
|
|
|
+ margin:0;
|
|
|
+ padding:0;
|
|
|
+ word-spacing:1px;
|
|
|
+ }
|
|
|
+ .text-lg {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .bordered {
|
|
|
+ border: 1px solid #000;
|
|
|
+ padding: 5px;
|
|
|
+ }
|
|
|
+ .centered {
|
|
|
+ position: absolute;
|
|
|
+ left: -50%;
|
|
|
+ top: -50%;
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+ .bottom {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0px;
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+ .top {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ max-width: 100%;
|
|
|
+ }
|
|
|
+ .separator {
|
|
|
+ border-top: 1px solid #000;
|
|
|
+ margin-top: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <section class="header">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <p class="text-center" style="margin-top: 20px; margin-bottom: 10px;"><span class="text-lg"><span t-field="o.company_id.name"/></span></p>
|
|
|
+ <p class="text-center">
|
|
|
+ <span t-if="o.number" t-field="o.number"/>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ Fecha: <span t-if="o.date_invoice" t-field="o.date_invoice"/>
|
|
|
+ <br/>
|
|
|
+ Vendedor: <span t-if="o.partner_id.name" t-field="o.partner_id.name"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ Cliente: <span t-if="o.partner_id.name" t-field="o.partner_id.name"/>
|
|
|
+ <br/>
|
|
|
+ Teléfono: <span t-if="o.partner_id.phone" t-field="o.partner_id.phone"/><t t-if="o.partner_id.mobile"> - <span t-field="o.partner_id.mobile"/></t>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row"><div class="col-xs-12"><div class="separator"/></div></div>
|
|
|
+ <br/>
|
|
|
+ <table class="table table-condensed" style="font-size:10px;border:none;">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>Producto</th>
|
|
|
+ <th>Cant.</th>
|
|
|
+ <th class="text-right">Precio</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody class="invoice_tbody">
|
|
|
+ <tr t-foreach="o.invoice_line" t-as="l" style="border:none;">
|
|
|
+ <td><span t-field="l.name"/></td>
|
|
|
+ <td>
|
|
|
+ <span t-field="l.quantity"/>
|
|
|
+ </td>
|
|
|
+ <td class="text-right">
|
|
|
+ <span t-field="l.price_unit"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12" style="font-size:10px;">
|
|
|
+ <table class="table table-condensed">
|
|
|
+ <tr class="border-black">
|
|
|
+ <td><strong>SubTotal</strong></td>
|
|
|
+ <td class="text-right">
|
|
|
+ <span t-field="o.amount_untaxed" t-field-options="{"widget": "monetary", "display_currency": "o.currency_id"}"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>IVA</td>
|
|
|
+ <td class="text-right">
|
|
|
+ <span t-field="o.amount_tax" t-field-options="{"widget": "monetary", "display_currency": "o.currency_id"}"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr class="border-black">
|
|
|
+ <td><strong>Total</strong></td>
|
|
|
+ <td class="text-right">
|
|
|
+ <span t-field="o.amount_total" t-field-options="{"widget": "monetary", "display_currency": "o.currency_id"}"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- Contenido del informe -->
|
|
|
+ <template id="partner_report_document">
|
|
|
+ <t t-call="report.html_container">
|
|
|
+ <t t-call="eiru_ticket_sharon.ticket"/>
|
|
|
+ </t>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </data>
|
|
|
+</openerp>
|