rework report_templates (own logo)
parent
1d085e9746
commit
7b43ebaecb
|
|
@ -20,6 +20,7 @@
|
||||||
<template id="external_layout_custom">
|
<template id="external_layout_custom">
|
||||||
<t t-set="DlvLogo" t-value="False"/>
|
<t t-set="DlvLogo" t-value="False"/>
|
||||||
<t t-set="OcLogo" t-value="False"/>
|
<t t-set="OcLogo" t-value="False"/>
|
||||||
|
<!--
|
||||||
<t t-foreach="o.partner_id.retail_partner_id.category_id" t-as="cat">
|
<t t-foreach="o.partner_id.retail_partner_id.category_id" t-as="cat">
|
||||||
<t t-if="cat.name == 'OcLogo'">
|
<t t-if="cat.name == 'OcLogo'">
|
||||||
<t t-set="OcLogo" t-value="True"/>
|
<t t-set="OcLogo" t-value="True"/>
|
||||||
|
|
@ -28,7 +29,21 @@
|
||||||
<t t-set="DlvLogo" t-value="True"/>
|
<t t-set="DlvLogo" t-value="True"/>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
-->
|
||||||
|
<t t-if="(o._name == 'stock.picking' and is_picking)">
|
||||||
|
<t t-foreach="o.sale_id.partner_id.retail_partner_id.category_id" t-as="cat">
|
||||||
|
<t t-if="cat.name == 'DlvLogo'">
|
||||||
|
<t t-set="DlvLogo" t-value="True"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
<t t-if="(not (data or {}).get('tz_report_production', False) and o.state not in ['draft','sent'])">
|
||||||
|
<t t-foreach="o.partner_id.retail_partner_id.category_id" t-as="cat">
|
||||||
|
<t t-if="cat.name == 'OcLogo'">
|
||||||
|
<t t-set="OcLogo" t-value="True"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
<t t-call="dp_reports.external_layout_header"/>
|
<t t-call="dp_reports.external_layout_header"/>
|
||||||
|
|
||||||
<div class="article o_dp_report_layout">
|
<div class="article o_dp_report_layout">
|
||||||
|
|
@ -73,7 +88,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4 header-logo">
|
<div class="col-xs-4 header-logo">
|
||||||
<t t-if="DlvLogo and o._name == 'stock.picking' and is_picking">
|
<t t-if="DlvLogo and o._name == 'stock.picking' and is_picking">
|
||||||
<img t-if="o.partner_id.retail_partner_id.image" t-att-src="'data:image/png;base64,%s' % o.partner_id.retail_partner_id.image.decode()"
|
<img t-if="o.sale_id.partner_id.retail_partner_id.image" t-att-src="'data:image/png;base64,%s' % o.sale_id.partner_id.retail_partner_id.image.decode()"
|
||||||
style="max-height: 85px;"/>
|
style="max-height: 85px;"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-elif="OcLogo and not (data or {}).get('tz_report_production', False) and o.state not in ['draft','sent']">
|
<t t-elif="OcLogo and not (data or {}).get('tz_report_production', False) and o.state not in ['draft','sent']">
|
||||||
|
|
@ -197,81 +212,50 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="company_data">
|
<template id="company_data">
|
||||||
<t t-set="DlvLogo" t-value="False"/>
|
<t t-set="cmpy" t-value="res_company.partner_id"/>
|
||||||
<t t-set="OcLogo" t-value="False"/>
|
<t t-if="(o._name == 'stock.picking' and is_picking)">
|
||||||
<t t-foreach="o.partner_id.retail_partner_id.category_id" t-as="cat">
|
<t t-foreach="o.sale_id.partner_id.retail_partner_id.category_id" t-as="cat">
|
||||||
<t t-if="cat.name == 'OcLogo'">
|
<t t-if="cat.name == 'DlvLogo'">
|
||||||
<t t-set="OcLogo" t-value="True"/>
|
<t t-set="cmpy" t-value="o.sale_id.partner_id.retail_partner_id"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="cat.name == 'DlvLogo'">
|
|
||||||
<t t-set="DlvLogo" t-value="True"/>
|
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="(DlvLogo and o._name == 'stock.picking' and is_picking) or (OcLogo and not (data or {}).get('tz_report_production', False) and o.state not in ['draft','sent'])">
|
<t t-if="(not (data or {}).get('tz_report_production', False) and o.state not in ['draft','sent'])">
|
||||||
<strong>
|
<t t-foreach="o.partner_id.retail_partner_id.category_id" t-as="cat">
|
||||||
<span t-esc="o.partner_id.retail_partner_id.name"/>
|
<t t-if="cat.name == 'OcLogo'">
|
||||||
</strong>
|
<t t-set="cmpy" t-value="o.partner_id.retail_partner_id"/>
|
||||||
<div class="company-data">
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.street"/>
|
|
||||||
<br/>
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.zip"/>
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.city"/>
|
|
||||||
<br/>
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.country_id.name"/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
Phone:
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.phone"/>
|
|
||||||
<t t-if="o.partner_id.retail_partner_id.fax">
|
|
||||||
<br/>
|
|
||||||
Fax:
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.fax"/>
|
|
||||||
</t>
|
</t>
|
||||||
<br/>
|
</t>
|
||||||
E-Mail:
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.email"/>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>
|
|
||||||
<t t-if ="o.partner_id.retail_partner_id.website">
|
|
||||||
<span t-esc="o.partner_id.retail_partner_id.website.replace('http://', '').replace('https://', '')"/>
|
|
||||||
</t>
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<strong>
|
||||||
<t t-set="company" t-value="res_company"/>
|
<span t-esc="cmpy.name"/>
|
||||||
|
</strong>
|
||||||
|
<div class="cmpy-data">
|
||||||
|
<span t-esc="cmpy.street"/>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="cmpy.zip"/>
|
||||||
|
<span t-esc="cmpy.city"/>
|
||||||
|
<br/>
|
||||||
|
<span t-esc="cmpy.country_id.name"/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
Phone:
|
||||||
|
<span t-esc="cmpy.phone"/>
|
||||||
|
<t t-if="cmpy.fax">
|
||||||
|
<br/>
|
||||||
|
Fax:
|
||||||
|
<span t-esc="cmpy.fax"/>
|
||||||
|
</t>
|
||||||
|
<br/>
|
||||||
|
E-Mail:
|
||||||
|
<span t-esc="cmpy.email"/>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<strong>
|
<strong>
|
||||||
<span t-esc="company.partner_id.name"/>
|
<span t-esc="cmpy.website.replace('http://', '').replace('https://', '')"/>
|
||||||
</strong>
|
</strong>
|
||||||
<div class="company-data">
|
</div>
|
||||||
<span t-esc="company.partner_id.street"/>
|
|
||||||
<br/>
|
|
||||||
<span t-esc="company.partner_id.zip"/>
|
|
||||||
<span t-esc="company.partner_id.city"/>
|
|
||||||
<br/>
|
|
||||||
<span t-esc="company.partner_id.country_id.name"/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
Phone:
|
|
||||||
<span t-esc="company.partner_id.phone"/>
|
|
||||||
<t t-if="company.partner_id.fax">
|
|
||||||
<br/>
|
|
||||||
Fax:
|
|
||||||
<span t-esc="company.partner_id.fax"/>
|
|
||||||
</t>
|
|
||||||
<br/>
|
|
||||||
E-Mail:
|
|
||||||
<span t-esc="company.partner_id.email"/>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>
|
|
||||||
<span t-esc="company.partner_id.website.replace('http://', '').replace('https://', '')"/>
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
</t>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="partner_data">
|
<template id="partner_data">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue