İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
1607 Görünümler

Hi,

we want to customize invoice layout while using DIN5008 report layou addon.

We want do display partner VATID on the right side in the information block instead of the adress-zone. Can anyone help where to change this. The default reports do not honor this settings, so it look like it is in one of the files in addon-dir?


"l10n_din5008.external_layout_din5008"

Avatar
Vazgeç
Üretici En İyi Yanıt

Thanks for your reply. I get the whole idea. However, when I try to save your example I get something like "block not found" in inherited view?


Element „

“ kann nicht in der übergeordneten Ansicht lokalisiert werden
Avatar
Vazgeç
En İyi Yanıt

Hi,

To make customization you need to inherit the current  "external_layout_din5008" template and add the VAT information inside the information div

example:

<template id="inherit_external_layout_din5008"

inherit_id="l10n_din5008.external_layout_din5008">

<xpath expr="//div[hasclass('information_block')]"

               position="replace">

                                <div class="information_block"

                                     style="margin-bottom: -5mm; margin-left: 5mm;">

<t t-if="'l10n_din5008_template_data' in company"

                                       t-set="template_data"

t-value="company.l10n_din5008_template_data"/>

                                    <t t-if="o and 'l10n_din5008_template_data' in o"

                                       t-set="template_data"

t-value="o.l10n_din5008_template_data"/>

                                    <table>

                                        <t t-foreach="template_data"

                                           t-as="row">

                                            <tr>

                                                <td>

                                                    <t t-out="row[0]"/>

                                                </td>

                                                <td>

                                                    <t t-out="row[1]"/>

                                                </td>

                                            </tr>

                                        </t>

                                        <t t-if="delivery_det">

                                            <tr t-if="delivery_det.origin">

                                                <td t-if="delivery_det.origin"

                                                    name="div_origin">

                                                    <strong>Order:</strong>

                                                </td>

                                                <td>

<span t-field="delivery_det.origin"/>

                                                </td>

                                            </tr>

                                            <tr name="div_sched_date">

                                                <td t-if="o.state"

                                                    class="col-auto"

                                                    name="div_sched_date">

                                                    <strong>Shipping Date:

                                                    </strong>

                                                </td>

                                                <td>

                                                    <span t-if="delivery_det.state == 'done'"

t-esc="delivery_det.date_done.date().strftime('%d/%m/%Y')"/>

                                                    <span t-else=""

t-esc="delivery_det.scheduled_date.date().strftime('%d/%m/%Y')"/>

                                                </td>

                                            </tr>

<tr t-if="delivery_det.sale_id.user_id">

                                                <td>

                                                    <strong>Sales Person

                                                    </strong>

                                                </td>

                                                <td>

<span t-esc="http://delivery_det.sale_id.user_id.name" target="_blank">delivery_det.sale_id.user_id.name"/>

                                                </td>


                                            </tr>

                                        </t>

                                        <tr t-if="company.vat">

                                            <td >

                                                VAT No.

                                            </td>

                                            <td>

                                                <t t-out="company.vat"/>

                                            </td>

                                        </tr>

                                        <tr t-if="payment_term">

                                            <td>

                                                Payment Terms

                                            </td>

                                            <td>

                                                <t t-esc='payment_term'/>

                                            </td>

                                        </tr>

                                    </table>

                                </div>

        </xpath>

    </template>



The above is just an example of inheriting the layout template and replacing the information block div to add the company VAT inside it.

-- 

   

       


   


Hope it helps

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Eki 25
1496
2
Eki 25
2730
1
Eki 25
335
1
Ağu 25
1093
1
Nis 25
1992