Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
1299 Tampilan

Hi, 

maybe someone can help me out here.

We use ODOO 17 and when a contact has VAT-Number entered, it is printed on the Invoice.

We already found, where to "hide" that. However I am unable to print it in another location.

I simply do not now how.


So we removed/commented in "report-invoice-document", which dies work. But I am unable to get it printed anywhere else. We want it printed where the list for Date, Source and Ref is displayed... but how?


Maybe anyone can help me here?


Thank you in advance!


            
               
               
               

                   
                       

                           
                               

                                    Shipping Address:
                                   

                               

                           
                       

                       

                           
                               

                               

                               
                               

                           
                       

                   
                   
                       

                           
                               

                               

                                   
                               

                           
                       

                   
                   
                       

                           
                               

                               

                                   
                               

                           
                       

                   
               

               



Avatar
Buang
Jawaban Terbai

Hey Jörg, I'm running into the same kind of issues for a german report, also using DIN5008 for this. How did you end up hiding the VAT from the information block in the first place? I tried a lot of xpaths and workarounds and that didn't work... Your help would be greatly appreciated!
As for how to place it elsewhere, I did it by overriding the _compute_l10n_din5008_template_data method on account_move and added the VAT field in there!

Avatar
Buang
Penulis Jawaban Terbai

Thank you for you response.

Can you point me a bit more in the right direction, where to place/create this?

Update: I guess all is right but we use the DIN5008 template, and it looks like this needs some "special" handling to add another field. Maybe someone can point me in the right direction where to change this?

Regards

Avatar
Buang
Jawaban Terbai

Hello


Please use this code ,


<template id="report_custom_invoice_document" inherit_id="account.report_invoice_document">

            <xpath expr="//div[@id='informations']" position="inside">

                <div t-attf-class="#{'col-auto col-3 mw-100' if report_type != 'html' else 'col'} mb-2" t-if="o.partner_id.vat" name="vat">

                    <strong>Vat:</strong><br/>

                    <span t-field="o.partner_id.vat"/>

                </div>

            </xpath>

        </template>



Thankyou.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 25
1382
0
Jan 25
1161
1
Mei 24
2001
2
Apr 24
2002
2
Feb 24
1367