Skip to Content
Menu
This question has been flagged
3 Replies
4150 Views

Hi,

We encounter this stupid problem in Odoo (12.0-20190816), the reference number on our invoices seems to be wrong. Somehow it got an extra sequence number after it....

For example:

Invoice number: F/2019/0032 (which is correct)

But the reference field is printed as:

F/2019/0032/32

Screenshot:

https://imgshare.io/image/GGv87


Somehow the reference number that Odoo generates during creation of an invoice is malformed. Does somebody know what we did wrong?

Kind regards,

Bastiaan


Avatar
Discard
Best Answer

I have exactly the same problem. Been looking for a few hours to fix this.

@Damien, where can I find   report_invoice_document ??

Edit: Never mind, found it and fixed it.

settings-> technical-> User Interface -> View modify -> view report_invoice_document

Then replace [ t-field="o.reference" ] with  [ t-field="o.number" ]



Avatar
Discard
Author

Thanks!!!!

Best Answer

The number shown on the invoice is the reference field and you are looking for the number field.
Try to customize your invoice with the following xpath

<!-- for the first one -->

<xpath expr="//span[@t-field='o.reference']" position="replace"> 

 <span t-field="o.number"/> 

 </xpath>


<!-- for the second one -->

<xpath expr="//p[@t-field='o.reference']" position="replace"> 

 <p class="m-0" t-field="o.number"/> 

 </xpath>


You can refer to the view report_invoice_document to locate those fields :)

Avatar
Discard
Best Answer

have someone changing sequence after validating invoices (manually)?

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 19
2325
0
Oct 17
1859
2
Mar 15
3412
2
Mar 15
7795
0
Mar 15
3352