diff options
| author | Jigar Vaghela <jva@odoo.com> | 2020-01-22 10:34:58 +0000 |
|---|---|---|
| committer | Jigar Vaghela <jva@odoo.com> | 2020-04-30 07:20:07 +0000 |
| commit | 4774f97e9f2cef5e826bb0fa5555528df504183f (patch) | |
| tree | 919457cdeca58c5681171fec98b89bf9cdba634c /addons | |
| parent | 34c631d3630bd530a79e9cda2cc503641cf47ff1 (diff) | |
[ADD] l10n_in : ADD Reverse Charge Tax
Reverse charge is a mechanism under which the recipient of the goods or services is liable to pay the tax instead of the provider of the goods and services.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_in/data/account.account.template.csv | 1 | ||||
| -rw-r--r-- | addons/l10n_in/data/account_fiscal_position_data.xml | 71 | ||||
| -rw-r--r-- | addons/l10n_in/data/account_tax_template_data.xml | 1098 | ||||
| -rw-r--r-- | addons/l10n_in/report/account_invoice_report.py | 14 | ||||
| -rw-r--r-- | addons/l10n_in/report/hsn_gst_report.py | 14 |
5 files changed, 1184 insertions, 14 deletions
diff --git a/addons/l10n_in/data/account.account.template.csv b/addons/l10n_in/data/account.account.template.csv index 756be074f75..1f845221b74 100644 --- a/addons/l10n_in/data/account.account.template.csv +++ b/addons/l10n_in/data/account.account.template.csv @@ -5,6 +5,7 @@ "p10051","SGST Receivable","10051","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.sgst_tag_account","False" "p10052","CGST Receivable","10052","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.cgst_tag_account","False" "p10053","IGST Receivable","10053","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.igst_tag_account","False" +"p10057","Reverse Charge Tax Receivable","10057","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False" "p10054","TDS Receivable","10058","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False" "p10061","Deposit Account","10061","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False" "p10071","Prepaid Insurance","10071","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False" diff --git a/addons/l10n_in/data/account_fiscal_position_data.xml b/addons/l10n_in/data/account_fiscal_position_data.xml index d36e31fc1d0..169c309f9d2 100644 --- a/addons/l10n_in/data/account_fiscal_position_data.xml +++ b/addons/l10n_in/data/account_fiscal_position_data.xml @@ -137,4 +137,75 @@ <field name="tax_dest_id" ref="igst_purchase_28"/> </record> + <record model="account.fiscal.position.template" id="fiscal_position_in_reverse_charge_intra"> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="name">Reverse charge Intra State</field> + </record> + + <record id="account_fiscal_position_tax_in_purchase_1_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_1"/> + <field name="tax_dest_id" ref="sgst_purchase_1_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_2_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_2"/> + <field name="tax_dest_id" ref="sgst_purchase_2_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_5_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_5"/> + <field name="tax_dest_id" ref="sgst_purchase_5_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_12_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_12"/> + <field name="tax_dest_id" ref="sgst_purchase_12_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_18_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_18"/> + <field name="tax_dest_id" ref="sgst_purchase_18_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_28_intra_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_intra"/> + <field name="tax_src_id" ref="sgst_purchase_28"/> + <field name="tax_dest_id" ref="sgst_purchase_28_rc"/> + </record> + + <record model="account.fiscal.position.template" id="fiscal_position_in_reverse_charge_inter"> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="name">Reverse charge Inter State</field> + </record> + + <record id="account_fiscal_position_tax_in_purchase_1_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_1"/> + <field name="tax_dest_id" ref="igst_purchase_1_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_2_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_2"/> + <field name="tax_dest_id" ref="igst_purchase_2_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_5_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_5"/> + <field name="tax_dest_id" ref="igst_purchase_5_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_12_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_12"/> + <field name="tax_dest_id" ref="igst_purchase_12_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_18_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_18"/> + <field name="tax_dest_id" ref="igst_purchase_18_rc"/> + </record> + <record id="account_fiscal_position_tax_in_purchase_28_rc_inter_rc" model="account.fiscal.position.tax.template"> + <field name="position_id" ref="fiscal_position_in_reverse_charge_inter"/> + <field name="tax_src_id" ref="sgst_purchase_28"/> + <field name="tax_dest_id" ref="igst_purchase_28_rc"/> + </record> </odoo> diff --git a/addons/l10n_in/data/account_tax_template_data.xml b/addons/l10n_in/data/account_tax_template_data.xml index 16be0fcb531..30113e7741a 100644 --- a/addons/l10n_in/data/account_tax_template_data.xml +++ b/addons/l10n_in/data/account_tax_template_data.xml @@ -51,6 +51,37 @@ <field name="sequence">4</field> <field name="report_id" ref="tax_report"/> </record> + + <record id="tax_report_line_sgst_rc" model="account.tax.report.line"> + <field name="name">SGST Reverse Charge</field> + <field name="tag_name">SGST (RC)</field> + <field name="parent_id" ref="tax_report_line_gst"/> + <field name="report_id" ref="tax_report"/> + <field name="sequence">3</field> + </record> + <record id="tax_report_line_cgst_rc" model="account.tax.report.line"> + <field name="name">CGST Reverse Charge</field> + <field name="tag_name">CGST (RC)</field> + <field name="parent_id" ref="tax_report_line_gst"/> + <field name="report_id" ref="tax_report"/> + <field name="sequence">4</field> + </record> + + <record id="tax_report_line_igst_rc" model="account.tax.report.line"> + <field name="name">IGST Reverse Charge</field> + <field name="tag_name">IGST (RC)</field> + <field name="parent_id" ref="tax_report_line_igst_root"/> + <field name="report_id" ref="tax_report"/> + <field name="sequence">4</field> + </record> + <record id="tax_report_line_cess_rc" model="account.tax.report.line"> + <field name="name">CESS Reverse Charge</field> + <field name="tag_name">CESS (RC)</field> + <field name="parent_id" ref="tax_report_line_gst_others"/> + <field name="report_id" ref="tax_report"/> + <field name="sequence">5</field> + </record> + <record id="tax_report_line_exempt" model="account.tax.report.line"> <field name="name">Exempt</field> <field name="tag_name">Exempt</field> @@ -1949,4 +1980,1071 @@ if tax > result:result=tax</field> <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_2_5'),ref('cgst_purchase_2_5'),])]"/> </record> + <!-- Purchase Reverse Charge Taxes--> + + <!-- CESS Taxes --> + + <record id="cess_purchase_5_rc" model="account.tax.template"> + <field name="name">CESS Purchase 5% (RC)</field> + <field name="description">CESS 5%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">5</field> + <field name="tax_group_id" ref="cess_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11235'), + 'minus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10055'), + 'plus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + </record> + + <record id="cess_purchase_1591_rc" model="account.tax.template"> + <field name="name">CESS Purchase 1591 Per Thousand (RC)</field> + <field name="description">1591 PER THOUSAND</field> + <field name="type_tax_use">none</field> + <field name="amount_type">fixed</field> + <field name="amount">1.591</field> + <field name="tax_group_id" ref="cess_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11235'), + 'minus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10055'), + 'plus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + </record> + + <record id="cess_5_plus_1591_purchase_rc" model="account.tax.template"> + <field name="name">CESS 5% + RS.1591/THOUSAND (RC)</field> + <field name="description">CESS 5% + RS.1591/THOUSAND</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('cess_purchase_5_rc'),ref('cess_purchase_1591_rc'),])]"/> + <field name="tax_group_id" ref="cess_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + </record> + + <record id="cess_21_4170_higer_purchase_rc" model="account.tax.template"> + <field name="name">CESS 21% or RS.4170/THOUSAND (RC)</field> + <field name="description">CESS 21% or RS.4170/THOUSAND</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">code</field> + <field name="amount">0</field> + <field name="python_compute">result=base_amount * 0.21 +tax=quantity * 4.17 +if tax > result:result=tax</field> + <field name="tax_group_id" ref="cess_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11235'), + 'minus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10055'), + 'plus_report_line_ids': [ref('tax_report_line_cess_rc')], + }), + ]"/> + </record> + + + <!-- IGST --> + + <record id="igst_purchase_1_rc" model="account.tax.template"> + <field name="name">IGST 1% (RC)</field> + <field name="description">IGST 1%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">1</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst'), ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <record id="igst_purchase_2_rc" model="account.tax.template"> + <field name="name">IGST 2% (RC)</field> + <field name="description">IGST 2%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">2</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <record id="igst_purchase_28_rc" model="account.tax.template"> + <field name="name">IGST 28% (RC)</field> + <field name="description">IGST 28%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">28</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst'), ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <record id="igst_purchase_18_rc" model="account.tax.template"> + <field name="name">IGST 18% (RC)</field> + <field name="description">IGST 18%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">18</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <record id="igst_purchase_12_rc" model="account.tax.template"> + <field name="name">IGST 12% (RC)</field> + <field name="description">IGST 12%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">12</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <record id="igst_purchase_5_rc" model="account.tax.template"> + <field name="name">IGST 5% (RC)</field> + <field name="description">IGST 5%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">percent</field> + <field name="amount">5</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="igst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11234'), + 'minus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10053'), + 'plus_report_line_ids': [ref('tax_report_line_igst_rc')], + }), + ]"/> + </record> + + <!-- SGST & CGST --> + + <record id="sgst_purchase_0_5_rc" model="account.tax.template"> + <field name="name">SGST Purchase 0.5% (RC)</field> + <field name="description">SGST 0.5%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">0.5</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }) + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }) + ]"/> + </record> + + <record id="cgst_purchase_0_5_rc" model="account.tax.template"> + <field name="name">CGST Purchase 0.5% (RC)</field> + <field name="description">CGST 0.5%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">0.5</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }) + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }) + ]"/> + </record> + + <record id="sgst_purchase_1_rc" model="account.tax.template"> + <field name="name">GST 1% (RC)</field> + <field name="description">GST 1%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">1.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_0_5_rc'),ref('cgst_purchase_0_5_rc'),])]"/> + </record> + + <record id="sgst_purchase_1_2_rc" model="account.tax.template"> + <field name="name">SGST Purchase 1% (RC)</field> + <field name="description">SGST 1%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">1</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }) + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }) + ]"/> + </record> + + <record id="cgst_purchase_1_2_rc" model="account.tax.template"> + <field name="name">CGST Purchase 1% (RC)</field> + <field name="description">CGST 1%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">1</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }) + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }) + ]"/> + + </record> + + <record id="sgst_purchase_2_rc" model="account.tax.template"> + <field name="name">GST 2% (RC)</field> + <field name="description">GST 2%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">2.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_1_2_rc'),ref('cgst_purchase_1_2_rc'),])]"/> + </record> + + <record id="sgst_purchase_14_rc" model="account.tax.template"> + <field name="name">SGST Purchase 14% (RC)</field> + <field name="description">SGST 14%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">14</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + </record> + + <record id="cgst_purchase_14_rc" model="account.tax.template"> + <field name="name">CGST Purchase 14% (RC)</field> + <field name="description">CGST 14%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">14</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + </record> + + <record id="sgst_purchase_28_rc" model="account.tax.template"> + <field name="name">GST 28% (RC)</field> + <field name="description">GST 28%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">28.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_14_rc'),ref('cgst_purchase_14_rc'),])]"/> + </record> + + <record id="sgst_purchase_9_rc" model="account.tax.template"> + <field name="name">SGST Purchase 9% (RC)</field> + <field name="description">SGST 9%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">9</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + </record> + + <record id="cgst_purchase_9_rc" model="account.tax.template"> + <field name="name">CGST Purchase 9% (RC)</field> + <field name="description">CGST 9%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">9</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + </record> + + <record id="sgst_purchase_18_rc" model="account.tax.template"> + <field name="name">GST 18% (RC)</field> + <field name="description">GST 18%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">18.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_9_rc'),ref('cgst_purchase_9_rc'),])]"/> + </record> + + <record id="sgst_purchase_6_rc" model="account.tax.template"> + <field name="name">SGST Purchase 6% (RC)</field> + <field name="description">SGST 6%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">6</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + </record> + + <record id="cgst_purchase_6_rc" model="account.tax.template"> + <field name="name">CGST Purchase 6% (RC)</field> + <field name="description">CGST 6%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">6</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + </record> + + <record id="sgst_purchase_12_rc" model="account.tax.template"> + <field name="name">GST 12% (RC)</field> + <field name="description">GST 12%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">12.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_6_rc'),ref('cgst_purchase_6_rc'),])]"/> + </record> + + <record id="sgst_purchase_2_5_rc" model="account.tax.template"> + <field name="name">SGST Purchase 2.5% (RC)</field> + <field name="description">SGST 2.5%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">2.5</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="sgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11232'), + 'minus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10051'), + 'plus_report_line_ids': [ref('tax_report_line_sgst_rc')], + }) + ]"/> + </record> + + <record id="cgst_purchase_2_5_rc" model="account.tax.template"> + <field name="name">CGST Purchase 2.5% (RC)</field> + <field name="description">CGST 2.5%</field> + <field name="type_tax_use">none</field> + <field name="amount_type">percent</field> + <field name="amount">2.5</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="cgst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p11233'), + 'minus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + <field name="refund_repartition_line_ids" eval="[(5, 0, 0), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'base', + }), + (0,0, { + 'factor_percent': 100, + 'repartition_type': 'tax', + 'account_id': ref('p10057'), + }), + (0,0, { + 'factor_percent': -100, + 'repartition_type': 'tax', + 'account_id': ref('p10052'), + 'plus_report_line_ids': [ref('tax_report_line_cgst_rc')], + }), + ]"/> + </record> + + <record id="sgst_purchase_5_rc" model="account.tax.template"> + <field name="name">GST 5% (RC)</field> + <field name="description">GST 5%</field> + <field name="type_tax_use">purchase</field> + <field name="amount_type">group</field> + <field name="amount">5.0</field> + <field name="chart_template_id" ref="indian_chart_template_standard"/> + <field name="tax_group_id" ref="gst_group"/> + <field name="l10n_in_reverse_charge" eval="True"/> + <field name="sequence">0</field> + <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_2_5_rc'),ref('cgst_purchase_2_5_rc'),])]"/> + </record> + </odoo> diff --git a/addons/l10n_in/report/account_invoice_report.py b/addons/l10n_in/report/account_invoice_report.py index 5f59a4497aa..c37a11983cd 100644 --- a/addons/l10n_in/report/account_invoice_report.py +++ b/addons/l10n_in/report/account_invoice_report.py @@ -207,17 +207,17 @@ class L10nInAccountInvoiceReport(models.Model): ELSE '' END) as gst_format_shipping_bill_date, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_igst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst', 'tax_report_line_igst_rc')) THEN aml.balance ELSE 0 END AS igst_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cgst', 'tax_report_line_cgst_rc')) THEN aml.balance ELSE 0 END AS cgst_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) THEN aml.balance ELSE 0 END AS sgst_amount, @@ -226,14 +226,14 @@ class L10nInAccountInvoiceReport(models.Model): JOIN account_account_tag aat_temp ON aat_temp.id = aat_aml_rel_temp.account_account_tag_id JOIN account_tax_report_line_tags_rel tag_rep_ln_temp ON aat_temp.id = tag_rep_ln_temp.account_account_tag_id where temp_aml.move_id = aml.move_id and temp_aml.product_id = aml.product_id - and tag_rep_ln_temp.account_tax_report_line_id IN (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cess') + and tag_rep_ln_temp.account_tax_report_line_id IN (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cess', 'tax_report_line_cess_rc')) ) AS cess_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') OR at.l10n_in_reverse_charge = True + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) THEN NULL ELSE (CASE WHEN aml.tax_base_amount <> 0 THEN aml.tax_base_amount ELSE NULL END) END AS price_total, - (CASE WHEN aj.type = 'sale' AND (am.move_type IS NULL OR am.move_type != 'out_refund') THEN -1 ELSE 1 END) AS amount_sign, + (CASE WHEN (aj.type = 'sale' AND am.move_type != 'out_refund') or (aj.type = 'purchase' AND at.l10n_in_reverse_charge AND am.move_type != 'in_refund') THEN -1 ELSE 1 END) AS amount_sign, (CASE WHEN atr.parent_tax IS NOT NULL THEN atr.parent_tax ELSE at.id END) AS tax_id, (CASE WHEN atr.parent_tax IS NOT NULL THEN parent_at.amount @@ -265,7 +265,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','tax_report_line_zero_rated')) + 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', 'tax_report_line_igst_rc', 'tax_report_line_cgst_rc', 'tax_report_line_sgst_rc')) """ def _group_by(self): diff --git a/addons/l10n_in/report/hsn_gst_report.py b/addons/l10n_in/report/hsn_gst_report.py index 6bf43767be6..f92bf8a3a0e 100644 --- a/addons/l10n_in/report/hsn_gst_report.py +++ b/addons/l10n_in/report/hsn_gst_report.py @@ -43,37 +43,37 @@ class L10nInProductHsnReport(models.Model): CASE WHEN pt.l10n_in_hsn_description IS NULL THEN '' ELSE pt.l10n_in_hsn_description END AS hsn_description, CASE WHEN uom.l10n_in_code IS NULL THEN '' ELSE uom.l10n_in_code END AS l10n_in_uom_code, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') OR at.l10n_in_reverse_charge = True + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) OR at.l10n_in_reverse_charge = True THEN 0 ELSE aml.quantity END AS quantity, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_igst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst', 'tax_report_line_igst_rc')) THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) ELSE 0 END AS igst_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cgst', 'tax_report_line_cgst_rc')) THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) ELSE 0 END AS cgst_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) ELSE 0 END AS sgst_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cess') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cess', 'tax_report_line_cess_rc')) THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) ELSE 0 END AS cess_amount, CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) THEN 0 ELSE (CASE WHEN aml.tax_line_id IS NOT NULL THEN aml.tax_base_amount ELSE aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) END) END AS price_total, (CASE WHEN tag_rep_ln.account_tax_report_line_id IN - (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') + (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) THEN 0 ELSE (CASE WHEN aml.tax_line_id IS NOT NULL THEN aml.tax_base_amount ELSE 1 END) END) + (aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)) AS total |
