You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

118 lines
7.3 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Template for pdf report -->
<template id="route_report_template">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<t t-foreach="data" t-as="docs">
<t t-foreach="docs" t-as="o">
<h1 align="center">
<t t-esc="o.name"/>
</h1>
<t t-foreach="o.route_lines" t-as="l">
<b>
<span class="mt32" t-esc="l.route"/>
</b>
<table class="table"
style="border: 2px solid black;">
<t t-foreach="l.cust_tree" t-as="v">
<tr t-if="pay==false">
<td style="width: 200px;">
<span t-esc="v.name"/>
</td>
<td style="width: 200px;">
<span t-esc="v.phone"/>
</td>
<td style="width: 200px;">
<span t-esc="v.street"/>
<span t-esc="v.street2"/>
<span t-esc="v.city"/>
<span t-esc="v.state_id.name"/>
<span t-esc="v.zip"/>
<span t-esc="v.country_id.name"/>
<span t-esc="v.email"/>
</td>
</tr>
<t t-if="pay">
<tr style="border: 2px solid white;">
<th style="width: 200px; color:#581845;">
<span t-esc="v.name"/>
</th>
<th style="width: 200px; color: #581845;">
<span t-esc="v.phone"/>
</th>
<th style="width: 200px; color:#581845;">
<span t-esc="v.street"/>
<span t-esc="v.street2"/>
<span t-esc="v.city"/>
<span t-esc="v.state_id.name"/>
<span t-esc="v.zip"/>
<span t-esc="v.country_id.name"/>
<span t-esc="v.email"/>
</th>
</tr>
<t t-if="v.get_all_dues() != []">
<tr style="border:2px solid white; border-bottom:2px solid black;">
<td/>
</tr>
<tr style="border:2px solid black;"
t-if="consolidated == false">
<th>Invoice Number</th>
<th>Due Date</th>
<th>Amount Due</th>
</tr>
</t>
<t t-set="total" t-value="0"/>
<t t-foreach="v.get_all_dues()"
t-as="dues">
<tr t-if="consolidated == false">
<td>
<t t-esc="dues['name']"/>
</td>
<td>
<t t-esc="dues['invoice_date_due']"/>
</td>
<td>
<t t-if="user.company_id.currency_id.position == 'after'">
<span t-esc="dues['amount_residual_signed']"/>
<t t-esc="user.company_id.currency_id.symbol"/>
</t>
<t t-if="user.company_id.currency_id.position == 'before'">
<t t-esc="user.company_id.currency_id.symbol"/>
<span t-esc="dues['amount_residual_signed']"/>
</t>
</td>
</tr>
<t t-set="total"
t-value="dues['amount_residual_signed']+total"/>
</t>
<t t-if="v.get_all_dues() != []">
<tr style="border-bottom:2px solid black;"
t-if="consolidated == false">
<td>Total</td>
<td/>
<td>
<t t-esc="total"/>
</td>
</tr>
<tr t-if="consolidated"
style="border:2px solid black;">
<td>Total</td>
<td/>
<td>
<t t-esc="total"/>
</td>
</tr>
</t>
</t>
</t>
</table>
</t>
</t>
</t>
</div>
</t>
</t>
</template>
</odoo>