diff --git a/views/report_composition_templates.xml b/views/report_composition_templates.xml index 7375fe1abe85b5815325077e45fcbcea00261b39..af4a01954f8190a0fe60d18a33a9c8cfdd0ead16 100644 --- a/views/report_composition_templates.xml +++ b/views/report_composition_templates.xml @@ -1,22 +1,106 @@ <?xml version="1.0" encoding="utf-8" ?> <odoo> <data> + <template id="external_layout_generic_compo"> + <div + t-attf-class="header o_company_#{company.id}_layout" + t-att-style="report_header_style" + > + <div class="row"> + <div class="col-4"> + </div> + <div class="col-4 text-center"> + <h1 class="mt0 text-center">Compositions</h1> + </div> + <div class="col-4 mb4 text-right"> + <img + t-if="company.logo" + t-att-src="image_data_uri(company.logo)" + style="max-height: 80px;" + alt="Logo" + /> + </div> + <!-- <div class="col-9 text-right" style="margin-top:22px;" t-field="company.report_header" name="moto"/>--> + </div> + + </div> + <div + t-attf-class="article o_report_layout_boxed o_company_#{company.id}_layout" + t-att-data-oe-model="o and o._name" + t-att-data-oe-id="o and o.id" + t-att-data-oe-lang="o and o.env.context.get('lang')" + > + <div class="pt-1"> + <!-- This div ensures that the address is not cropped by the header. --> + <t t-call="web.address_layout" /> + </div> + <t t-raw="0" /> + </div> + + <div t-attf-class="footer o_boxed_footer o_company_#{company.id}_layout"> + <div class="text-center"> + <ul class="list-inline"> + <li class="list-inline-item"> + <t t-if="company.phone"><span + class="o_force_ltr" + t-field="company.phone" + /></t> + <t t-if="company.email"> - <span t-field="company.email" /></t> + <t t-if="company.website"> - <span + t-field="company.website" + /></t> + <t t-if="company.vat"> - <t + t-esc="company.country_id.vat_label or 'Tax ID'" + />: <span t-field="company.vat" /></t> + <t t-if="company.company_type"><span + t-field="company.company_type" + /></t> + <t t-if="company.siret"> - SIRET: <span + t-field="company.siret" + /></t> + <t t-if="company.ape"> - Code NAF: <span + t-field="company.ape" + /></t> + </li> + </ul> + <div t-field="company.report_footer" /> + <div t-if="report_type == 'pdf'"> + Page: <span class="page" /> / <span class="topage" /> + </div> + </div> + </div> + </template> <template id="report_composition_document"> <t t-call="ap_report.external_layout_spe"> <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)" /> <div class="page"> - <div class="row mt-2 mb-2"> - <div class="col-5" name="div_outgoing_address"> - <span> - <strong> - <span t-if="doc.state not in ['draft','sent']">Commande n° </span> - <span t-if="doc.state in ['draft','sent']">Devis N° </span> - <span t-field="doc.name" /><br/> - </strong> - Du <span t-field="doc.date_order" t-options='{"widget": "date"}'/><br/> - Référent projet: <span t-field="doc.user_id"/> - </span> + <div class="row"> + <div class="col-8" name="div_outgoing_address"> + <h2> + <t + t-if="not (env.context.get('proforma', False) or is_pro_forma)" + > + <span + t-if="doc.state not in ['draft','sent']" + >Commande n° </span> + <span + t-if="doc.state in ['draft','sent']" + >Devis N° </span> + </t> + <t + t-if="env.context.get('proforma', False) or is_pro_forma" + > + <span>Facture pro-forma n° </span> + </t> + <span t-field="doc.name" /> + </h2> + <div class="mw-100 mb-3"> + <p class="m-0">Du <span + t-field="doc.date_order" + t-options='{"widget": "date"}' + /></p> + </div> </div> <div class="col-3 text-center"> <h2 class="text-center">Compositions</h2>