Debian Codegraph @

addons/l10n_in/views/report_invoice.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <template id="l10n_in_report_invoice_document_inherit" inherit_id="account.report_invoice_document" primary="True">
4 <xpath expr="//div[@name='shipping_address_block']" position="inside">
5 <div t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.company_id.l10n_in_is_gst_registered and o.partner_shipping_id.vat">
6 GSTIN: <span t-field="o.partner_shipping_id.vat"/>
7 </div>
8 </xpath>
9 <xpath expr="//div[@id='partner_vat_address_same_as_shipping']" position="attributes">
10 <attribute name="t-if" add="o.company_id.l10n_in_is_gst_registered" separator="and"/>
11 </xpath>
12 <xpath expr="//div[@id='partner_vat_address_not_same_as_shipping']" position="attributes">
13 <attribute name="t-if" add="o.company_id.l10n_in_is_gst_registered" separator="and"/>
14 </xpath>
15 <xpath expr="//div[@id='partner_vat_no_shipping']" position="attributes">
16 <attribute name="t-if" add="o.company_id.l10n_in_is_gst_registered" separator="and"/>
17 </xpath>
18 <xpath expr="//div[@name='address_not_same_as_shipping']//t[@t-set='address']" position="inside">
19 <t t-call="l10n_in.place_of_supply"/>
20 </xpath>
21 <xpath expr="//div[@name='address_same_as_shipping']//t[@t-set='address']" position="inside">
22 <t t-call="l10n_in.place_of_supply"/>
23 </xpath>
24 <xpath expr="//div[@name='no_shipping']//t[@t-set='address']" position="inside">
25 <t t-call="l10n_in.place_of_supply"/>
26 </xpath>
27
28 <xpath expr="//table[@name='invoice_line_table']/thead/tr/th[1]" position="after">
29 <t t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.company_id.l10n_in_is_gst_registered">
30 <th>HSN/SAC</th>
31 </t>
32 </xpath>
33
34 <xpath expr="//t[@name='account_invoice_line_accountable']/td[1]" position="after">
35 <td t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.company_id.l10n_in_is_gst_registered">
36 <span t-if="line.l10n_in_hsn_code" t-field="line.l10n_in_hsn_code"></span>
37 </td>
38 </xpath>
39
40 <xpath expr="//div[@id='qrcode_info']" position="attributes">
41 <attribute name="t-if" add="o.company_id.account_fiscal_country_id.code != 'IN'" separator="and"/>
42 </xpath>
43
44 <xpath expr="//div[@id='qrcode_info']" position="after">
45 <t t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.company_id.l10n_in_upi_id">
46 <div style="display:-webkit-flex;" class="flex-column">
47 <strong>PAYMENT QR CODE</strong>
48 <div class="mt-1 mb-1">
49 <p class="mb-0">UPI ID:</p>
50 <span class="mb-0" t-field="o.company_id.l10n_in_upi_id"/>
51 </div>
52 <div class="d-flex flex-row" t-attf-style="#{'-webkit-transform:translateX(-0.5rem);' if report_type != 'html' else '-webkit-transform:translate(-0.5rem,-0.8rem);'}">
53 <img src="/l10n_in/static/src/img/PhonePe-Logo.svg" style="width:4.5rem;"/>
54 <img src="/l10n_in/static/src/img/Google_Pay-Logo.svg" style="width:3.5rem;"/>
55 <img src="/l10n_in/static/src/img/Paytm-Logo.svg" style="width:4rem;"/>
56 <img src="/l10n_in/static/src/img/Upi-logo.svg" t-attf-style="#{'' if report_type != 'html' else 'padding:0.5rem;'} width:4rem;"/>
57 </div>
58 </div>
59 </t>
60 </xpath>
61
62 <t name="invoice_title" position="replace">
63 <t name="invoice_title">
64 <span t-out="o._get_l10n_in_invoice_label()"/>
65 </t>
66 </t>
67 <t name="proforma_invoice_title" position="replace">
68 <t name="proforma_invoice_title">
69 Proforma <span t-out="o._get_l10n_in_invoice_label()"/>
70 </t>
71 </t>
72
73 <xpath expr="//div[@id='payment_term']" position="after">
74 <t t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.company_id.l10n_in_is_gst_registered">
75 <t t-set="hsn_summary" t-value="o._l10n_in_get_hsn_summary_table()"/>
76 <t t-if="hsn_summary">
77 <div name="l10n_in_hsn_summary" class="mt-3" style="page-break-inside: avoid;">
78 <h3>HSN Summary</h3>
79 <table class="table table-sm table-borderless col-6">
80 <thead>
81 <th>HSN/SAC</th>
82 <th class="text-end">Quantity</th>
83 <th class="text-end">Rate %</th>
84 <th class="text-end">Taxable Value</th>
85 <th class="text-end" t-if="hsn_summary['has_gst']">SGST/UTGST</th>
86 <th class="text-end" t-if="hsn_summary['has_gst']">CGST</th>
87 <th class="text-end" t-if="hsn_summary['has_igst']">IGST</th>
88 <th class="text-end" t-if="hsn_summary['has_cess']">CESS</th>
89 </thead>
90 <tr t-foreach="hsn_summary['items']" t-as="item">
91 <td t-esc="item['l10n_in_hsn_code']"/>
92 <td class="text-end">
93 <span t-esc="item['quantity']"/>
94 <span t-if="hsn_summary['display_uom']">(<t t-esc="item['uom_name']"/>)</span>
95 </td>
96 <td class="text-end" t-esc="item['rate']"/>
97 <td class="text-end">
98 <span t-esc="item['amount_untaxed']"
99 t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
100 </td>
101 <td class="text-end" t-if="hsn_summary['has_gst']">
102 <span t-esc="item['tax_amount_sgst']"
103 t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
104 </td>
105 <td class="text-end" t-if="hsn_summary['has_gst']">
106 <span t-esc="item['tax_amount_cgst']"
107 t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
108 </td>
109 <td class="text-end" t-if="hsn_summary['has_igst']">
110 <span t-esc="item['tax_amount_igst']"
111 t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
112 </td>
113 <td class="text-end" t-if="hsn_summary['has_cess']">
114 <span t-esc="item['tax_amount_cess']"
115 t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
116 </td>
117 </tr>
118 </table>
119 </div>
120 </t>
121 </t>
122 </xpath>
123
124 </template>
125
126 <!-- Workaround for Studio reports, see odoo/odoo#60660 -->
127 <template id="report_invoice" inherit_id="account.report_invoice">
128 <xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
129 <t t-elif="o._get_name_invoice_report() == 'l10n_in.l10n_in_report_invoice_document_inherit'"
130 t-call="l10n_in.l10n_in_report_invoice_document_inherit"
131 t-lang="lang"/>
132 </xpath>
133 </template>
134
135 <template id="place_of_supply">
136 <div t-if="o.company_id.l10n_in_is_gst_registered and o.l10n_in_state_id">
137 Place of supply: <span t-out="o.l10n_in_state_id.name" />
138 </div>
139 </template>
140
141 </odoo>