Skip to content

Commit 03ae5e7

Browse files
committed
[IMP] l10n_cl: enable copy invoice report with legal acknowledgment footer
Purpose ------- Support Chilean legal requirements by allowing companies to print a copy of the invoice including an acknowledgment of receipt section. Changes ------- - Added a new report action limited to Chilean companies. - Reused the standard invoice layout with a conditional footer for copies. - Footer includes informationals fields (RUT, Recinto,...) and legal disclaimer. Task-4908875
1 parent 6819f50 commit 03ae5e7

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

addons/account/views/account_report.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,17 @@
8787
<field name="report_file">account.report_hash_integrity</field>
8888
</record>
8989

90+
<record id="action_report_invoice_copy_cl" model="ir.actions.report">
91+
<field name="name">Invoices with Copy</field>
92+
<field name="model">account.move</field>
93+
<field name="report_type">qweb-pdf</field>
94+
<field name="report_name">l10n_cl.report_invoice_copy</field>
95+
<field name="report_file">l10n_cl.report_invoice_copy</field>
96+
<field name="binding_model_id" ref="account.model_account_move"/>
97+
<field name="binding_type">report</field>
98+
<field name="print_report_name">'%s - COPY' % (object.name)</field>
99+
<field name="domain" eval="[('company_id.country_id.code', '=', 'CL')]"/>
100+
</record>
101+
90102
</data>
91103
</odoo>

addons/l10n_cl/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'views/res_bank_view.xml',
2727
'views/res_country_view.xml',
2828
'views/res_company_view.xml',
29+
'views/report_invoice_copy.xml',
2930
'views/report_invoice.xml',
3031
'views/res_partner.xml',
3132
'views/res_config_settings_view.xml',

addons/l10n_cl/views/report_invoice.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@
222222

223223
</template>
224224

225+
<template id="report_invoice_document_copy" inherit_id="account.report_invoice_document">
226+
<xpath expr="//div[contains(@class, 'page')]" position="after">
227+
<t t-if="is_copy">
228+
<t t-call="l10n_cl.copy_footer"/>
229+
</t>
230+
</xpath>
231+
</template>
232+
225233
<!-- FIXME: Temp fix to allow fetching invoice_documemt in Studio Reports with localisation -->
226234
<template id="report_invoice" inherit_id="account.report_invoice">
227235
<xpath expr="//t[@t-call='account.report_invoice_document']" position="after">
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
<template id="report_invoice_copy">
4+
<t t-set="is_copy" t-value="True"/>
5+
<t t-call="l10n_cl.report_invoice"/>
6+
</template>
7+
8+
<template id="copy_footer">
9+
<div class="mt32" style="border: 2px solid black; padding: 10px;">
10+
<div class="row">
11+
<div class="col-6">
12+
<p><strong>Nombre:</strong> ______________________________________________</p>
13+
<p><strong>RUT:</strong> ______________________ <strong>FECHA:</strong> __________________</p>
14+
<p><strong>Recinto:</strong> __________________ <strong>FIRMA:</strong> ___________________</p>
15+
</div>
16+
<div class="col-6">
17+
<p style="font-size: 10px;">
18+
El acuse de recibo que se declara en este acto, de acuerdo a lo dispuesto en la letra b) del Art. 4º y la letra c) del Art. 5º de la Ley 19.983, acredita que la entrega de mercadería(s) o servicio(s)
19+
</p>
20+
</div>
21+
</div>
22+
</div>
23+
<div style="text-align: right;">
24+
<strong>CEDIBLE</strong>
25+
</div>
26+
27+
</template>
28+
</odoo>

0 commit comments

Comments
 (0)