diff --git a/static/description/Signature-loic.png b/static/description/Signature-loic.png new file mode 100644 index 0000000000000000000000000000000000000000..177bdc87a0a8301c8c855fc75805dfd9a01764c4 Binary files /dev/null and b/static/description/Signature-loic.png differ diff --git a/views/report_invoice.xml b/views/report_invoice.xml index 29c1a0b4d9ab1d16340c09ff2c0f21f0628f709b..d7e711d3dbc8beca18945272b22ca6c451abd9c0 100644 --- a/views/report_invoice.xml +++ b/views/report_invoice.xml @@ -3,162 +3,9 @@ <data> <template id="report_invoice_pylote" inherit_id="account.report_invoice_document"> - <!-- <xpath expr="//div[@class='page']" 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="{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": 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="{"widget": "contact", "fields": ["address", "name"], "no_marker": 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="{"widget": "monetary", "display_currency": 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="{"widget": "monetary", "display_currency": 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) > 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="{"widget": "monetary", "display_currency": 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="{"widget": "monetary", "display_currency": o.currency_id}"/> - </td> - </tr> - </table> - </div> - </div> - - <div class="row" t-if="len(o.tax_line_ids) > 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="{"widget": "monetary", "display_currency": 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 t-if="o.payment_term_id"> - <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> --> + <xpath expr="//p[@t-if='o.reference']" position="replace"> + <p><strong>Approuvé par :</strong> Loic MARCHIN (CEO)</p> + </xpath> </template> </data> diff --git a/views/report_purchase_order.xml b/views/report_purchase_order.xml index 89018e5f609948cebf8dda66d4c5b47865ae52dc..8454b45d0825125abb9c087a74b2add092a8206d 100644 --- a/views/report_purchase_order.xml +++ b/views/report_purchase_order.xml @@ -3,138 +3,60 @@ <data> <template id="report_purchase_pylote" inherit_id="purchase.report_purchaseorder_document"> - <!-- <xpath expr="//div[@class='page']" 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="{"widget": "contact", "fields": ["address", "name", "phone", "fax", "email"], "no_marker": True, "phone_icons": True}"/> - <p t-if="o.partner_id.vat">TVA: <span t-field="o.partner_id.vat"/></p> - </div> + <xpath expr="//div[@class='row mt32 mb32']" position="replace"> + <div class="row mt32 mb32"> + <div t-if="o.s_summary" class="col-3"> + <strong>Objet:</strong> + <p t-field="o.s_summary"/> </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 t-if="o.s_summary" class="col-xs-3"> - <strong>Objet:</strong> - <p t-field="o.s_summary"/> - </div> - <div t-if="o.s_contact" class="col-xs-3"> - <strong>Contact:</strong> - <p t-field="o.s_contact" t-options="{"widget": "contact", "fields": ["name", "phone", "fax", "email"], "no_marker": True, "phone_icons": True}"/> - </div> - <div t-if="o.name" class="col-xs-3"> - <strong>Notre référence:</strong> - <p t-field="o.name"/> - </div> - <div t-if="o.partner_ref" class="col-xs-3"> - <strong>Votre référence:</strong> - <p t-field="o.partner_ref"/> - </div> - <div t-if="o.date_order" class="col-xs-3"> - <strong>Date de commande:</strong> - <p t-field="o.date_order" t-field-options="{"format": "yyyy-MM-dd"}"/> - </div> + <div t-if="o.s_contact" class="col-3"> + <strong>Contact:</strong> + <p t-field="o.s_contact" t-options="{"widget": "contact", "fields": ["name", "phone", "fax", "email"], "no_marker": True, "phone_icons": True}"/> </div> - - <table class="table table-condensed"> - <thead> - <tr> - <th><strong>Nom</strong></th> - <th><strong>Description</strong></th> - <th><strong>Taxes</strong></th> - <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> - <span t-esc="line.product_id.name"/> - </td> - <td> - <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="{"format": "yyyy-MM-dd"}"/> - </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="{"widget": "monetary", "display_currency": o.currency_id}"/> - </td> - <td class="text-right"> - <span t-field="line.price_subtotal" t-options="{"widget": "monetary", "display_currency": 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="{"widget": "monetary", "display_currency": o.currency_id}"/> - </td> - </tr> - <tr> - <td>Taxes</td> - <td class="text-right"> - <span t-field="o.amount_tax" t-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-options="{"widget": "monetary", "display_currency": o.currency_id}"/> - </td> - </tr> - </table> - </div> + <div t-if="o.name" class="col-3"> + <strong>Our Order Reference:</strong> + <p t-field="o.name"/> + <strong>Your Order Reference:</strong> + <p t-field="o.partner_ref"/> </div> - - <p t-field="o.notes"/> - <p> - <table style="width: 100%; table-layout: fixed;"> - <tbody> - <tr> - <td style="border: 1px solid black !important;height: 20px; padding: 5px"> - <strong>Approuvé par : Loic MARCHIN (CEO)</strong> - </td> - </tr> - <tr> - <td style="border: 1px solid black !important;height: 20px; padding: 5px"> - Date : <span t-if="o.state == 'purchase'" t-field="o.date_order" t-field-options="{"format": "yyyy-MM-dd"}"/> - </td> - </tr> - <tr> - <td style="border: 1px solid black !important;height: 100px; padding: 5px"> - Signature : - <img t-if="o.state == 'purchase'" src="pylote_imprime/static/description/Signature-loic.jpg" style="height:150px;"/> - </td> - </tr> - </tbody> - </table> - </p> - <div> - <center><p style="font-size:10px;">Modèle Bon de Commande - version 01</p></center> + <div t-if="o.date_order" class="col-3"> + <strong>Order Date:</strong> + <p t-field="o.date_order"/> </div> - <div class="oe_structure"/> </div> - </xpath> --> + </xpath> + + <xpath expr="//table/thead/tr/th" position="before"> + <th><strong>Nom</strong></th> + </xpath> + <xpath expr="//table/tbody/tr/td" position="before"> + <td> + <span t-esc="line.product_id.name"/> + </td> + </xpath> + + <xpath expr="//p[@t-field='o.notes']" position="after"> + <table class="table table-bordered" style="margin-top: 20px;"> + <tbody> + <tr> + <td style="height: 20px; padding: 5px"> + <strong>Approuvé par : Loic MARCHIN (CEO)</strong> + </td> + </tr> + <tr> + <td style="height: 20px; padding: 5px"> + Date : <span t-if="o.state == 'purchase'" t-field="o.date_order" t-field-options="{"format": "yyyy-MM-dd"}"/> + </td> + </tr> + <tr> + <td style="height: 100px; padding: 5px"> + Signature : + <img t-if="o.state == 'purchase'" src="pylote_imprime/static/description/Signature-loic.png" style="height:150px;"/> + </td> + </tr> + </tbody> + </table> + </xpath> </template> </data>