-
Notifications
You must be signed in to change notification settings - Fork 117
[IMP] l10n_cl: add a button to print an invoice with extra info box #4880
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 |
|---|---|---|
|
|
@@ -73,6 +73,19 @@ | |
| <field name="view_mode">list,form</field> | ||
| </record> | ||
|
|
||
| <record id="account_invoices_cl" model="ir.actions.report"> | ||
| <field name="name">Invoices with copy</field> | ||
| <field name="model">account.move</field> | ||
| <field name="report_type">qweb-pdf</field> | ||
| <field name="report_name">l10n_cl.report_invoice_document_with_box</field> | ||
| <field name="report_file">l10n_cl.report_invoice_document_with_box</field> | ||
| <field name="print_report_name">(object._get_report_base_filename())</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. We could do an extend of that function to add "COPY" in the name |
||
| <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> | ||
|
|
||
| <menuitem id="menu_sale_invoices_credit_notes" parent="account.menu_finance_receivables" sequence="3" action="sale_invoices_credit_notes" name="Sale Invoices and Credit Notes (CL)"/> | ||
| <menuitem id="menu_vendor_bills_and_refunds" parent="account.menu_finance_payables" sequence="3" action="vendor_bills_and_refunds" name="Vendor Bills and Refunds (CL)"/> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,6 +216,22 @@ | |
| <span t-out="line_amounts['line_description']" t-options="{'widget': 'text'}"/> | ||
| </xpath> | ||
|
|
||
| <xpath expr="//div[contains(@class, '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. Change all the diff to enterprise in l10n_cl_edi since it's something we want for that also xpath could be more precise |
||
| <t t-if="show_details_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 could be added direclty to the div |
||
| <div style="position: fixed; width: 45%; right: 3%;"> | ||
|
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. You can do everything with boostrap !
|
||
| <div style="border: 3px solid black; padding: 1rem;" > | ||
| <div style="font-size: 1.5rem"> Nombre : ___________________________________ </div> | ||
|
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. no need for the _____ normally the space should be given by the css not the text 😄 |
||
| <div style="font-size: 1.5rem"> RUT : ______________ FECHA : _______________ </div> | ||
| <div style="font-size: 1.5rem"> Recinto : __________ FIRMA : _______________ </div> | ||
| <div style="font-size: 1rem"> El acuse de recibo que se declara en este acto, de acuredo a lo dispuesto en la letra b) del art. | ||
|
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 put the text in english and then translate it back ;) |
||
| 4 y la letra c) del Art. 5 de la ley 19.983, acredita que la entrega de mercaderia(s) o servicios | ||
| </div> | ||
| </div> | ||
| <div style="font-size: 1.2rem; text-align: right; margin-right: 2rem; margin-top: 1rem; font-weight: bold;"> CEDIBLE </div> | ||
| </div> | ||
| </t> | ||
| </xpath> | ||
|
|
||
| <t t-call="account.document_tax_totals" position="attributes"> | ||
| <attribute name="t-call">l10n_cl.tax_totals_widget</attribute> | ||
| </t> | ||
|
|
@@ -228,9 +244,30 @@ | |
| <t t-if="o._get_name_invoice_report() == 'l10n_cl.report_invoice_document'" | ||
| t-call="l10n_cl.report_invoice_document" t-lang="lang"/> | ||
| </xpath> | ||
| </template> | ||
|
|
||
| <template id="report_invoice_document_with_box"> | ||
| <t t-call="account.report_invoice_document"> | ||
|
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. you should call the l10n_cl.report_invoice not the basic account one, the reason is that the report_invoice is overriden by localisation with a mode primary (i will let you look at the doc for that, could be either extension or primary) |
||
| <t t-set="show_details_box" t-value="True"/> | ||
| </t> | ||
| </template> | ||
|
|
||
| <!-- <template id="report_invoice_details_box" inherit_id="l10n_cl.report_invoice_document" primary="True">--> | ||
| <!-- <xpath expr="//div[contains(@class, 'invoice_main')]" position="inside">--> | ||
| <!-- <div style="position: fixed; width: 45%; right: 3%;">--> | ||
| <!-- <div style="border: 3px solid black; padding: 1rem;" >--> | ||
| <!-- <div style="font-size: 1.5rem"> Nombre : ___________________________________ </div>--> | ||
| <!-- <div style="font-size: 1.5rem"> RUT : ______________ FECHA : _______________ </div>--> | ||
| <!-- <div style="font-size: 1.5rem"> Recinto : __________ FIRMA : _______________ </div>--> | ||
| <!-- <div style="font-size: 1rem"> El acuse de recibo que se declara en este acto, de acuredo 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 mercaderia(s) o servicios --> | ||
| <!-- </div>--> | ||
| <!-- </div>--> | ||
| <!-- <div style="font-size: 1.2rem; text-align: right; margin-right: 2rem; margin-top: 1rem; font-weight: bold;"> CEDIBLE </div>--> | ||
| <!-- </div>--> | ||
| <!-- </xpath>--> | ||
| <!-- </template>--> | ||
|
Comment on lines
+255
to
+269
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. remove |
||
|
|
||
| <template id="tax_totals_widget" inherit_id="account.document_tax_totals" primary="True"> | ||
| <t t-foreach="tax_totals['subtotals']" t-as="subtotal" position="replace"> | ||
| <t t-set="subtotal_amounts" t-value="o._l10n_cl_get_amounts()"/> | ||
|
|
||
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 template could be bit better there ahah