Skip to content

[IMP] l10n_cl: enable copy invoice report with legal acknowledgment footer #4822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: 18.0-rd-accounting-onboarding-malb
Choose a base branch
from

Conversation

baje-odoo
Copy link

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

@robodoo
Copy link

robodoo commented Jul 11, 2025

This PR targets the un-managed branch odoo-dev/odoo:18.0-rd-accounting-onboarding-malb, it needs to be retargeted before it can be merged.

…ooter

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
@baje-odoo baje-odoo force-pushed the 18.0-rd-accounting-onboarding-l10n_cl-invoice-copy-baje branch from 401e505 to 03ae5e7 Compare July 11, 2025 12:03
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_copy">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we prefix the id with the module name

</template>

<template id="copy_footer">
<div class="mt32" style="border: 2px solid black; padding: 10px;">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline styling is not the way to go for multiple reasons, i would even say that it should be avoided at all cost ahah
Reason why:

  • Could override existing css rules (example: a class apply the border, by doing the inline styling it will be overriden
  • Maintainability: We use Bootstrap or custom odoo classes, let's say we do a revamp of the css code, it will be way easier to check places that use that class, or even if we change a class we want that piece of code to be modified too
  • Readbility: inline style is really difficult to read specially when there is many style to add

Comment on lines +10 to +25
<div class="row">
<div class="col-6">
<p><strong>Nombre:</strong> ______________________________________________</p>
<p><strong>RUT:</strong> ______________________ <strong>FECHA:</strong> __________________</p>
<p><strong>Recinto:</strong> __________________ <strong>FIRMA:</strong> ___________________</p>
</div>
<div class="col-6">
<p style="font-size: 10px;">
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)
</p>
</div>
</div>
</div>
<div style="text-align: right;">
<strong>CEDIBLE</strong>
</div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

<div class="mt32" style="border: 2px solid black; padding: 10px;">
<div class="row">
<div class="col-6">
<p><strong>Nombre:</strong> ______________________________________________</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we generally avoid the strong balise and use the fw-bold from bootstap

Comment on lines +18 to +19
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)
</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually write those in english and then do the translation with po and pot file

Comment on lines +225 to +231
<template id="report_invoice_document_copy" inherit_id="account.report_invoice_document">
<xpath expr="//div[contains(@class, 'page')]" position="after">
<t t-if="is_copy">
<t t-call="l10n_cl.copy_footer"/>
</t>
</xpath>
</template>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of an xpath i think that solution is cleaner
image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(print with cedible is your is_copy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants