[ADD]l10n_pe_sale_report: sale pdf template

H11328
This commit is contained in:
Leo Pinedo
2022-11-26 00:33:05 +00:00
parent 4103b744b4
commit 8d42e6b047
7 changed files with 175 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import models

View File

@@ -0,0 +1,19 @@
{
'name': 'Peru - Quotation Report',
'version': '15.0.1.0.0',
'author': 'Hibou Corp. <hello@hibou.io>',
'website': 'https://hibou.io/',
'license': 'AGPL-3',
'category': 'Sale',
'complexity': 'easy',
'description': """ """,
'depends': [
'sale',
],
'data': [
'report/quotation_peru_reports.xml',
'report/quotation_peru_templates.xml',
],
'installable': True,
'auto_install': False,
}

View File

@@ -0,0 +1 @@
from . import sale

View File

@@ -0,0 +1,5 @@
from odoo import models
class SaleOrder(models.Model):
_inherit = 'sale.order'

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_peru_quotation" model="ir.actions.report">
<field name="name">Peru Quotation</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_pe_sale_report.peru_quotation_view</field>
<field name="report_file">l10n_pe_sale_report.peru_quotation_view</field>
<field name="print_report_name">(object._get_report_base_filename())</field>
<field name="binding_model_id" ref="model_sale_order"/>
<field name="binding_type">report</field>
</record>
</odoo>

View File

@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="peru_quotation_view">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<div class="row" style="margin-bottom:10px;">
<div class="col-8">
<p>Sr(es): <span t-field="o.partner_id"/></p>
</div>
<div class="col-4" style="text-align:center;">
<h4 t-field="o.name"/>
<p>Cotización</p>
<h6>Fecha: <span t-field="o.date_order" t-options="{'widget': 'date'}"/></h6>
</div>
</div>
<table class="table table-sm table-bordered" border="0" cellpadding="0" cellspacing="0">
<!-- <table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;"> -->
<thead>
<tr style="background-color:#AAB7B8;">
<td><strong>Detalle</strong></td>
<td><strong>Cantidad</strong></td>
<td><strong>P.Unitario</strong></td>
<td><strong>Total/Mes</strong></td>
<td><strong>Total/1er Año</strong></td>
<td><strong>Total/2er Año</strong></td>
</tr>
</thead>
<tbody>
<!-- TODO: use for by line of product -->
<t t-foreach="o.order_line" t-as="line">
<tr>
<!-- <td><span t-field="o.fieldname"/></td> -->
<td><span t-field="line.product_id"/></td>
<td><span t-field="line.product_uom_qty"/></td>
<td><span t-field="line.price_unit"/></td>
<td><span t-field="line.price_subtotal"/></td>
<!-- <t t-set="year" t-value="line.get_price_by_year()">
<td><span t-esc="year"/></td>
<td><span t-esc="year"/></td> -->
<td></td>
<td></td>
</tr>
</t>
<tr style="background-color:#16A085;">
<td colspan="4">
<strong>Total (licencias/alojamiento)/Año</strong>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4" style="background-color:#16A085;">
<strong>Total Implementacion de modulos**</strong>
</td>
<td style="background-color:#16A085;"></td>
<td></td>
</tr>
<tr>
<td colspan="4">
<strong>Sub total</strong>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="4">
<strong>IGV 18%</strong>
</td>
<td></td>
<td></td>
</tr>
<tr style="background-color:#FAD7A0;">
<td colspan="4">
<strong>Total/Año***</strong>
</td>
<td></td>
<td></td>
</tr>
<tr/>
<tr style="background-color:#AAB7B8;">
<td><strong>Detalle</strong></td>
<td><strong>Cantidad</strong></td>
<td><strong>P.Unitario</strong></td>
<td><strong>Total/Mes</strong></td>
<td><strong>Total/1er Año</strong></td>
<td><strong>Total/2er Año</strong></td>
</tr>
<tr>
<!-- <td><span t-field="o.fieldname"/></td> -->
<td style="background-color:#FAD7A0;">Licencia de Odoo</td>
<!-- TODO qty only of license -->
<td style="background-color:#FAD7A0;"></td>
<td style="background-color:#FAD7A0;">$10.90</td>
<!-- TODO: qty * price unit -->
<td style="background-color:#FAD7A0;"></td>
<!-- TODO: price month * 12 -->
<td style="background-color:#FAD7A0;"></td>
<td/>
</tr>
<tr>
<td colspan="5" style="background-color:#FAD7A0;">
<p>Esto es un estimado. Las licencias de Odoo son contratadas directamente con Odoo.<br/>
El precio se mantendrá fijo durante la vigencia del contrato.<br/>
Los costos por el hosting de odoo.sh no estan incluidos.</p>
</td>
<td/>
</tr>
<tr>
<td colspan="5" style="background-color:#FAD7A0;">
<p>Se incluye todos los módulos de Odoo sin configuración.<br/>
Para visualizar la lista, por favor entre al siguiente enlace:<br/>
<a href="https://www.odoo.com/es_ES/page/all-apps">https://www.odoo.com/es_ES/page/all-apps</a></p>
</td>
<td></td>
</tr>
</tbody>
</table>
<p>**Módulos implementados/configurados: Uso general de Odoo</p>
<p>**Precios cambian de acuerdo a la implementación de nuevos módulos</p>
<!-- TODO insert QR code -->
<div name="footer_left_column" position="inside" style="text-align:right;">
<!-- Example <img t-if="o.l10n_ar_afip_qr_code" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('QR', o.l10n_ar_afip_qr_code, 400, 400)" alt="QR Code" style="height:100px"/> -->
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('QR', o.name, 400, 400)" alt="QR Code" style="height:100px"/>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB