|
@@ -0,0 +1,144 @@
|
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
+<openerp>
|
|
|
|
+ <data>
|
|
|
|
+ <template id="report_saleorder_document">
|
|
|
|
+ <t t-call="new_pdf_formats.new_external_layout">
|
|
|
|
+ <div class="page">
|
|
|
|
+ <div class="oe_structure"/>
|
|
|
|
+ <h2>
|
|
|
|
+ <span t-if="o.state not in ['draft','sent']">Order N° </span>
|
|
|
|
+ <span t-if="o.state in ['draft','sent']">Presupuesto N° </span>
|
|
|
|
+ <span t-field="o.name"/>
|
|
|
|
+ </h2>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-xs-6">
|
|
|
|
+ <div t-if="o.partner_id">
|
|
|
|
+ <strong>Cliente:</strong>
|
|
|
|
+ <span t-field="o.partner_id"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.ruc">
|
|
|
|
+ <strong>Cédula / R.U.C:</strong>
|
|
|
|
+ <span t-field="o.ruc"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.street">
|
|
|
|
+ <strong>Dirección:</strong>
|
|
|
|
+ <span t-field="o.street"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.state_id">
|
|
|
|
+ <strong>Departamento:</strong>
|
|
|
|
+ <span t-field="o.state_id"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.country_id">
|
|
|
|
+ <strong>Pais:</strong>
|
|
|
|
+ <span t-field="o.country_id"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.phone">
|
|
|
|
+ <strong>Teléfono:</strong>
|
|
|
|
+ <span t-field="o.phone"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-xs-6">
|
|
|
|
+ <div t-if="o.client_order_ref">
|
|
|
|
+ <strong>Referencia:</strong>
|
|
|
|
+ <span t-field="o.client_order_ref"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.date_order">
|
|
|
|
+ <strong t-if="o.state not in ['draft','sent']">Fecha del pedido:</strong>
|
|
|
|
+ <strong t-if="o.state in ['draft','sent']">Fecha del presupuesto:</strong>
|
|
|
|
+ <span t-field="o.date_order"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.user_id.name">
|
|
|
|
+ <strong>Vendedor:</strong>
|
|
|
|
+ <span t-field="o.user_id.name"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div t-if="o.payment_term">
|
|
|
|
+ <strong>Condiciones de pago:</strong>
|
|
|
|
+ <span t-field="o.payment_term"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div style="width:20px; height:20px;"/>
|
|
|
|
+
|
|
|
|
+ <table class="table table-condensed table-bordered">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="text-right">Cantidad</th>
|
|
|
|
+ <th>Descripción</th>
|
|
|
|
+ <th class="text-right">Precio unitario</th>
|
|
|
|
+ <th class="text-right" groups="sale.group_discount_per_so_line">Desc.(%)</th>
|
|
|
|
+ <th class="text-right">Impuestos</th>
|
|
|
|
+ <th class="text-right">Precio</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="sale_tbody">
|
|
|
|
+ <tr t-foreach="o.order_line" t-as="l">
|
|
|
|
+ <td class="text-right">
|
|
|
|
+ <span t-field="l.product_uom_qty"/>
|
|
|
|
+ <span groups="product.group_uom" t-field="l.product_uom"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <span t-field="l.name"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-right">
|
|
|
|
+ <span t-field="l.price_unit"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-right" groups="sale.group_discount_per_so_line">
|
|
|
|
+ <span t-field="l.discount"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <span class="text-right" t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-right">
|
|
|
|
+ <span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ <div class="row">
|
|
|
|
+ <div class="col-xs-4 pull-right">
|
|
|
|
+ <table class="table table-condensed">
|
|
|
|
+ <tr class="border-black">
|
|
|
|
+ <td><strong>Total sin impuestos</strong></td>
|
|
|
|
+ <td class="text-right">
|
|
|
|
+ <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td>Impuestos</td>
|
|
|
|
+ <td class="text-right">
|
|
|
|
+ <span t-field="o.amount_tax" t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.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.pricelist_id.currency_id"}'/>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <strong>Peso Total:</strong>
|
|
|
|
+ <span t-field="o.total_weight"/> Kg
|
|
|
|
+ </div>
|
|
|
|
+ <p t-field="o.note" />
|
|
|
|
+ <p t-if="o.payment_term.note">
|
|
|
|
+ <strong>Condiciones de pago:</strong>
|
|
|
|
+ <span t-field="o.payment_term.note"/>
|
|
|
|
+ </p>
|
|
|
|
+ <div class="oe_structure"/>
|
|
|
|
+ </div>
|
|
|
|
+ </t>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <template id="report_saleorder">
|
|
|
|
+ <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', 'new_pdf_formats.report_saleorder_document')"/>
|
|
|
|
+ </t>
|
|
|
|
+ </t>
|
|
|
|
+ </template>
|
|
|
|
+ </data>
|
|
|
|
+</openerp>
|