-
Notifications
You must be signed in to change notification settings - Fork 118
[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
base: 18.0-rd-accounting-onboarding-malb
Are you sure you want to change the base?
[IMP] l10n_cl: enable copy invoice report with legal acknowledgment footer #4822
Conversation
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
401e505
to
03ae5e7
Compare
@@ -0,0 +1,28 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<odoo> | |||
<template id="report_invoice_copy"> |
There was a problem hiding this comment.
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;"> |
There was a problem hiding this comment.
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
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div class="mt32" style="border: 2px solid black; padding: 10px;"> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<p><strong>Nombre:</strong> ______________________________________________</p> |
There was a problem hiding this comment.
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
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> |
There was a problem hiding this comment.
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
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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)
Purpose
Support Chilean legal requirements by allowing companies to print a copy of the invoice including an acknowledgment of receipt section.
Changes
Task-4908875