Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions addons/l10n_cl/views/report_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,42 @@
</tr>
</template>

<template id="report_invoice_document_copy" inherit_id="l10n_cl.report_invoice_document">

Choose a reason for hiding this comment

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

This should be in enterprise 😉
We can dooo wayyy better with bootstrap, let's take a course ahah

<xpath expr="//div[@id='right-elements']" position="inside">
<div t-if="show_information_box" name="custom_info_box" class="col-12 mt-3 p-3 border border-primary rounded">

Choose a reason for hiding this comment

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

Seems a bit IA generated that ahah, don't rely too much on that ahah. IA is a tool that you can use but do not trust everything he say 😄
Missing a condition on the partner use don't you think ? Do we really want that for all customers ?

<div class="row mb-2">
<div class="col-12 d-flex align-items-baseline">
<span class="small me-2 text-nowrap">Nombre: </span>
<div class="border-bottom pb-1 flex-grow-1" stylr="min-height: 1.2rem;"/>

Choose a reason for hiding this comment

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

i suppose you meant style ?
Style should be avoided at all cost for multiple reason:

  • Difficult to maintain, using class we can actually modify the class for everything in the code to have consistency, here you cannot
  • Readability: here you have just one styling so ok but you can have a lot and it will become a nightmare
  • Priority: let's say we have a min height in one of the class, the styling will take priority on everything, which you could lead to problematic behavior

</div>
</div>
<div class="row mb-2">
<div class="col-6 d-flex align-items-baseline">
<span class="small me-2 text-nowrap">RUT: </span>
<div class="border-bottom pb-1 flex-grow-1" stylr="min-height: 1.2rem;"/>
</div>
<div class="col-6 d-flex align-items-baseline">
<span class="small me-2 text-nowrap">FETCHA: </span>
<div class="border-bottom pb-1 flex-grow-1" stylr="min-height: 1.2rem;"/>
</div>
</div>
<div class="row mb-2">
<div class="col-6 d-flex align-items-baseline">
<span class="small me-2 text-nowrap">Recinto: </span>
<div class="border-bottom pb-1 flex-grow-1" stylr="min-height: 1.2rem;"/>
</div>
<div class="col-6 d-flex align-items-baseline">
<span class="small me-2 text-nowrap">FIRMA: </span>
<div class="border-bottom pb-1 flex-grow-1" stylr="min-height: 1.2rem;"/>
</div>
</div>
<p class="mt-3 small text-justify">
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 mercaderia(s) o servicio(s)
Comment on lines +301 to +303

Choose a reason for hiding this comment

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

We try to never add text in another language than English here, that's why we use translation ! Let's export the pot and po files and do the translation 😄

</p>
</div>

Choose a reason for hiding this comment

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

What you could do is having the first div just to have the basic space if we follow what has been done in the base template it would be. I will let you check what is an offset 😄

<div t-if="..." name="..." class="col-4 offset-8">

now either you do multiple row and you add the border like you have you could do one big row (that was the chosen solution but i think both are fine) just multiple row will need a bit more code.

I see that you use d-flex which is nice, i would advice reading about it because you will definitely use it later in your odoo career !

</xpath>
</template>

</odoo>