| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed" primary="True"> |
| 5 |
<xpath expr="//div[contains(@t-attf-class, 'header')]/div" position="replace"> |
| 6 |
<div class="row mb8"> |
| 7 |
<div class="col-3 mb4"> |
| 8 |
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/> |
| 9 |
</div> |
| 10 |
</div> |
| 11 |
</xpath> |
| 12 |
</template> |
| 13 |
|
| 14 |
<template id="report_voucher_document"> |
| 15 |
<t t-set="o" t-value="o.with_context(lang=lang)" /> |
| 16 |
<t t-set="company" t-value="o.company_id"/> |
| 17 |
|
| 18 |
<t t-call="l10n_cn.external_layout_boxed"> |
| 19 |
<div class="page"> |
| 20 |
|
| 21 |
<div align="center"> |
| 22 |
<h2> |
| 23 |
<span>Accounting Voucher</span> |
| 24 |
</h2> |
| 25 |
</div> |
| 26 |
|
| 27 |
<div id="company" class="row flex-grow-1"> |
| 28 |
<span t-field="o.company_id.name"/> |
| 29 |
</div> |
| 30 |
<div id="informations" class="row"> |
| 31 |
|
| 32 |
<div class="col-3 offset-3" name="date"> |
| 33 |
<strong>Date:</strong> |
| 34 |
<span t-field="o.date"/> |
| 35 |
</div> |
| 36 |
<div class="col-4" t-if="o.name" name="name"> |
| 37 |
<strong>Reference:</strong> |
| 38 |
<span t-field="o.name"/> |
| 39 |
</div> |
| 40 |
<div class="col-2"> |
| 41 |
<strong>Number of attachments:</strong> |
| 42 |
<span t-esc="o._count_attachments()"/> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
|
| 46 |
<table class="table table-borderless o_main_table" name="entry_line_table"> |
| 47 |
<thead> |
| 48 |
<tr> |
| 49 |
<t t-set="colspan" t-value="4"/> |
| 50 |
<th name="th_description" class="text-center"><span>Balance</span></th> |
| 51 |
<th name="th_account" class="text-center"><span>Account</span></th> |
| 52 |
<th name="th_debit" class="text-center"><span>Debit</span></th> |
| 53 |
<th name="th_credit" class="text-center"><span>Credit</span></th> |
| 54 |
</tr> |
| 55 |
</thead> |
| 56 |
<tbody class="invoice_tbody"> |
| 57 |
<t t-set="total_debit" t-value="0"/> |
| 58 |
<t t-set="total_credit" t-value="0"/> |
| 59 |
|
| 60 |
<t t-foreach="o.line_ids" t-as="line"> |
| 61 |
<t t-set="total_debit" t-value="total_debit + line.debit"/> |
| 62 |
<t t-set="total_credit" t-value="total_credit + line.credit"/> |
| 63 |
<tr> |
| 64 |
<t name="account_move_line"> |
| 65 |
<td name="description"> |
| 66 |
<span t-field="line.name" t-options="{'widget': 'text'}"/> |
| 67 |
</td> |
| 68 |
<td name="account"> |
| 69 |
<span t-field="line.account_id.display_name" t-options="{'widget': 'text'}"/> |
| 70 |
</td> |
| 71 |
<td name="debit"> |
| 72 |
<span t-if="line.debit != 0" t-field="line.debit"/> |
| 73 |
</td> |
| 74 |
<td name="credit"> |
| 75 |
<span t-if="line.credit != 0" t-field="line.credit"/> |
| 76 |
</td> |
| 77 |
</t> |
| 78 |
</tr> |
| 79 |
</t> |
| 80 |
<t> |
| 81 |
<td name="total" colspan="2"> |
| 82 |
<span>Total:</span> |
| 83 |
<span t-esc="o._convert_to_amount_in_word(total_debit)" /> |
| 84 |
</td> |
| 85 |
<td name="total_debit"> |
| 86 |
<span t-esc="total_debit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
| 87 |
</td> |
| 88 |
<td name="total_credit"> |
| 89 |
<span t-esc="total_credit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> |
| 90 |
</td> |
| 91 |
</t> |
| 92 |
</tbody> |
| 93 |
</table> |
| 94 |
|
| 95 |
<div id="staff" class="row" style="color:black"> |
| 96 |
<div class="col-4"> |
| 97 |
<strong>Validator:</strong> |
| 98 |
</div> |
| 99 |
<div class="col-4"> |
| 100 |
<strong>Poster:</strong> |
| 101 |
</div> |
| 102 |
<div class="col-4"> |
| 103 |
<strong>Salesperson:</strong> |
| 104 |
<span t-esc="o.invoice_user_id.name"/> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</t> |
| 109 |
</template> |
| 110 |
|
| 111 |
<template id="report_voucher"> |
| 112 |
<t t-call="web.html_container"> |
| 113 |
<t t-foreach="docs" t-as="o"> |
| 114 |
<t t-call="l10n_cn.report_voucher_document" t-lang="lang"/> |
| 115 |
</t> |
| 116 |
</t> |
| 117 |
</template> |
| 118 |
</data> |
| 119 |
</odoo> |