Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4240 Vistas

Is it possible to add the word "PAID" anywhere on the paid invoices when I print them as PDF?

The thing is that I want to add the word PAID anywhere when I print the paid invoices as PDF.  Maybe there is a way to modify the template for this?

Avatar
Descartar
Autor

This for odoo online version. BTW

Thanks! ;)

Mejor respuesta

1. Create a new QWEB view that inherits and overrides the standard Invoice report.  Do this via Settings --> Technical --> User Interface --> Views



2. Add the following to the ARCHITECTURE FIELD:


<p t-if="o.comment"  position="before">
 <t t-set="paid_total" t-value="- o.amount_total + o.residual"/>
  <div class="row">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<td><strong>Less Payments</strong></td>
<td class="text-right">
<span t-esc="paid_total"
t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
  </td>
</tr>
  <tr class="border-black">
<td><strong>Open Balance</strong>
</td>
<td class="text-right">
<span t-field="o.residual"
t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>
  </td>
</tr>
<!-- OPTIONALLY INSERT WORDS HERE --> 
</table>
</div>
</div>
</p>


3. Make sure RELOAD FROM ATTACHMENT is not checked in the Report Definition.  Find it at Settings --> Technical --> Actions --> Reports.



4. The Invoice Report will then look like this:


EDIT: To add the words PAID, add this at the end of the XML in the ARCHITECTURE field (where is has <!-- OPTIONALLY INSERT WORDS HERE -->)


<tr>            
<td>
<span t-if="o.residual == 0">PAID IN FULL</span>
</td>
</tr>

Avatar
Descartar
Autor

Thanks for your answer Ray Carnes, but I'm not sure If this is what I need it. I need the word "PAID" present when I print a paid invoice as PDF... This word "PAID" should be big. Because sometimes my clients asks to send the invoice again with that label (PAID).

And on the step 4 of your steps I cant see the word "PAID".

See my edit.

Publicaciones relacionadas Respuestas Vistas Actividad
5
ene 25
27649
2
may 25
672
1
ene 23
4020
3
oct 21
3263
1
abr 21
4134