Skip to content
Extraits de code Groupes Projets
Valider 8bdcab1d rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers

modification des templates

parent e948227e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
static/description/Signature-loic.png

77,4 ko

...@@ -3,162 +3,9 @@ ...@@ -3,162 +3,9 @@
<data> <data>
<template id="report_invoice_pylote" inherit_id="account.report_invoice_document"> <template id="report_invoice_pylote" inherit_id="account.report_invoice_document">
<!-- <xpath expr="//div[@class='page']" position="replace"> <xpath expr="//p[@t-if='o.reference']" position="replace">
<div class="page">
<div class="row">
<div name="invoice_address" class="col-xs-6">
<strong t-if="o.type == 'in_invoice' or o.type == 'in_refund'">Adresse de Facturation:</strong>
<span t-field="o.company_id.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: true}"/>
</div>
<div name="invoice_address" class="col-xs-6">
<strong t-if="o.type == 'in_invoice' or o.type == 'in_refund'"> Adresse Fournisseur:</strong>
<strong t-if="o.type != 'in_invoice'"> Adresse client:</strong>
<address t-field="o.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: True}"/>
<span t-if="o.partner_id.vat">TIN: <span t-field="o.partner_id.vat"/></span>
</div>
</div>
<h2>
<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Facture</span>
<span t-if="o.type == 'out_invoice' and o.state == 'proforma2'">PRO-FORMA</span>
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">Facture Brouillon</span>
<span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Facture Annulée</span>
<span t-if="o.type == 'out_refund'">Avoir</span>
<span t-if="o.type == 'in_refund'">Avoir Fournisseur</span>
<span t-if="o.type == 'in_invoice'">Facture Fournisseur</span>
<span t-field="o.number"/>
</h2>
<div class="row mt32 mb32">
<div class="col-xs-2" t-if="o.name">
<strong>Description:</strong>
<p t-field="o.name"/>
</div>
<div class="col-xs-2" t-if="o.date_invoice">
<strong>Date de facturation:</strong>
<p t-field="o.date_invoice"/>
</div>
<div class="col-xs-2" t-if="o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
<strong>Échéance:</strong>
<p t-field="o.date_due"/>
</div>
<div class="col-xs-2" t-if="o.origin">
<strong>Origine:</strong>
<p t-field="o.origin"/>
</div>
<div class="col-xs-2" t-if="o.partner_id.ref">
<strong>Votre Reference:</strong>
<p t-field="o.partner_id.ref"/>
</div>
<div name="reference" class="col-xs-2" t-if="o.reference and o.type == 'in_invoice'">
<strong>Notre Reference:</strong>
<p t-field="o.reference"/>
</div>
</div>
<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
<table class="table table-condensed">
<thead>
<tr>
<th>Description</th>
<th class="hidden">Document Source</th>
<th class="text-right">Quantité</th>
<th class="text-right">Prix unitaire</th>
<th t-if="display_discount" class="text-right">Remise (%)</th>
<th class="text-right">Taxes</th>
<th class="text-right">Prix HT</th>
</tr>
</thead>
<tbody class="invoice_tbody">
<tr t-foreach="o.invoice_line_ids" t-as="l">
<td><span t-field="l.name"/></td>
<td class="hidden"><span t-field="l.origin"/></td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.uom_id" groups="product.group_uom"/>
</td>
<td class="text-right">
<span t-field="l.price_unit"/>
</td>
<td t-if="display_discount" class="text-right">
<span t-field="l.discount"/>
</td>
<td class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.invoice_line_tax_ids))"/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.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 HT</strong></td>
<td class="text-right">
<span t-field="o.amount_untaxed" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
<t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
<tr>
<td><span t-esc="amount_by_group[0] if len(o.tax_line_ids) &gt; 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
<td class="text-right">
<span t-esc="amount_by_group[1]" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
</t>
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="o.amount_total" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
</table>
</div>
</div>
<div class="row" t-if="len(o.tax_line_ids) &gt; 1">
<div class="col-xs-6">
<table class="table table-condensed">
<thead>
<tr>
<th>Taxes</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.tax_line_ids" t-as="t">
<td><span t-field="t.tax_id.description"/></td>
<td class="text-right">
<span t-field="t.amount" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p t-if="o.comment">
<strong>Commentaire:</strong>
<span t-field="o.comment"/>
</p>
<p><strong>Approuvé par :</strong> Loic MARCHIN (CEO)</p> <p><strong>Approuvé par :</strong> Loic MARCHIN (CEO)</p>
<p t-if="o.payment_term_id"> </xpath>
<span t-field="o.payment_term_id.note"/>
</p>
<p t-if="o.fiscal_position_id.note">
<strong>Remarque sur les conditions de paiement:</strong>
<span t-field="o.fiscal_position_id.note"/>
</p>
<p>
<strong>IBAN</strong>: FR76 1780 7000 1495 3218 5744 266<br/>
<strong>BIC</strong>: CCBPFRPPTLS
</p>
</div>
</xpath> -->
</template> </template>
</data> </data>
......
...@@ -3,138 +3,60 @@ ...@@ -3,138 +3,60 @@
<data> <data>
<template id="report_purchase_pylote" inherit_id="purchase.report_purchaseorder_document"> <template id="report_purchase_pylote" inherit_id="purchase.report_purchaseorder_document">
<!-- <xpath expr="//div[@class='page']" position="replace"> <xpath expr="//div[@class='row mt32 mb32']" position="replace">
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-6">
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-field="o.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;, &quot;email&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/>
<p t-if="o.partner_id.vat">TVA: <span t-field="o.partner_id.vat"/></p>
</div>
</div>
<h2 t-if="o.state != 'draft'">Confirmation du Bon de commande #<span t-field="o.name"/></h2>
<h2 t-if="o.state == 'draft'">Demande de devis #<span t-field="o.name"/></h2>
<div class="row mt32 mb32"> <div class="row mt32 mb32">
<div t-if="o.s_summary" class="col-xs-3"> <div t-if="o.s_summary" class="col-3">
<strong>Objet:</strong> <strong>Objet:</strong>
<p t-field="o.s_summary"/> <p t-field="o.s_summary"/>
</div> </div>
<div t-if="o.s_contact" class="col-xs-3"> <div t-if="o.s_contact" class="col-3">
<strong>Contact:</strong> <strong>Contact:</strong>
<p t-field="o.s_contact" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;, &quot;email&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/> <p t-field="o.s_contact" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;, &quot;email&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/>
</div> </div>
<div t-if="o.name" class="col-xs-3"> <div t-if="o.name" class="col-3">
<strong>Notre référence:</strong> <strong>Our Order Reference:</strong>
<p t-field="o.name"/> <p t-field="o.name"/>
</div> <strong>Your Order Reference:</strong>
<div t-if="o.partner_ref" class="col-xs-3">
<strong>Votre référence:</strong>
<p t-field="o.partner_ref"/> <p t-field="o.partner_ref"/>
</div> </div>
<div t-if="o.date_order" class="col-xs-3"> <div t-if="o.date_order" class="col-3">
<strong>Date de commande:</strong> <strong>Order Date:</strong>
<p t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}"/> <p t-field="o.date_order"/>
</div> </div>
</div> </div>
</xpath>
<table class="table table-condensed"> <xpath expr="//table/thead/tr/th" position="before">
<thead>
<tr>
<th><strong>Nom</strong></th> <th><strong>Nom</strong></th>
<th><strong>Description</strong></th> </xpath>
<th><strong>Taxes</strong></th> <xpath expr="//table/tbody/tr/td" position="before">
<th class="text-center"><strong>Date demandée.</strong></th>
<th class="text-right"><strong>Qté</strong></th>
<th class="text-right"><strong>Prix unitaire</strong></th>
<th class="text-right"><strong>Prix net</strong></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.order_line" t-as="line">
<td> <td>
<span t-esc="line.product_id.name"/> <span t-esc="line.product_id.name"/>
</td> </td>
<td> </xpath>
<span t-field="line.name"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td>
<td class="text-center">
<span t-field="line.date_planned" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}"/>
</td>
<td class="text-right">
<span t-field="line.product_qty"/>
<span t-field="line.product_uom.name" groups="product.group_uom"/>
</td>
<td class="text-right">
<span t-field="line.price_unit" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
<td class="text-right">
<span t-field="line.price_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.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 HT</strong></td>
<td class="text-right">
<span t-field="o.amount_untaxed" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="o.amount_tax" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: 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-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
</td>
</tr>
</table>
</div>
</div>
<p t-field="o.notes"/> <xpath expr="//p[@t-field='o.notes']" position="after">
<p> <table class="table table-bordered" style="margin-top: 20px;">
<table style="width: 100%; table-layout: fixed;">
<tbody> <tbody>
<tr> <tr>
<td style="border: 1px solid black !important;height: 20px; padding: 5px"> <td style="height: 20px; padding: 5px">
<strong>Approuvé par : Loic MARCHIN (CEO)</strong> <strong>Approuvé par : Loic MARCHIN (CEO)</strong>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="border: 1px solid black !important;height: 20px; padding: 5px"> <td style="height: 20px; padding: 5px">
Date : <span t-if="o.state == 'purchase'" t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}"/> Date : <span t-if="o.state == 'purchase'" t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="border: 1px solid black !important;height: 100px; padding: 5px"> <td style="height: 100px; padding: 5px">
Signature : Signature :
<img t-if="o.state == 'purchase'" src="pylote_imprime/static/description/Signature-loic.jpg" style="height:150px;"/> <img t-if="o.state == 'purchase'" src="pylote_imprime/static/description/Signature-loic.png" style="height:150px;"/>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</p> </xpath>
<div>
<center><p style="font-size:10px;">Modèle Bon de Commande - version 01</p></center>
</div>
<div class="oe_structure"/>
</div>
</xpath> -->
</template> </template>
</data> </data>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter