80 lines
3.8 KiB
XML
80 lines
3.8 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<odoo>
|
||
|
<template id="l10n_in_report_invoice_document_inherit" inherit_id="account.report_invoice_document" primary="True">
|
||
|
<xpath expr="//div[@name='shipping_address_block']" position="inside">
|
||
|
<div t-if="o.company_id.account_fiscal_country_id.code == 'IN' and o.partner_shipping_id.vat">
|
||
|
GSTIN: <span t-field="o.partner_shipping_id.vat"/>
|
||
|
</div>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@name='address_not_same_as_shipping']//t[@t-set='address']" position="inside">
|
||
|
<t t-call="l10n_in.place_of_supply"/>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@name='address_same_as_shipping']//t[@t-set='address']" position="inside">
|
||
|
<t t-call="l10n_in.place_of_supply"/>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@name='no_shipping']//t[@t-set='address']" position="inside">
|
||
|
<t t-call="l10n_in.place_of_supply"/>
|
||
|
</xpath>
|
||
|
<xpath expr="//div[@t-if='not is_html_empty(o.narration)']" position="before">
|
||
|
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
|
||
|
<p id="total_in_words" class="mb16">
|
||
|
<strong>Total (In Words): </strong>
|
||
|
<span t-field="o.amount_total_words"/>
|
||
|
</p>
|
||
|
</t>
|
||
|
</xpath>
|
||
|
|
||
|
<xpath expr="//table[@name='invoice_line_table']/thead/tr/th[1]" position="after">
|
||
|
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
|
||
|
<th>HSN/SAC</th>
|
||
|
</t>
|
||
|
</xpath>
|
||
|
|
||
|
<xpath expr="//t[@name='account_invoice_line_accountable']/td[1]" position="after">
|
||
|
<td t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
|
||
|
<span t-if="line.product_id.l10n_in_hsn_code" t-field="line.product_id.l10n_in_hsn_code"></span>
|
||
|
</td>
|
||
|
</xpath>
|
||
|
|
||
|
<xpath expr="//h2" position="replace" >
|
||
|
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
|
||
|
<h2>
|
||
|
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'" t-field="o.journal_id.name"/>
|
||
|
<span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
|
||
|
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
|
||
|
<span t-if="o.move_type == 'out_refund'">Credit Note</span>
|
||
|
<span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span>
|
||
|
<span t-if="o.move_type == 'in_invoice'">Vendor Bill</span>
|
||
|
<span t-field="o.name"/>
|
||
|
</h2>
|
||
|
</t>
|
||
|
<t t-else="">$0</t>
|
||
|
</xpath>
|
||
|
|
||
|
</template>
|
||
|
|
||
|
<!-- Workarounds for Studio reports, see odoo/odoo#60660 -->
|
||
|
<template id="report_invoice" inherit_id="account.report_invoice">
|
||
|
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
|
||
|
<t t-elif="o._get_name_invoice_report() == 'l10n_in.l10n_in_report_invoice_document_inherit'"
|
||
|
t-call="l10n_in.l10n_in_report_invoice_document_inherit"
|
||
|
t-lang="lang"/>
|
||
|
</xpath>
|
||
|
</template>
|
||
|
|
||
|
<template id="report_invoice_with_payments" inherit_id="account.report_invoice_with_payments">
|
||
|
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
|
||
|
<t t-elif="o._get_name_invoice_report() == 'l10n_in.l10n_in_report_invoice_document_inherit'"
|
||
|
t-call="l10n_in.l10n_in_report_invoice_document_inherit"
|
||
|
t-lang="lang"/>
|
||
|
</xpath>
|
||
|
</template>
|
||
|
|
||
|
<template id="place_of_supply">
|
||
|
<div t-if="o.l10n_in_state_id">
|
||
|
Place of supply: <span t-out="o.l10n_in_state_id.name" />
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
</odoo>
|