Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
1300 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
juil. 25
1382
0
janv. 25
1161
1
mai 24
2001
2
avr. 24
2002
2
févr. 24
1367