[FIX] l10n_in: support 0% tax in report
Add zero rated tax report line so we show 0% tax line in report here problem is when 0% tax is created then no tax line is there so this fix is needed. closes odoo/odoo#46408 Opw: 2200619 X-original-commit: a0e2afd5c552a0703da5f94c2ea342907cd83599 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
@@ -65,6 +65,13 @@
|
||||
<field name="sequence">6</field>
|
||||
<field name="report_id" ref="tax_report"/>
|
||||
</record>
|
||||
<record id="tax_report_line_zero_rated" model="account.tax.report.line">
|
||||
<field name="name">Zero Rated</field>
|
||||
<field name="tag_name">Zero Rated</field>
|
||||
<field name="parent_id" ref="tax_report_line_gst_others"/>
|
||||
<field name="country_id" ref="base.in"/>
|
||||
<field name="sequence">7</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- GST TAXES-->
|
||||
@@ -269,6 +276,40 @@ if tax > result:result=tax</field>
|
||||
|
||||
<!-- IGST -->
|
||||
|
||||
<record id="igst_sale_0" model="account.tax.template">
|
||||
<field name="name">IGST 0%</field>
|
||||
<field name="description">IGST 0%</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="chart_template_id" ref="indian_chart_template_standard"/>
|
||||
<field name="tax_group_id" ref="igst_group"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_zero_rated')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_zero_rated')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="igst_sale_1" model="account.tax.template">
|
||||
<field name="name">IGST 1%</field>
|
||||
<field name="description">IGST 1%</field>
|
||||
@@ -1172,6 +1213,40 @@ if tax > result:result=tax</field>
|
||||
|
||||
<!-- IGST -->
|
||||
|
||||
<record id="igst_purchase_0" model="account.tax.template">
|
||||
<field name="name">IGST 0%</field>
|
||||
<field name="description">IGST 0%</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="chart_template_id" ref="indian_chart_template_standard"/>
|
||||
<field name="tax_group_id" ref="igst_group"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_zero_rated')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_zero_rated')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="igst_purchase_1" model="account.tax.template">
|
||||
<field name="name">IGST 1%</field>
|
||||
<field name="description">IGST 1%</field>
|
||||
|
||||
@@ -246,7 +246,7 @@ class L10nInAccountInvoiceReport(models.Model):
|
||||
JOIN account_move am ON am.id = aml.move_id
|
||||
JOIN account_journal aj ON aj.id = am.journal_id
|
||||
JOIN res_company c ON c.id = aj.company_id
|
||||
JOIN account_tax at ON at.id = aml.tax_line_id
|
||||
LEFT JOIN account_tax at ON at.id = aml.tax_line_id
|
||||
JOIN account_account_tag_account_move_line_rel aat_aml_rel ON aat_aml_rel.account_move_line_id = aml.id
|
||||
JOIN account_account_tag aat ON aat.id = aat_aml_rel.account_account_tag_id
|
||||
JOIN account_tax_report_line_tags_rel tag_rep_ln ON aat.id = tag_rep_ln.account_account_tag_id
|
||||
@@ -264,7 +264,7 @@ class L10nInAccountInvoiceReport(models.Model):
|
||||
def _where(self):
|
||||
return """
|
||||
WHERE am.state = 'posted'
|
||||
AND tag_rep_ln.account_tax_report_line_id in (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst','tax_report_line_cgst','tax_report_line_sgst'))
|
||||
AND tag_rep_ln.account_tax_report_line_id in (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst','tax_report_line_cgst','tax_report_line_sgst','tax_report_line_zero_rated'))
|
||||
"""
|
||||
|
||||
def _group_by(self):
|
||||
|
||||
Reference in New Issue
Block a user