fix_views_14_extended/pedido_o_cotizacion_agofer.xml

390 lines
22 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<t t-call="web.basic_layout">
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)"/>
<div class="header">
<div class="row">
<div class="col-sm-9">
<div class="card card-info">
<div class="card-heading">
<h1 class="card-title" style="color:black;">
<t t-set="es_cotizacion" t-value="doc.state not in ['progress','manual','done']"/>
<strong t-if="es_cotizacion">Cotización </strong>
<strong t-if="not es_cotizacion">Pedido de Venta </strong>
<strong t-if="es_cotizacion and doc.state == 'cancel'"> anulada </strong>
<strong t-if="not es_cotizacion and doc.state == 'cancel'"> anulado </strong>
<span t-field="doc.name"/>
<small t-if="doc.state == 'shipping_except'"> [⚠ Excepción en envío]</small>
<small t-if="doc.state == 'invoice_except'"> [⚠ Excepción en facturación]</small>
<small class="not-first-page"> (…continúa)</small>
</h1>
</div>
<div class="card-body">
<div class="col-sm-4">
<p>
<strong>Fecha:</strong>
<span t-field="doc.date_order" t-field-options="{&quot;format&quot;:&quot;YYYY-MM-dd&quot;}"/>
</p>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']" class="col-auto col-3 mw-100 mb-2" name="expiration_date">
<strong>Expiration:</strong>
<p class="m-0" t-field="doc.validity_date"/>
</div>
<!-- p t-if="doc.date_confirm">
<strong>Fecha de confirmación:</strong><br/>
<span t-field="doc.date_confirm" />
</p>
<p t-if="doc.date_aprobado_credito">
<strong>Fecha de aprobación crédito:</strong><br/>
<span t-field="doc.date_aprobado_credito" />
</p -->
</div>
<div class="col-sm-8">
<p t-if="doc.payment_term_id.note">
<strong>Condición de pago:</strong>
<span t-field="doc.payment_term_id.note" style="font-weight:normal;"/>
</p>
<p>
<t t-if="doc.incoterm">
<strong>Términos de negociación: </strong>
<code t-esc="doc.incoterm.code"/>:
<t t-esc="doc.incoterm.name"/>
</t>
</p>
</div>
</div>
</div>
</div>
<div class="col-sm-3 text-center">
<img t-if="doc.company_id.logo" t-att-src="'data:image/png;base64,%s' % doc.company_id.logo" width="153" height="80"/>
<!-- h4><small>NIT 800.216.4991</small></h4 -->
</div>
</div>
</div>
<div class="page">
<t t-set="weight" t-value="'{:,.2f}'.format(sum((l.product_id.weight &gt; 0 and l.product_id.weight * l.product_uom_qty or 0) for l in doc.order_line))"/>
<div class="row">
<div class="col-sm-9">
<div class="card card-info">
<div class="card-heading">
<h3 class="card-title" style="color:black;">
<strong t-field="doc.partner_id.name"/>
&#160;
<span class="text-nowrap">
<span t-field="doc.partner_id.ref_type_id.name"/> <span t-field="doc.partner_id.ref"/><span t-if="doc.partner_id.ref_type_id.code == 'NI'"><span t-raw="doc.partner_id.dev_ref"/></span>
</span>
</h3>
</div>
<div class="card-body">
<div t-attf-class="{{ doc.partner_shipping_id != doc.partner_id and 'col-sm-6' or 'col-sm-12' }}">
<div class="list-group mb0">
<h4 class="h5 list-group-item-heading" t-if="doc.partner_shipping_id == doc.partner_id">Dirección:</h4>
<h4 class="h5 list-group-item-heading" t-if="doc.partner_shipping_id != doc.partner_id">Dirección de facturación:</h4>
<p class="list-group-item-text" t-field="doc.partner_id.street"/>
<t t-if="doc.partner_id.street2">
<p class="list-group-item-text" t-field="doc.partner_id.street2"/>
</t>
<p class="list-group-item-text"><span t-field="doc.partner_id.city_id.name"/>, <span class="list-group-item-text" t-field="doc.partner_id.state_id.name"/></p>
<p class="list-group-item-text" t-if="doc.partner_id.phone" itemprop="telephone"><i class="fa fa-phone"/><span t-field="doc.partner_id.phone"/></p>
<p class="list-group-item-text" t-if="doc.partner_id.email" itemprop="email"><small t-field="doc.partner_id.email"/></p>
</div>
</div>
<div t-if="doc.partner_shipping_id != doc.partner_id" class="col-sm-6">
<div class="list-group mb0">
<h4 class="h5 list-group-item-heading">
Dirección de envío:
</h4>
<p class="list-group-item-text" t-field="doc.partner_shipping_id.street"/>
<t t-if="doc.partner_id.street2">
<p class="list-group-item-text" t-field="doc.partner_shipping_id.street2"/>
</t>
<p class="list-group-item-text"><span t-field="doc.partner_shipping_id.city_id.name"/>, <span class="list-group-item-text" t-field="doc.partner_shipping_id.state_id.name"/></p>
<p class="list-group-item-text" t-if="doc.partner_shipping_id.phone" itemprop="telephone"><i class="fa fa-phone"/><span t-field="doc.partner_shipping_id.phone"/></p>
<p class="list-group-item-text" t-if="doc.partner_shipping_id.email" itemprop="email"><span t-field="doc.partner_shipping_id.email"/></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-3 input-group">
<p style="font-size:9t; line-height:10pt;">
Agofer S.A.S. NIT 800.216.4991 :
</p>
<ul class="fa-ul" style="font-size:8pt; line-height:9pt; margin-left:1.2em;">
<li><i class="fa-li fa fa-caret-right"/>
Autorretenedor Res. №0010 1994-02-11
</li>
<li><i class="fa-li fa fa-caret-right"/>
Gran contribuyente Res. №000076 2016-12-01
</li>
<li><i class="fa-li fa fa-caret-right"/>
Régimen Común y Agente Retenedor de IVA
</li>
<li><i class="fa-li fa fa-caret-right"/>
Actividad Económica CIIU 4752
</li>
</ul>
</div>
</div>
<div class="row mt4 mb8">
<div class="col-sm-3">
<strong>
<t t-esc="doc.partner_id.user_id.employee_id.gender == 'female' and 'Asesora' or 'Asesor'"/> comercial:
</strong>
<p>
<span t-field="doc.partner_id.user_id.first_name"/>
<t t-if="doc.partner_id.user_id.second_name">
<span t-esc="doc.partner_id.user_id.second_name[:1]"/>.
</t>
<span t-field="doc.partner_id.user_id.first_surname"/>
<br/>
<small t-field="doc.partner_id.user_id.email"/>
<br/>
<em t-if="doc.partner_id.user_id != doc.user_id">
<small>
(<i class="fa fa-print"></i> <t t-esc="doc.user_id.first_name[:1]"/><t t-if="doc.user_id.second_name"><t t-esc="doc.user_id.second_name[:1]"/></t><t t-esc="doc.user_id.first_surname[:1]"/>)
</small>
</em>
</p>
</div>
<div class="col-sm-3">
<strong>Peso teórico total:</strong>
<p><t t-raw="weight"/> kg</p>
</div>
<div t-if="doc.client_order_ref" class="col-sm-3">
<strong>Orden de compra:</strong>
<p t-field="doc.client_order_ref"/>
</div>
<div t-if="not es_cotizacion and doc.warehouse_id" class="col-sm-3">
<strong>Origen:</strong>
<p>
<span t-field="doc.warehouse_id.name"/>
<i t-if="doc.warehouse_id.code[-2:] == '04'" class="fa fa-exclamation-triangle"></i>
</p>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Description</th>
<th class="text-center" colspan="2">Quantity</th>
<th class="text-right">Unit Price</th>
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
<th class="text-right">Valor</th>
<th class="text-right">IVA</th>
</tr>
</thead>
<tbody class="invoice_tbody">
<tr t-foreach="doc.order_line" t-as="l">
<t t-set="iva"/>
<t t-foreach="l.tax_id" t-as="tax">
<t t-if="tax.description[:3] == 'IVA'">
<t t-set="iva" t-value="tax.name[-4:]"/>
</t>
</t>
<td>
<tt>
<small t-field="l.product_id.code"/>
</tt>
<span t-field="l.product_id.name"/>
</td>
<td class="text-right">
<span t-esc="'{:,.2f}'.format(l.product_uom_qty)"/>
</td>
<td>
<span t-field="l.product_uom" groups="product.group_uom"/>
</td>
<td class="text-right">
<span t-esc="'{:,.0f}'.format(l.price_unit)"/>
</td>
<td class="text-right" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
<td class="text-right">
<span t-field="l.price_subtotal" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;doc.currency_id&quot;}"/>
</td>
<td class="text-right">
<small><t t-esc="iva"/></small>
</td>
</tr>
</tbody>
</table>
<div style="page-break-inside:avoid;">
<div class="row mb4">
<div class="col-sm-7">
<div>
<p t-if="doc.note">
<strong>Observaciones</strong><br/>
<span t-esc="'\n'.join([line for line in doc.note.split('\n') if line.strip() != ''])"/>
</p>
<p t-if="doc.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position_id.note"/>
</p>
<div t-if="not es_cotizacion" class="alert alert-info mb8" style="padding:8px;">
<p class="text-justify text-default" style="font-size:9pt;line-height:9pt;color:black;">
Este <strong>pedido de venta</strong> recoge las
condiciones comerciales pactadas entre Agofer y el
cliente; Agofer emitirá factura de venta al momento
de entregar la mercancía.
No se aceptan reclamos después de 10 días de emitida la
factura.
Consulte nuestra <em>Promesa Comercial</em> en
<u>agofer.co/politicas/</u>
</p>
</div>
</div>
</div>
<div class="col-sm-4 pull-right mb4">
<table class="table table-condensed mb2">
<tr class="border-black">
<td><strong>Total Without Taxes</strong></td>
<td class="text-right">
<span t-field="doc.amount_untaxed" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;doc.currency_id&quot;}"/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="doc.amount_tax" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;doc.currency_id&quot;}"/>
</td>
</tr>
<tr class="border-black">
<td>
<strong>
Total
</strong>
</td>
<td class="text-right">
<span t-field="doc.amount_total" t-field-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: &quot;doc.currency_id&quot;}"/>
</td>
</tr>
</table>
<div t-if="not es_cotizacion" class="text-right bg-info" style="padding:4pt;">
<p style="line-height:8pt;font-size:8pt;">
<span class="text-capitalize" t-esc="doc.amount_total" t-esc-options="{&quot;widget&quot;: &quot;num2words&quot;}"/>&amp;nbsp;Pesos.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card card-default">
<div class="card-body" style="min-height:3.2cm; padding-top: 0px;">
<div t-if="doc.empresa_transporte" class="list-group mb0">
<p class="list-group-item-text">
<span t-field="doc.empresa_transporte.name"/>
<span class="text-nowrap">
<span t-field="doc.empresa_transporte.ref_type_id.name"/> <span t-field="doc.empresa_transporte.ref"/><span t-if="doc.empresa_transporte.ref_type_id.code == 'NI'"><span t-raw="doc.empresa_transporte.dev_ref"/></span>
</span>
</p>
<p t-if="doc.empresa_transporte.mobile" class="list-group-item-text" itemprop="telephone">
<i class="fa fa-mobile"/><span t-field="doc.empresa_transporte.mobile"/>
</p>
<p t-if="not doc.empresa_transporte.mobile" class="list-group-item-text" itemprop="telephone">
<i class="fa fa-mobile"/><span t-field="doc.empresa_transporte.phone"/>
</p>
</div>
<div t-if="not doc.empresa_transporte" class="list-group mb0">
<p class="list-group-item-text">
<span t-field="doc.nombre_transportador"/>
</p>
<p class="list-group-item-text">
<span t-field="doc.cedula_transportador"/>
</p>
<p t-if="doc.celular_transportador" class="list-group-item-text">
<i class="fa fa-mobile"/><span t-field="doc.celular_transportador"/>
</p>
</div>
<div t-if="doc.placa_transportador">
<strong>Placa: </strong>
<kbd t-field="doc.placa_transportador"/>
</div>
<div t-if="doc.direccion_despacho">
<strong>Dirección autorizada de envío: </strong>
<span t-field="doc.direccion_despacho"/>
</div>
</div>
<div class="card-footer" style="padding:2px;">
<small t-if="doc.incoterm and doc.incoterm.code in ['EXW','EXD']" style="font-size:8pt; font-weight:normal; line-height:8pt;">
Datos personal autorizado para retiro
</small>
<small t-if="not doc.incoterm or doc.incoterm.code not in ['EXW','EXD']" style="font-size:8pt; font-weight:normal; line-height:8pt;">
Datos transportista autorizado para entrega
</small>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card card-default">
<div class="card-body" style="min-height:3.2cm; padding-top: 0px;">
<small style="font-size:8pt; font-weight:normal; line-height:8pt;">
<t t-if="es_cotizacion">
Acepto esta cotización y autorizo se elabore
Pedido de Venta
</t>
<!-- Idea: este mensaje puede incluir "estoy
autorizado para firmar en nombre de la
empresa", si es una persona jurídica. También
puede detectar si hay personas autorizadas
para transporte, y solo incluir la firma de
autorización en ese caso -->
<t t-if="not es_cotizacion">
Acepto las condiciones contenidas en este
pedido de venta, y autorizo a las pesonas aquí
detalladas a recoger la mercancía en mi nombre.
</t>
</small>
</div>
<div class="card-footer" style="padding:2px;">
<small style="font-size:8pt; font-weight:normal; line-height:8pt;">
Nombre | CC | Firma | Sello | Fecha
</small>
</div>
</div>
</div>
</div>
<div t-if="doc.signature" class="mt32 ml64 mr4" name="signature">
<div class="offset-8">
<strong>Signature</strong>
</div>
<div class="offset-8">
<img t-att-src="image_data_uri(doc.signature)" style="max-height: 4cm; max-width: 8cm;"/>
</div>
<div class="offset-8 text-center">
<p t-field="doc.signed_by"/>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="text-center" style="border-top: 1px solid black;">
<small>
<span t-field="doc.company_id.rml_footer"/><br/>
</small>
</div>
<div class="row">
<div class="col-sm-2">
<t t-set="abc"/>
<t t-foreach="doc.partner_id.category_id" t-as="cat">
<t t-if="cat.parent_id and cat.parent_id.name == 'ABC'">
<strong t-raw="cat.name" style="display:inline-block; border-radius:50%; width:18px; height:18px; padding:2px; border:1px solid #444; color:#444; text-align:center; font: 10px sans-serif;"/>
<t t-set="abc" t-value="True"/>
</t>
</t>
<i t-if="not abc" class="fa fa-user"></i>
</div>
<div class="col-sm-8 text-center">
<small>
<strong>
#QuedateEnCasa
<t t-if="es_cotizacion"> <i class="fa fa-smile-o"></i> </t>
<t t-if="not es_cotizacion"> <i class="fa fa-home"></i> </t>
<span t-field="doc.company_id.website"/>
</strong>
</small>
</div>
<div t-if="es_cotizacion" class="col-sm-2">
<small><code>P-V-01-R02 / v.2</code></small>
</div>
</div>
</div>
</t>