-
Notifications
You must be signed in to change notification settings - Fork 117
[IMP] l10n_cl: Add information box for invoice copy #4882
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo> | ||
|
|
||
| <record id="account_invoices_without_payment" model="ir.actions.report"> | ||
| <field name="name">PDF with Copy</field> | ||
| <field name="model">account.move</field> | ||
| <field name="report_type">qweb-pdf</field> | ||
| <field name="report_name">l10n_cl.yielding_invoice</field> | ||
| <field name="report_file">l10n_cl.yielding_invoice</field> | ||
| <field name="print_report_name">(object._get_report_base_filename() + "COPY")</field> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on other maybe a bit more clean is to extend the function |
||
| <field name="attachment"/> | ||
| <field name="binding_model_id" ref="model_account_move"/> | ||
| <field name="binding_type">report</field> | ||
| <field name="domain" eval="[('move_type', '!=', 'entry')]"/> | ||
| </record> | ||
|
|
||
| </odoo> | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -75,7 +75,6 @@ | |||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </template> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Useless diff, even if you are right let's not change stuff for the pleasure of it ahah, the real reason why is that it break the github history and so it's more difficult to find the original pr 😄 |
||||||||||||||||||||||
| <template id="informations"> | ||||||||||||||||||||||
| <div id="informations" class="row mt8 mb8"> | ||||||||||||||||||||||
| <div class="col-6"> | ||||||||||||||||||||||
|
|
@@ -220,6 +219,57 @@ | |||||||||||||||||||||
| <attribute name="t-call">l10n_cl.tax_totals_widget</attribute> | ||||||||||||||||||||||
| </t> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <xpath expr="//div[hasclass('invoice_main')]" position="inside"> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The xpath will need to be changed also to be more precise with the right template |
||||||||||||||||||||||
| <t t-if="show_info_box"> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. t-if can be added to a div directly |
||||||||||||||||||||||
| <div class="row g-0" style="float: right;"> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in term of construction of code you have 2 choices either using different rows or one big row and put everything in it. That's the solution we chose even it's not the best in term of html it was the cleaner and compact code |
||||||||||||||||||||||
| <div class="col-12"> | ||||||||||||||||||||||
| <div class="d-inline-block ms-auto" style="width: 440px;"> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style should be avoided at all cost for different reason:
So always use bootstrap class instead 😄 |
||||||||||||||||||||||
| <div class="border border-dark border-3 p-3 bg-white"> | ||||||||||||||||||||||
| <div class="o_info_box"> | ||||||||||||||||||||||
| <div class="row g-0 mb-4"> | ||||||||||||||||||||||
| <div class="col-12 d-flex align-items-end"> | ||||||||||||||||||||||
| <span class="fw-normal me-2 text-nowrap">Nombre:</span> | ||||||||||||||||||||||
| <span class="flex-grow-1 border-bottom border-dark"></span> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="row g-0 mb-4"> | ||||||||||||||||||||||
| <div class="col-6 d-flex align-items-end pe-4"> | ||||||||||||||||||||||
| <span class="fw-normal me-2 text-nowrap">RUT:</span> | ||||||||||||||||||||||
| <span class="flex-grow-1 border-bottom border-dark"></span> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="col-6 d-flex align-items-end ps-3"> | ||||||||||||||||||||||
| <span class="fw-normal me-2 text-nowrap">FECHA:</span> | ||||||||||||||||||||||
| <span class="flex-grow-1 border-bottom border-dark"></span> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="row g-0 mb-4"> | ||||||||||||||||||||||
| <div class="col-6 d-flex align-items-end pe-4"> | ||||||||||||||||||||||
| <span class="fw-normal me-2 text-nowrap">Recinto:</span> | ||||||||||||||||||||||
| <span class="flex-grow-1 border-bottom border-dark"></span> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="col-6 d-flex align-items-end ps-3"> | ||||||||||||||||||||||
| <span class="fw-normal me-2 text-nowrap">FIRMA:</span> | ||||||||||||||||||||||
| <span class="flex-grow-1 border-bottom border-dark"></span> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="row g-0 pt-2 border-top border-dark"> | ||||||||||||||||||||||
| <div class="col-12"> | ||||||||||||||||||||||
| <p class="small mb-0">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 commentThe reason will be displayed to describe this comment to others. Learn more. We always add text in english and translate after with pot and po files |
||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <div class="row g-0 mt-2"> | ||||||||||||||||||||||
| <div class="col-8 ms-auto text-end"> | ||||||||||||||||||||||
| <strong class="h5 fw-bold">CEDIBLE</strong> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| </t> | ||||||||||||||||||||||
| </xpath> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use the technique of only one row all of this can be obtain with 25 lines of code maximum ;) And most importantly no style only bootstrap class |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| </template> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <!-- FIXME: Temp fix to allow fetching invoice_documemt in Studio Reports with localisation --> | ||||||||||||||||||||||
|
|
@@ -268,4 +318,14 @@ | |||||||||||||||||||||
| </tr> | ||||||||||||||||||||||
| </template> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| <template id="yielding_invoice"> | ||||||||||||||||||||||
| <t t-call="web.html_container"> | ||||||||||||||||||||||
| <t t-foreach="docs" t-as="o"> | ||||||||||||||||||||||
| <t t-call="l10n_cl.report_invoice_document"> | ||||||||||||||||||||||
| <t t-set="show_info_box" t-value="True"/> | ||||||||||||||||||||||
| </t> | ||||||||||||||||||||||
| </t> | ||||||||||||||||||||||
| </t> | ||||||||||||||||||||||
|
Comment on lines
+322
to
+328
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally you shouldn't need to use the redefinition of the o variable if you target the right template 🤔 check l10n_cl.report_invoice instead of report_invoice_document.
Suggested change
|
||||||||||||||||||||||
| </template> | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think it would be better to move everything you did here in enterprise, more precisely in l10n_cl_edi 👀 |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| </odoo> | ||||||||||||||||||||||
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.
name of the template could be a bit better like report_invoice_document_copy or something like this