work on account receipt report

This commit is contained in:
sonal arora
2020-08-11 19:06:05 +05:30
parent 26372fe496
commit 875607757a
3 changed files with 129 additions and 0 deletions

View File

@@ -15,6 +15,8 @@
'data': [
'views/invoice_report.xml',
'views/sale_report.xml',
'views/account_report.xml',
'views/report_payment_receipt.xml',
],
'demo': [],
'images': [],

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- QWeb Reports -->
<report
id="action_report_payment_receipt_reports"
model="account.payment"
string="Payment Receipt Report"
report_type="qweb-pdf"
name="reports.report_payment_receipt_views"
file="reports.report_payment_receipt_views"
/>
</data>
</odoo>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_payment_receipt_view_documents">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang=lang)"/>
<div class="page">
<div class="row mt64" style="border:1px solid;width:450px;float:left;">
<div class="col-6">
<strong>Code: </strong><br/>
<strong>Address: </strong><br/>
<strong>Telephone Number: </strong><br/>
<strong>Account Payee: </strong><br/>
</div>
</div>
<div class="row mt64" style="border:1px solid;width:350px;float:right;">
<div class="col-6">
<strong>Receipt Number: </strong><span t-field="o.name"/><br/>
<strong>Date: </strong><span t-field="o.payment_date"/><br/><br/>
</div>
</div>
<div class="row mt64" style="border:1px solid;width:350px;float:right;">
<div class="col-6">
<strong>Cheque Number: </strong><br/>
</div>
</div>
<div>
<div class="row mt64" style="border:1px solid;width:450px;float:left;">
<div class="col-6">
<strong>Bank Account: </strong><br/>
<strong>Bank Account Number: </strong><br/>
</div>
</div>
<br/>
<div class="row mt64" style="border:1px solid;width:350px;float:right;">
<div class="col-6">
<strong>Currency: </strong><span t-field="o.currency_id.name"/><br/>
<strong>Exchange Rate: </strong><br/>
</div>
</div>
</div>
<div class="row mt64" style="border:1px solid;">
<div class="col-6">
<strong>Description: </strong><br/><br/><br/>
</div>
</div>
<table class="table table-sm">
<thead>
<tr>
<th class="text-center" style="border:1px solid;"><span>Particulars</span></th>
<th class="text-center" style="border:1px solid;"><span>Account</span></th>
<th class="text-center" style="border:1px solid;"><span>Amount</span></th>
<th class="text-center" style="border:1px solid;"><span>Cheque book Amount</span></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o" t-as="inv">
<td class="text-center" style="border:1px solid;"><span t-field="o.partner_id.name"/></td>
<td class="text-center" style="border:1px solid;"><!-- <span t-field="inv.amount_total"/> --></td>
<td class="text-center" style="border:1px solid;"><span t-field="o.amount"/></td>
<td class="text-center" style="border:1px solid;"><span t-field="o.amount"/></td>
</tr>
<tr>
<td></td>
<td></td>
<td class="text-center">Home Currency Total</td>
<td class="text-center" style="border:1px solid;"><span t-field="o.amount"/></td>
</tr>
<tr>
<td></td>
<td></td>
<td class="text-center">Total</td>
<td class="text-center" style="border:1px solid;"><span t-field="o.amount"/></td>
</tr>
</tbody>
</table>
<strong>Total in Words:</strong>
<div class="row mt64" style="border:1px solid;">
<div class="col-6">
<strong><span t-field="o.check_amount_in_words"/></strong><br/><br/><br/>
</div>
</div>
<div class="row mt64"></div>
<table class="table table-sm">
<thead>
<tr>
<th class="text-center" style="border:1px solid;padding:15px;"><span>Prepared by</span></th>
<th class="text-center" style="border:1px solid;padding:15px;"><span>Checked by</span></th>
<th class="text-center" style="border:1px solid;padding:15px;"><span>Authorized by</span></th>
<th class="text-center" style="border:1px solid;padding:15px;"><span>Received by</span></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o" t-as="inv">
<td class="text-center" style="border:1px solid;padding:15px;"><!-- <span t-field="inv.name"/> --></td>
<td class="text-center" style="border:1px solid;padding:15px;"><!-- <span t-field="inv.amount_total"/> --></td>
<td class="text-center" style="border:1px solid;padding:15px;"><!-- <span t-esc="o._get_invoice_payment_amount(inv)" t-options="{'widget': 'monetary', 'display_currency': inv.currency_id}"/> --></td>
<td class="text-center" style="border:1px solid;padding:15px;"><!-- <span t-field="inv.amount_residual"/> --></td>
</tr>
</tbody>
</table>
</div>
</t>
</template>
<template id="report_payment_receipt_views">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="lang" t-value="o.partner_id.lang"/>
<t t-call="reports.report_payment_receipt_view_documents" t-lang="lang"/>
</t>
</t>
</template>
</odoo>