[ADD] GST module for Indian Localization: configure indian taxes and chart of accounts, summary and excel report for GSTR-1,GSTR-2

This commit is contained in:
Chinmayi Vyas 2018-03-20 10:30:07 +05:30
parent f81184cb98
commit 056853fbe4
54 changed files with 7194 additions and 108 deletions

View File

@ -45,7 +45,7 @@
</record> </record>
<record id="cess_5_plus_1591_sale" model="account.tax.template"> <record id="cess_5_plus_1591_sale" model="account.tax.template">
<field name="name">CESS 5% + RS.1591/THOUSAND </field> <field name="name">CESS 5% + RS.1591/THOUSAND</field>
<field name="description">CESS 5% + RS.1591/THOUSAND</field> <field name="description">CESS 5% + RS.1591/THOUSAND</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -56,14 +56,15 @@
</record> </record>
<record id="cess_21_4170_higer_sale" model="account.tax.template"> <record id="cess_21_4170_higer_sale" model="account.tax.template">
<field name="name">CESS 21% or RS.4170/THOUSAND </field> <field name="name">CESS 21% or RS.4170/THOUSAND</field>
<field name="description">CESS 21% or RS.4170/THOUSAND</field> <field name="description">CESS 21% or RS.4170/THOUSAND</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">code</field> <field name="amount_type">code</field>
<field name="amount">0</field> <field name="amount">0</field>
<field name="python_compute">result=base_amount * 0.21 <field name="python_compute">result=base_amount * 0.21
tax=quantity * 4.17 tax=quantity * 4.17
if tax > result:result=tax</field> if tax > result:result=tax
</field>
<field name="tax_group_id" ref="cess_group"/> <field name="tax_group_id" ref="cess_group"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6,0,[ref('cess_tag_tax'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('cess_tag_tax'),])]"/>
@ -72,7 +73,7 @@ if tax > result:result=tax</field>
<!-- IGST --> <!-- IGST -->
<record id="igst_sale_1" model="account.tax.template"> <record id="igst_sale_1" model="account.tax.template">
<field name="name">IGST 1%</field> <field name="name">IGST Sale 1%</field>
<field name="description">IGST 1%</field> <field name="description">IGST 1%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -85,7 +86,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_sale_2" model="account.tax.template"> <record id="igst_sale_2" model="account.tax.template">
<field name="name">IGST 2%</field> <field name="name">IGST Sale 2%</field>
<field name="description">IGST 2%</field> <field name="description">IGST 2%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -98,7 +99,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_sale_28" model="account.tax.template"> <record id="igst_sale_28" model="account.tax.template">
<field name="name">IGST 28%</field> <field name="name">IGST Sale 28%</field>
<field name="description">IGST 28%</field> <field name="description">IGST 28%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -111,7 +112,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_sale_18" model="account.tax.template"> <record id="igst_sale_18" model="account.tax.template">
<field name="name">IGST 18%</field> <field name="name">IGST Sale 18%</field>
<field name="description">IGST 18%</field> <field name="description">IGST 18%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -124,7 +125,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_sale_12" model="account.tax.template"> <record id="igst_sale_12" model="account.tax.template">
<field name="name">IGST 12%</field> <field name="name">IGST Sale 12%</field>
<field name="description">IGST 12%</field> <field name="description">IGST 12%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -137,7 +138,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_sale_5" model="account.tax.template"> <record id="igst_sale_5" model="account.tax.template">
<field name="name">IGST 5%</field> <field name="name">IGST Sale 5%</field>
<field name="description">IGST 5%</field> <field name="description">IGST 5%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -178,7 +179,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_1" model="account.tax.template"> <record id="sgst_sale_1" model="account.tax.template">
<field name="name">GST 1%</field> <field name="name">GST Sale 1%</field>
<field name="description">GST 1%</field> <field name="description">GST 1%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -214,7 +215,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_2" model="account.tax.template"> <record id="sgst_sale_2" model="account.tax.template">
<field name="name">GST 2%</field> <field name="name">GST Sale 2%</field>
<field name="description">GST 2%</field> <field name="description">GST 2%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -250,7 +251,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_28" model="account.tax.template"> <record id="sgst_sale_28" model="account.tax.template">
<field name="name">GST 28%</field> <field name="name">GST Sale 28%</field>
<field name="description">GST 28%</field> <field name="description">GST 28%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -286,7 +287,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_18" model="account.tax.template"> <record id="sgst_sale_18" model="account.tax.template">
<field name="name">GST 18%</field> <field name="name">GST Sale 18%</field>
<field name="description">GST 18%</field> <field name="description">GST 18%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -322,7 +323,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_12" model="account.tax.template"> <record id="sgst_sale_12" model="account.tax.template">
<field name="name">GST 12%</field> <field name="name">GST Sale 12%</field>
<field name="description">GST 12%</field> <field name="description">GST 12%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -358,7 +359,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_sale_5" model="account.tax.template"> <record id="sgst_sale_5" model="account.tax.template">
<field name="name">GST 5%</field> <field name="name">GST Sale 5%</field>
<field name="description">GST 5%</field> <field name="description">GST 5%</field>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -394,7 +395,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="cess_5_plus_1591_purchase" model="account.tax.template"> <record id="cess_5_plus_1591_purchase" model="account.tax.template">
<field name="name">CESS 5% + RS.1591/THOUSAND </field> <field name="name">CESS 5% + RS.1591/THOUSAND</field>
<field name="description">CESS 5% + RS.1591/THOUSAND</field> <field name="description">CESS 5% + RS.1591/THOUSAND</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -404,14 +405,15 @@ if tax > result:result=tax</field>
</record> </record>
<record id="cess_21_4170_higer_purchase" model="account.tax.template"> <record id="cess_21_4170_higer_purchase" model="account.tax.template">
<field name="name">CESS 21% or RS.4170/THOUSAND </field> <field name="name">CESS 21% or RS.4170/THOUSAND</field>
<field name="description">CESS 21% or RS.4170/THOUSAND</field> <field name="description">CESS 21% or RS.4170/THOUSAND</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">code</field> <field name="amount_type">code</field>
<field name="amount">0</field> <field name="amount">0</field>
<field name="python_compute">result=base_amount * 0.21 <field name="python_compute">result=base_amount * 0.21
tax=quantity * 4.17 tax=quantity * 4.17
if tax > result:result=tax</field> if tax > result:result=tax
</field>
<field name="tax_group_id" ref="cess_group"/> <field name="tax_group_id" ref="cess_group"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6,0,[ref('cess_tag_tax'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('cess_tag_tax'),])]"/>
@ -420,7 +422,7 @@ if tax > result:result=tax</field>
<!-- IGST --> <!-- IGST -->
<record id="igst_purchase_1" model="account.tax.template"> <record id="igst_purchase_1" model="account.tax.template">
<field name="name">IGST 1%</field> <field name="name">IGST Purchase 1%</field>
<field name="description">IGST 1%</field> <field name="description">IGST 1%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -433,7 +435,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_purchase_2" model="account.tax.template"> <record id="igst_purchase_2" model="account.tax.template">
<field name="name">IGST 2%</field> <field name="name">IGST Purchase 2%</field>
<field name="description">IGST 2%</field> <field name="description">IGST 2%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -446,7 +448,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_purchase_28" model="account.tax.template"> <record id="igst_purchase_28" model="account.tax.template">
<field name="name">IGST 28%</field> <field name="name">IGST Purchase 28%</field>
<field name="description">IGST 28%</field> <field name="description">IGST 28%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -459,7 +461,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_purchase_18" model="account.tax.template"> <record id="igst_purchase_18" model="account.tax.template">
<field name="name">IGST 18%</field> <field name="name">IGST Purchase 18%</field>
<field name="description">IGST 18%</field> <field name="description">IGST 18%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -472,7 +474,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_purchase_12" model="account.tax.template"> <record id="igst_purchase_12" model="account.tax.template">
<field name="name">IGST 12%</field> <field name="name">IGST Purchase 12%</field>
<field name="description">IGST 12%</field> <field name="description">IGST 12%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -485,7 +487,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="igst_purchase_5" model="account.tax.template"> <record id="igst_purchase_5" model="account.tax.template">
<field name="name">IGST 5%</field> <field name="name">IGST Purchase 5%</field>
<field name="description">IGST 5%</field> <field name="description">IGST 5%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field> <field name="amount_type">percent</field>
@ -526,7 +528,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_1" model="account.tax.template"> <record id="sgst_purchase_1" model="account.tax.template">
<field name="name">GST 1%</field> <field name="name">GST Purchase 1%</field>
<field name="description">GST 1%</field> <field name="description">GST 1%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -562,7 +564,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_2" model="account.tax.template"> <record id="sgst_purchase_2" model="account.tax.template">
<field name="name">GST 2%</field> <field name="name">GST Purchase 2%</field>
<field name="description">GST 2%</field> <field name="description">GST 2%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -598,7 +600,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_28" model="account.tax.template"> <record id="sgst_purchase_28" model="account.tax.template">
<field name="name">GST 28%</field> <field name="name">GST Purchase 28%</field>
<field name="description">GST 28%</field> <field name="description">GST 28%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -634,7 +636,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_18" model="account.tax.template"> <record id="sgst_purchase_18" model="account.tax.template">
<field name="name">GST 18%</field> <field name="name">GST Purchase 18%</field>
<field name="description">GST 18%</field> <field name="description">GST 18%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -670,7 +672,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_12" model="account.tax.template"> <record id="sgst_purchase_12" model="account.tax.template">
<field name="name">GST 12%</field> <field name="name">GST Purchase 12%</field>
<field name="description">GST 12%</field> <field name="description">GST 12%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -706,7 +708,7 @@ if tax > result:result=tax</field>
</record> </record>
<record id="sgst_purchase_5" model="account.tax.template"> <record id="sgst_purchase_5" model="account.tax.template">
<field name="name">GST 5%</field> <field name="name">GST Purchase 5%</field>
<field name="description">GST 5%</field> <field name="description">GST 5%</field>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
<field name="amount_type">group</field> <field name="amount_type">group</field>
@ -715,4 +717,33 @@ if tax > result:result=tax</field>
<field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_2_5'),ref('cgst_purchase_2_5'),])]"/> <field name="children_tax_ids" eval="[(6, 0, [ref('sgst_purchase_2_5'),ref('cgst_purchase_2_5'),])]"/>
</record> </record>
<!-- Exempt -->
<record id="exempt_sale_tax_1" model="account.tax.template">
<field name="name">Exempt 0%</field>
<field name="description">Exempt 0%</field>
<field name="type_tax_use">sale</field>
<field name="amount_type">percent</field>
<field name="amount">0</field>
<field name="sequence">19</field>
<field name="account_id" ref="exempt_sale"/>
<field name="refund_account_id" ref="exempt_sale"/>
<field name="chart_template_id"
ref="l10n_in.indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6, 0, [ref('st_tag_in_97')])]"/>
</record>
<record id="exempt_purchase_tax_1" model="account.tax.template">
<field name="name">Exempt 0%</field>
<field name="description">Exempt 0%</field>
<field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field>
<field name="amount">0</field>
<field name="sequence">60</field>
<field name="account_id" ref="exempt_purchase"/>
<field name="refund_account_id" ref="exempt_purchase"/>
<field name="chart_template_id"
ref="indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6, 0, [ref('st_tag_in_97')])]"/>
</record>
</flectra> </flectra>

View File

@ -33,21 +33,21 @@
<field name="applicability">accounts</field> <field name="applicability">accounts</field>
</record> </record>
<record model="account.account.template" id="p10031"> <record id="p10031" model="account.account.template">
<field name="name">Inventories</field> <field name="name">Inventories</field>
<field name="code">10031</field> <field name="code">10031</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p10040"> <record id="p10040" model="account.account.template">
<field name="name">Debtors</field> <field name="name">Debtors</field>
<field name="code">10040</field> <field name="code">10040</field>
<field name="user_type_id" ref="account.data_account_type_receivable"/> <field name="user_type_id" ref="account.data_account_type_receivable"/>
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p10051"> <record id="p10051" model="account.account.template">
<field name="name">SGST Receivable</field> <field name="name">SGST Receivable</field>
<field name="code">10051</field> <field name="code">10051</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
@ -56,7 +56,7 @@
<field name="tag_ids" eval="[(6,0,[ref('sgst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('sgst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p10052"> <record id="p10052" model="account.account.template">
<field name="name">CGST Receivable</field> <field name="name">CGST Receivable</field>
<field name="code">10052</field> <field name="code">10052</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
@ -65,7 +65,7 @@
<field name="tag_ids" eval="[(6,0,[ref('cgst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('cgst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p10053"> <record id="p10053" model="account.account.template">
<field name="name">IGST Receivable</field> <field name="name">IGST Receivable</field>
<field name="code">10053</field> <field name="code">10053</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
@ -73,21 +73,21 @@
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6,0,[ref('igst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('igst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p10054"> <record id="p10054" model="account.account.template">
<field name="name">TDS Receivable</field> <field name="name">TDS Receivable</field>
<field name="code">10058</field> <field name="code">10058</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p10061"> <record id="p10061" model="account.account.template">
<field name="name">Deposit Account</field> <field name="name">Deposit Account</field>
<field name="code">10061</field> <field name="code">10061</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p10071"> <record id="p10071" model="account.account.template">
<field name="name">Prepaid Insurance</field> <field name="name">Prepaid Insurance</field>
<field name="code">10071</field> <field name="code">10071</field>
<field name="user_type_id" ref="account.data_account_type_current_assets"/> <field name="user_type_id" ref="account.data_account_type_current_assets"/>
@ -95,56 +95,56 @@
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<!-- Fixed Assets --> <!-- Fixed Assets -->
<record model="account.account.template" id="p1011"> <record id="p1011" model="account.account.template">
<field name="name">Buildings</field> <field name="name">Buildings</field>
<field name="code">1011</field> <field name="code">1011</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1012"> <record id="p1012" model="account.account.template">
<field name="name">Land</field> <field name="name">Land</field>
<field name="code">1012</field> <field name="code">1012</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1013"> <record id="p1013" model="account.account.template">
<field name="name">Equipments</field> <field name="name">Equipments</field>
<field name="code">1013</field> <field name="code">1013</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1014"> <record id="p1014" model="account.account.template">
<field name="name">Vehicle</field> <field name="name">Vehicle</field>
<field name="code">1014</field> <field name="code">1014</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1015"> <record id="p1015" model="account.account.template">
<field name="name">Computer/Laptops (Assets)</field> <field name="name">Computer/Laptops (Assets)</field>
<field name="code">1015</field> <field name="code">1015</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1016"> <record id="p1016" model="account.account.template">
<field name="name">Furniture</field> <field name="name">Furniture</field>
<field name="code">1016</field> <field name="code">1016</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1017"> <record id="p1017" model="account.account.template">
<field name="name">Air Conditionar</field> <field name="name">Air Conditionar</field>
<field name="code">1017</field> <field name="code">1017</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1018"> <record id="p1018" model="account.account.template">
<field name="name">Misc Assets</field> <field name="name">Misc Assets</field>
<field name="code">1018</field> <field name="code">1018</field>
<field name="user_type_id" ref="account.data_account_type_fixed_assets"/> <field name="user_type_id" ref="account.data_account_type_fixed_assets"/>
@ -154,56 +154,56 @@
<!-- Liabilities --> <!-- Liabilities -->
<record model="account.account.template" id="p1111"> <record id="p1111" model="account.account.template">
<field name="name">Capital Account</field> <field name="name">Capital Account</field>
<field name="code">1111</field> <field name="code">1111</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p1112"> <record id="p1112" model="account.account.template">
<field name="name">Reserve And Surplus Account</field> <field name="name">Reserve And Surplus Account</field>
<field name="code">1112</field> <field name="code">1112</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11211"> <record id="p11211" model="account.account.template">
<field name="name">Creditors</field> <field name="name">Creditors</field>
<field name="code">11211</field> <field name="code">11211</field>
<field name="user_type_id" ref="account.data_account_type_payable"/> <field name="user_type_id" ref="account.data_account_type_payable"/>
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11221"> <record id="p11221" model="account.account.template">
<field name="name">Bank OD Account</field> <field name="name">Bank OD Account</field>
<field name="code">11221</field> <field name="code">11221</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11222"> <record id="p11222" model="account.account.template">
<field name="name">Secured Loan Account</field> <field name="name">Secured Loan Account</field>
<field name="code">11222</field> <field name="code">11222</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11223"> <record id="p11223" model="account.account.template">
<field name="name">Unsecured Loan Account</field> <field name="name">Unsecured Loan Account</field>
<field name="code">11223</field> <field name="code">11223</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11231"> <record id="p11231" model="account.account.template">
<field name="name">TDS Payable</field> <field name="name">TDS Payable</field>
<field name="code">11231</field> <field name="code">11231</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11232"> <record id="p11232" model="account.account.template">
<field name="name">SGST Payable</field> <field name="name">SGST Payable</field>
<field name="code">11232</field> <field name="code">11232</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
@ -212,7 +212,7 @@
<field name="tag_ids" eval="[(6,0,[ref('sgst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('sgst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p11233"> <record id="p11233" model="account.account.template">
<field name="name">CGST Payable</field> <field name="name">CGST Payable</field>
<field name="code">11233</field> <field name="code">11233</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
@ -221,7 +221,7 @@
<field name="tag_ids" eval="[(6,0,[ref('cgst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('cgst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p11234"> <record id="p11234" model="account.account.template">
<field name="name">IGST Payable</field> <field name="name">IGST Payable</field>
<field name="code">11234</field> <field name="code">11234</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
@ -229,21 +229,21 @@
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6,0,[ref('igst_tag_account'),])]"/> <field name="tag_ids" eval="[(6,0,[ref('igst_tag_account'),])]"/>
</record> </record>
<record model="account.account.template" id="p11241"> <record id="p11241" model="account.account.template">
<field name="name">Wages Payable</field> <field name="name">Wages Payable</field>
<field name="code">11241</field> <field name="code">11241</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11242"> <record id="p11242" model="account.account.template">
<field name="name">Interest Payable</field> <field name="name">Interest Payable</field>
<field name="code">11242</field> <field name="code">11242</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p11243"> <record id="p11243" model="account.account.template">
<field name="name">Notes Payable</field> <field name="name">Notes Payable</field>
<field name="code">11243</field> <field name="code">11243</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/> <field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
@ -252,63 +252,63 @@
</record> </record>
<!-- Income --> <!-- Income -->
<record model="account.account.template" id="p20011"> <record id="p20011" model="account.account.template">
<field name="name">Local Sales</field> <field name="name">Local Sales</field>
<field name="code">20011</field> <field name="code">20011</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p20012"> <record id="p20012" model="account.account.template">
<field name="name">Retail Sales</field> <field name="name">Retail Sales</field>
<field name="code">20012</field> <field name="code">20012</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p20013"> <record id="p20013" model="account.account.template">
<field name="name">Export Sales</field> <field name="name">Export Sales</field>
<field name="code">20013</field> <field name="code">20013</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p20021"> <record id="p20021" model="account.account.template">
<field name="name">Local Services</field> <field name="name">Local Services</field>
<field name="code">20021</field> <field name="code">20021</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p20022"> <record id="p20022" model="account.account.template">
<field name="name">Export Services</field> <field name="name">Export Services</field>
<field name="code">20022</field> <field name="code">20022</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2010"> <record id="p2010" model="account.account.template">
<field name="name">Interest Revenues</field> <field name="name">Interest Revenues</field>
<field name="code">2010</field> <field name="code">2010</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2011"> <record id="p2011" model="account.account.template">
<field name="name">Gain on Sale of Assets</field> <field name="name">Gain on Sale of Assets</field>
<field name="code">2011</field> <field name="code">2011</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="2012"> <record id="2012" model="account.account.template">
<field name="name">Write off Income</field> <field name="name">Write off Income</field>
<field name="code">2012</field> <field name="code">2012</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/> <field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2013"> <record id="p2013" model="account.account.template">
<field name="name">Foreign Exchange Profit</field> <field name="name">Foreign Exchange Profit</field>
<field name="code">2013</field> <field name="code">2013</field>
<field name="user_type_id" ref="account.data_account_type_other_income"/> <field name="user_type_id" ref="account.data_account_type_other_income"/>
@ -317,182 +317,182 @@
</record> </record>
<!-- Expenses --> <!-- Expenses -->
<record model="account.account.template" id="p2100"> <record id="p2100" model="account.account.template">
<field name="name">Electricity Expense</field> <field name="name">Electricity Expense</field>
<field name="code">2100</field> <field name="code">2100</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2101"> <record id="p2101" model="account.account.template">
<field name="name">Salary Expense</field> <field name="name">Salary Expense</field>
<field name="code">2101</field> <field name="code">2101</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2102"> <record id="p2102" model="account.account.template">
<field name="name">Office Rent</field> <field name="name">Office Rent</field>
<field name="code">2102</field> <field name="code">2102</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2103"> <record id="p2103" model="account.account.template">
<field name="name">House Keeping Expense</field> <field name="name">House Keeping Expense</field>
<field name="code">2103</field> <field name="code">2103</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2104"> <record id="p2104" model="account.account.template">
<field name="name">Postage And Courier Expense</field> <field name="name">Postage And Courier Expense</field>
<field name="code">2104</field> <field name="code">2104</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2105"> <record id="p2105" model="account.account.template">
<field name="name">Internet Expense</field> <field name="name">Internet Expense</field>
<field name="code">2105</field> <field name="code">2105</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2106"> <record id="p2106" model="account.account.template">
<field name="name">Telephone Expense</field> <field name="name">Telephone Expense</field>
<field name="code">2106</field> <field name="code">2106</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2107"> <record id="p2107" model="account.account.template">
<field name="name">Purchase Expense</field> <field name="name">Purchase Expense</field>
<field name="code">2107</field> <field name="code">2107</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2108"> <record id="p2108" model="account.account.template">
<field name="name">Computer/Laptop Accessories</field> <field name="name">Computer/Laptop Accessories</field>
<field name="code">2108</field> <field name="code">2108</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2109"> <record id="p2109" model="account.account.template">
<field name="name">News Paper And Magazine</field> <field name="name">News Paper And Magazine</field>
<field name="code">2109</field> <field name="code">2109</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2110"> <record id="p2110" model="account.account.template">
<field name="name">Business Promotion</field> <field name="name">Business Promotion</field>
<field name="code">2110</field> <field name="code">2110</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2111"> <record id="p2111" model="account.account.template">
<field name="name">Entertainment Expense</field> <field name="name">Entertainment Expense</field>
<field name="code">2111</field> <field name="code">2111</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2112"> <record id="p2112" model="account.account.template">
<field name="name">Professional Services</field> <field name="name">Professional Services</field>
<field name="code">2112</field> <field name="code">2112</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2113"> <record id="p2113" model="account.account.template">
<field name="name">Bank Charges</field> <field name="name">Bank Charges</field>
<field name="code">2113</field> <field name="code">2113</field>
<field name="user_type_id" ref="account.data_account_type_liquidity"/> <field name="user_type_id" ref="account.data_account_type_liquidity"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2114"> <record id="p2114" model="account.account.template">
<field name="name">Diwali Bonus/Gift</field> <field name="name">Diwali Bonus/Gift</field>
<field name="code">2114</field> <field name="code">2114</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2115"> <record id="p2115" model="account.account.template">
<field name="name">Parts Purchase</field> <field name="name">Parts Purchase</field>
<field name="code">2115</field> <field name="code">2115</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2116"> <record id="p2116" model="account.account.template">
<field name="name">Repairing Expense</field> <field name="name">Repairing Expense</field>
<field name="code">2116</field> <field name="code">2116</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2117"> <record id="p2117" model="account.account.template">
<field name="name">Foreign Exchange Loss</field> <field name="name">Foreign Exchange Loss</field>
<field name="code">2117</field> <field name="code">2117</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p21181"> <record id="p21181" model="account.account.template">
<field name="name">Sales Commission Expense</field> <field name="name">Sales Commission Expense</field>
<field name="code">21181</field> <field name="code">21181</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p21182"> <record id="p21182" model="account.account.template">
<field name="name">Stationary Expense</field> <field name="name">Stationary Expense</field>
<field name="code">21182</field> <field name="code">21182</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p21183"> <record id="p21183" model="account.account.template">
<field name="name">Travelling Expense</field> <field name="name">Travelling Expense</field>
<field name="code">21183</field> <field name="code">21183</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2121"> <record id="p2121" model="account.account.template">
<field name="name">Opening Stock</field> <field name="name">Opening Stock</field>
<field name="code">2121</field> <field name="code">2121</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2122"> <record id="p2122" model="account.account.template">
<field name="name">Purchase Stock</field> <field name="name">Purchase Stock</field>
<field name="code">2122</field> <field name="code">2122</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2123"> <record id="p2123" model="account.account.template">
<field name="name">Closing Stock</field> <field name="name">Closing Stock</field>
<field name="code">2123</field> <field name="code">2123</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2131"> <record id="p2131" model="account.account.template">
<field name="name">Loss on Sale of Assets</field> <field name="name">Loss on Sale of Assets</field>
<field name="code">2131</field> <field name="code">2131</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record model="account.account.template" id="p2132"> <record id="p2132" model="account.account.template">
<field name="name">Write Off Expense</field> <field name="name">Write Off Expense</field>
<field name="code">2132</field> <field name="code">2132</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/> <field name="user_type_id" ref="account.data_account_type_expenses"/>
@ -500,6 +500,250 @@
<field name="chart_template_id" ref="indian_chart_template_standard"/> <field name="chart_template_id" ref="indian_chart_template_standard"/>
</record> </record>
<record id="p10050" model="account.account.template">
<field name="name">Sales Tax Receivable</field>
<field name="code">10050</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p10054" model="account.account.template">
<field name="name">VAT Receivable</field>
<field name="code">10054</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100521" model="account.account.template">
<field name="name">Excise Duty Receivable</field>
<field name="code">100521</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100522" model="account.account.template">
<field name="name">Education Cess Receivable On Excise Duty</field>
<field name="code">100522</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100523" model="account.account.template">
<field name="name">Higher Education Cess Receivable On Excise
Duty
</field>
<field name="code">100523</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100531" model="account.account.template">
<field name="name">Service Tax Receivable</field>
<field name="code">100531</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100532" model="account.account.template">
<field name="name">Education Cess Receivable On Service Tax</field>
<field name="code">100532</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p100533" model="account.account.template">
<field name="name">Higher Education Cess Receivable On Service
Tax
</field>
<field name="code">100533</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<!-- Liabilities -->
<record id="p1111" model="account.account.template">
<field name="name">Capital Account</field>
<field name="code">1111</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p1112" model="account.account.template">
<field name="name">Reserve And Surplus Account</field>
<field name="code">1112</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11211" model="account.account.template">
<field name="name">Creditors</field>
<field name="code">11211</field>
<field name="user_type_id"
ref="account.data_account_type_payable"/>
<field name="reconcile" eval="True"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11221" model="account.account.template">
<field name="name">Bank OD Account</field>
<field name="code">11221</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11222" model="account.account.template">
<field name="name">Secured Loan Account</field>
<field name="code">11222</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11223" model="account.account.template">
<field name="name">Unsecured Loan Account</field>
<field name="code">11223</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11231" model="account.account.template">
<field name="name">TDS Payable</field>
<field name="code">11231</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11232" model="account.account.template">
<field name="name">VAT Payable</field>
<field name="code">11232</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112331" model="account.account.template">
<field name="name">Excise Duty Payable</field>
<field name="code">112331</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112332" model="account.account.template">
<field name="name">Education Cess Payable On Excise Duty</field>
<field name="code">112332</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112333" model="account.account.template">
<field name="name">Higher Education Cess Payable On Excise Duty
</field>
<field name="code">112333</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112341" model="account.account.template">
<field name="name">Service Tax Payable</field>
<field name="code">112341</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112342" model="account.account.template">
<field name="name">Education Cess Payable On Service Tax</field>
<field name="code">112342</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p112343" model="account.account.template">
<field name="name">Higher Education Cess Payable On Service Tax
</field>
<field name="code">112343</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11235" model="account.account.template">
<field name="name">Sales Tax Payable</field>
<field name="code">11235</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11241" model="account.account.template">
<field name="name">Wages Payable</field>
<field name="code">11241</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11242" model="account.account.template">
<field name="name">Interest Payable</field>
<field name="code">11242</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="p11243" model="account.account.template">
<field name="name">Notes Payable</field>
<field name="code">11243</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id" ref="l10n_in.indian_chart_template_standard"/>
</record>
<record id="st_tag_in_97" model="account.account.tag">
<field name="name">Exempt</field>
<field name="applicability">accounts</field>
</record>
<record id="exempt_sale" model="account.account.template">
<field name="name">Exempt-Sales Account</field>
<field name="code">112540</field>
<field name="user_type_id"
ref="account.data_account_type_current_liabilities"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id"
ref="l10n_in.indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6, 0, [ref('st_tag_in_97')])]"/>
</record>
<record id="exempt_purchase" model="account.account.template">
<field name="name">Exempt-Purchase Account</field>
<field name="code">100840</field>
<field name="user_type_id"
ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="False"/>
<field name="chart_template_id"
ref="l10n_in.indian_chart_template_standard"/>
<field name="tag_ids" eval="[(6, 0, [ref('st_tag_in_97')])]"/>
</record>
<!-- Account Chart Template --> <!-- Account Chart Template -->
<record id="indian_chart_template_standard" model="account.chart.template"> <record id="indian_chart_template_standard" model="account.chart.template">
<field name="property_account_receivable_id" ref="p10040"/> <field name="property_account_receivable_id" ref="p10040"/>

View File

@ -0,0 +1,6 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import models
from . import wizard
from . import report
from . import controllers

View File

@ -0,0 +1,44 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
{
'name': 'GST Reporting For Indian Localization',
'version': '1.0',
'author': 'FlectraHQ',
'website': 'https://flectrahq.com',
'category': 'Accounting',
'summary': 'Goods and Services Tax (India)',
'description': '''
GST module for Flectra enables Indian Organization to use Flectra
Accounting in accordance to GST taxation structure. Providing
necessary reporting data for GSTR-1 & GSTR-2 filling, Tax Credit etc.
''',
'depends': ['account_invoicing', 'l10n_in'],
'data': [
'security/ir.model.access.csv',
'data/product_uom_data.xml',
'data/note_issue_reason_data.xml',
'wizard/account_invoice_refund_view.xml',
'views/product_uom_view.xml',
'views/res_partner_view.xml',
'views/res_company_view.xml',
'views/account_invoice_view.xml',
'views/res_config_settings_views.xml',
'views/gst_report_view.xml',
'views/assets.xml',
'views/note_issue_reason_view.xml',
'views/menuitems_view.xml',
],
'qweb': [
'static/src/xml/*.xml'
],
'demo': [
'demo/res_company_demo.xml',
'demo/res_partner_demo.xml',
'demo/product_demo.xml',
'demo/account_account_demo.xml',
'demo/account_invoice_demo.xml',
],
'installable': True,
'auto_install': False,
'application': True,
}

View File

@ -0,0 +1,3 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import main

View File

@ -0,0 +1,58 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from datetime import datetime
import pytz
from flectra import http, _
from flectra.http import request
from flectra.tools import DEFAULT_SERVER_DATETIME_FORMAT
class ExportExcel(http.Controller):
@http.route('/l10n_in_gst/export_excel', type='http', auth='user')
def get_report(self, **kwargs):
uid = request.session.uid
gst_report_obj = request.env['gst.report'].sudo(uid)
data = {
'from_date': kwargs['from_date'],
'to_date': kwargs['to_date'],
'company_id': int(kwargs['company_id']),
'year': kwargs['year'],
'month': kwargs['month'],
'summary_type': kwargs['summary_type'],
}
utc_tz = pytz.timezone('UTC')
tz = pytz.timezone(
request.env.user.tz) if request.env.user.tz else pytz.utc
def utc_to_local_zone(naive_datetime):
utc_dt = utc_tz.localize(naive_datetime,
is_dst=False)
return utc_dt.astimezone(tz)
create_date = datetime.strptime(
datetime.today().strftime(DEFAULT_SERVER_DATETIME_FORMAT),
DEFAULT_SERVER_DATETIME_FORMAT)
company_id = request.env['res.company'].browse(int(data['company_id']))
gst_file_name = ''
if data['summary_type'] == 'gstr1':
gst_file_name = _('GSTR-1')
elif data['summary_type'] == 'gstr2':
gst_file_name = _('GSTR-2')
filename = gst_file_name + _('_%s_%s-%s_%s.xlsx') % (
company_id.vat, datetime.today().strftime("%B"),
data['year'],
utc_to_local_zone(create_date).strftime(
"%d/%m/%Y %H:%M:%S"))
response = request.make_response(
None,
headers=[
('Content-Type', 'application/vnd.ms-excel'),
('Content-Disposition',
'attachment; filename=' + filename + ';')
]
)
gst_report_obj.print_report(data, 1, response)
return response

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- Note Issuing Reasons Data -->
<record id="note_issue_reason1" model="note.issue.reason">
<field name="code">01</field>
<field name="name">Sales Return</field>
</record>
<record id="note_issue_reason2" model="note.issue.reason">
<field name="code">02</field>
<field name="name">Post Sale Discount</field>
</record>
<record id="note_issue_reason3" model="note.issue.reason">
<field name="code">03</field>
<field name="name">Deficiency in services</field>
</record>
<record id="note_issue_reason4" model="note.issue.reason">
<field name="code">04</field>
<field name="name">Correction in Invoice</field>
</record>
<record id="note_issue_reason5" model="note.issue.reason">
<field name="code">05</field>
<field name="name">Change in POS</field>
</record>
<record id="note_issue_reason6" model="note.issue.reason">
<field name="code">06</field>
<field name="name">Finalization of Provisional assessment</field>
</record>
<record id="note_issue_reason7" model="note.issue.reason">
<field name="code">07</field>
<field name="name">Others</field>
</record>
</data>
</flectra>

View File

@ -0,0 +1,425 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- Product Unit of Measure Data -->
<record id="product.product_uom_cm" model="product.uom">
<field name="name">CENTIMETER</field>
<field name="code">CMS</field>
</record>
<record id="product.product_uom_dozen" model="product.uom">
<field name="name">DOZEN</field>
<field name="code">DOZ</field>
</record>
<record id="product.product_uom_foot" model="product.uom">
<field name="code">FTS</field>
<field name="name">FEET</field>
</record>
<record id="product.product_uom_gram" model="product.uom">
<field name="code">GMS</field>
<field name="name">GRAMS</field>
</record>
<record id="product.product_uom_inch" model="product.uom">
<field name="code">INC</field>
<field name="name">INCHES</field>
</record>
<record id="product.product_uom_kgm" model="product.uom">
<field name="code">KGS</field>
<field name="name">Kilograms</field>
</record>
<record id="product_uom_kiloltr" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_vol"/>
<field name="name">KILOLITER</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.001"/>
<field name="code">KLR</field>
</record>
<record id="product.product_uom_km" model="product.uom">
<field name="code">KME</field>
<field name="name">KILOMETERS</field>
</record>
<record id="product.product_uom_litre" model="product.uom">
<field name="code">LTR</field>
<field name="name">LITERS</field>
</record>
<record id="product.product_uom_meter" model="product.uom">
<field name="code">MTR</field>
<field name="name">METER</field>
</record>
<record id="product.product_uom_qt" model="product.uom">
<field name="code">QTL</field>
<field name="name">QUINTAL</field>
</record>
<record id="product.product_uom_gal" model="product.uom">
<field name="code">UGS</field>
<field name="name">US GALLONS</field>
</record>
<record id="product.product_uom_unit" model="product.uom">
<field name="code">UNT</field>
<field name="name">UNITS</field>
</record>
<record id="product.product_uom_lb" model="product.uom">
<field name="code">LBS</field>
<field name="name">POUNDS</field>
</record>
<record id="product_uom_bag" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BAG</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BAG</field>
</record>
<record id="product_uom_BAGS" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BAGS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BGS</field>
</record>
<record id="product_uom_buckles" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BUCKLES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BKL</field>
</record>
<record id="product_uom_bou" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BOU</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BOU</field>
</record>
<record id="product_uom_box" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BOX</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BOX</field>
</record>
<record id="product_uom_bun" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BUNCHES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BUN</field>
</record>
<record id="product_uom_btl" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">BOTTLES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">BTL</field>
</record>
<record id="product_uom_cbm" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">CUBIC METER</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">CBM</field>
</record>
<record id="product_uom_cqm" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">CUBIC METERS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">CQM</field>
</record>
<record id="product_uom_ccm" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">CUBIC CENTIMETER</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">CCM</field>
</record>
<record id="product_uom_cin" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">CUBIC INCHES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">CIN</field>
</record>
<record id="product_uom_ctn" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">CARTON</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">CTN</field>
</record>
<record id="product_uom_drm" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">DRUM</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">DRM</field>
</record>
<record id="product_uom_ggr" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_vol"/>
<field name="name">GREAT GROSS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">GGR</field>
</record>
<record id="product_uom_grs" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_vol"/>
<field name="name">GROSS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">GRS</field>
</record>
<record id="product_uom_gyd" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">GROSS YARDS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">GYD</field>
</record>
<record id="product_uom_hks" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">HANKS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">HKS</field>
</record>
<record id="product_uom_lot" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">LOTS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">LOT</field>
</record>
<record id="product_uom_mgs" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">MILLI GRAMS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">MGS</field>
</record>
<record id="product_uom_mts" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">METRIC TON</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">MTS</field>
</record>
<record id="product_uom_nos" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">Numbers</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">NOS</field>
</record>
<record id="product_uom_odd" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">ODDS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">ODD</field>
</record>
<record id="product_uom_pac" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">PACKS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">PAC</field>
</record>
<record id="product_uom_pcs" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">Pieces</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">PCS</field>
</record>
<record id="product_uom_prs" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">PAIRS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">PRS</field>
</record>
<record id="product_uom_rol" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">ROLLS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">ROL</field>
</record>
<record id="product_uom_sdm" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_vol"/>
<field name="name">DECAMETER SQUARE</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SDM</field>
</record>
<record id="product_uom_set" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">SETS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SET</field>
</record>
<record id="product_uom_sht" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">SHEETS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SHT</field>
</record>
<record id="product_uom_sqi" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">SQUARE INCHES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SQI</field>
</record>
<record id="product_uom_sqf" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">SQUARE FEET</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SQF</field>
</record>
<record id="product_uom_sqm" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">SQUARE METER</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SQM</field>
</record>
<record id="product_uom_sqy" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">SQUARE YARDS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">SQY</field>
</record>
<record id="product_uom_tbs" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">TABLETS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">TBS</field>
</record>
<record id="product_uom_thd" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">THOUSANDS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">THD</field>
</record>
<record id="product_uom_tol" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">TOLA</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">TOL</field>
</record>
<record id="product_uom_ton" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">GREAT BRITAIN TON</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">TON</field>
</record>
<record id="product_uom_tub" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_kgm"/>
<field name="name">TUBES</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">TUB</field>
</record>
<record id="product_uom_vls" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_vol"/>
<field name="name">Vials</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">VLS</field>
</record>
<record id="product_uom_yds" model="product.uom">
<field name="category_id" ref="product.uom_categ_length"/>
<field name="name">YARDS</field>
<field name="factor" eval="1"/>
<field name="rounding" eval="0.01"/>
<field name="code">YDS</field>
</record>
<record id="product.product_uom_day" model="product.uom">
<field name="code">DAY</field>
</record>
<record id="product.product_uom_floz" model="product.uom">
<field name="code">FLOZ</field>
</record>
<record id="product.product_uom_hour" model="product.uom">
<field name="code">HOUR</field>
</record>
<record id="product.product_uom_mile" model="product.uom">
<field name="code">MILE</field>
</record>
<record id="product.product_uom_oz" model="product.uom">
<field name="code">OZ</field>
</record>
<record id="product.product_uom_ton" model="product.uom">
<field name="code">TON</field>
</record>
</data>
</flectra>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- Account.account -->
<record id="demo_p20011" model="account.account">
<field name="code">200111</field>
<field name="name">Demo Local Sales</field>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
</record>
<record id="demo_p2107" model="account.account">
<field name="name">Purchase Expense</field>
<field name="code">21071</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
</record>
</data>
</flectra>

View File

@ -0,0 +1,677 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- B2B SGST/CGST Invoices -->
<record id="demo_invoice_gst1" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-28')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-01')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_registered"/>
</record>
<record id="demo_invoice_gst1_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst1"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">40000.0</field>
<field name="quantity">2.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst1_line1')]"/>
<record id="demo_invoice_gst1_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst1"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">23500.0</field>
<field name="quantity">3.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst1_line2')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst1')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst1')]"/>
<record id="demo_invoice_gst2" model="account.invoice">
<field name="date_due"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-12')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-07')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_registered"/>
</record>
<record id="demo_invoice_gst2_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst2"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">4.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst2_line1')]"/>
<record id="demo_invoice_gst2_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst2"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">23500.0</field>
<field name="quantity">1.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst2_line2')]"/>
<record id="demo_invoice_gst2_line3" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst2"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">3.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst2_line3')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst2')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst2')]"/>
<!-- B2CS Invoices -->
<record id="demo_invoice_gst3" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-1')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-03')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_unregistered"/>
</record>
<record id="demo_invoice_gst3_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst3"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">40000.0</field>
<field name="quantity">1.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst3_line1')]"/>
<record id="demo_invoice_gst3_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst3"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">23500.0</field>
<field name="quantity">4.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst3_line2')]"/>
<record id="demo_invoice_gst3_line3" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst3"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">2.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst3_line3')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst3')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst3')]"/>
<!-- B2B IGST Invoices -->
<record id="demo_invoice_gst4" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-5')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-10')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_igst_registered"/>
</record>
<record id="demo_invoice_gst4_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst4"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">40000.0</field>
<field name="quantity">2.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst4_line1')]"/>
<record id="demo_invoice_gst4_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst4"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">5.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst4_line2')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst4')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst4')]"/>
<!-- B2CL IGST Invoices -->
<record id="demo_invoice_gst5" model="account.invoice">
<field name="date_due"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-25')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-12')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_igst_unregistered"/>
</record>
<record id="demo_invoice_gst5_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst5"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">8.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst5_line1')]"/>
<record id="demo_invoice_gst5_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst5"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">4.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst5_line2')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst5')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst5')]"/>
<!-- CDNUR Invoices -->
<record id="demo_invoice_gst_refund1" model="account.invoice.refund">
<field name="description">04-Correction in Invoice</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-16')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund1')], {'active_ids': [ref('demo_invoice_gst5')]}"
/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst5'))]]"/>
</function>
<!-- CDNR Invoices -->
<record id="demo_invoice_gst_refund2" model="account.invoice.refund">
<field name="description">03-Deficiency in services</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-26')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund2')], {'active_ids': [ref('demo_invoice_gst2')]}"/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst2'))]]"/>
</function>
<!-- B2CL Invoice for test cases -->
<record id="demo_invoice_gst8" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-15')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-13')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_igst_unregistered"/>
</record>
<record id="demo_invoice_gst8_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst8"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">8.0</field>
</record>
<record id="demo_invoice_gst8_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst8"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">6.0</field>
</record>
<!-- B2B Invoice for test cases -->
<record id="demo_invoice_gst9" model="account.invoice">
<field name="date_due" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-12')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-07')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_registered"/>
</record>
<record id="demo_invoice_gst9_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst9"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">1.0</field>
</record>
<record id="demo_invoice_gst9_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst9"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">23500.0</field>
<field name="quantity">2.0</field>
</record>
<record id="demo_invoice_gst9_line3" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst9"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">5.0</field>
</record>
<!-- B2CS Invoice for test cases -->
<record id="demo_invoice_gst10" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-21')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-11')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_unregistered"/>
</record>
<record id="demo_invoice_gst10_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst10"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">40000.0</field>
<field name="quantity">2.0</field>
</record>
<record id="demo_invoice_gst10_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst10"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">23500.0</field>
<field name="quantity">3.0</field>
</record>
<record id="demo_invoice_gst10_line3" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst10"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">2.0</field>
</record>
<!-- Composite company Invoice for test cases -->
<record id="demo_invoice_gst11" model="account.invoice">
<field name="date_due"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-12')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-13')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_registered"/>
</record>
<record id="demo_invoice_gst11_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst11"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">2.0</field>
</record>
<record id="demo_invoice_gst11_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst11"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">3.0</field>
</record>
<!-- B2CL IGST Invoices -->
<record id="demo_invoice_gst12" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-17')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-12')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_igst_unregistered"/>
</record>
<record id="demo_invoice_gst12_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst12"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">2870.0</field>
<field name="quantity">8.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst12_line1')]"/>
<record id="demo_invoice_gst12_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst5"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p20011"/>
<field name="price_unit">65000.0</field>
<field name="quantity">4.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst12_line2')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst12')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst12')]"/>
<!-- CDNUR Invoices -->
<record id="demo_invoice_gst_refund3" model="account.invoice.refund">
<field name="description">04-Correction in Invoice</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-16')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund3')], {'active_ids': [ref('demo_invoice_gst3')]}"
/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst3'))]]"/>
</function>
<!-- CDNR Invoices -->
<record id="demo_invoice_gst_refund4" model="account.invoice.refund">
<field name="description">03-Deficiency in services</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-26')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund4')], {'active_ids': [ref('demo_invoice_gst1')]}"/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst1'))]]"/>
</function>
<!--B2B Suppllier Invoices -->
<record id="demo_invoice_gst13" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-5')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">in_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-04')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_registered_supplier"/>
</record>
<record id="demo_invoice_gst13_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst13"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p2107"/>
<field name="price_unit">40000.0</field>
<field name="quantity">2.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst13_line1')]"/>
<record id="demo_invoice_gst13_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst13"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p2107"/>
<field name="price_unit">23500.0</field>
<field name="quantity">3.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst13_line2')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst13')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst13')]"/>
<!-- B2BUR Supplier Invoices -->
<record id="demo_invoice_gst14" model="account.invoice">
<field name="date_due"
eval="DateTime.today().strftime('%Y-%m-5')"/>
<field name="currency_id" ref="base.INR"/>
<field name="user_id" ref="base.user_root"/>
<field name="reference_type">none</field>
<field name="company_id" ref="base.main_company"/>
<field name="state">draft</field>
<field name="type">in_invoice</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-03')"/>
<field name="partner_id"
ref="l10n_in_gst.res_partner_gst_unregistered_supplier"/>
</record>
<record id="demo_invoice_gst14_line1" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst14"/>
<field name="name">Little server</field>
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="account_id" ref="demo_p2107"/>
<field name="price_unit">40000.0</field>
<field name="quantity">1.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst14_line1')]"/>
<record id="demo_invoice_gst14_line2" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst14"/>
<field name="name">Basic Computer</field>
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="account_id" ref="demo_p2107"/>
<field name="price_unit">23500.0</field>
<field name="quantity">4.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst14_line2')]"/>
<record id="demo_invoice_gst14_line3" model="account.invoice.line">
<field name="invoice_id" ref="demo_invoice_gst14"/>
<field name="name">Server</field>
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="account_id" ref="demo_p2107"/>
<field name="price_unit">65000.0</field>
<field name="quantity">2.0</field>
</record>
<function model="account.invoice.line" name="_onchange_product_id"
eval="[ref('demo_invoice_gst14_line3')]"/>
<function model="account.invoice" name="_onchange_invoice_line_ids"
eval="[ref('demo_invoice_gst14')]"/>
<function model="account.invoice" name="action_invoice_open"
eval="[ref('demo_invoice_gst14')]"/>
<!-- CDNR Supplier Invoices -->
<record id="demo_invoice_gst_refund5" model="account.invoice.refund">
<field name="description">04-Correction in Invoice</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-16')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund5')], {'active_ids': [ref('demo_invoice_gst13')]}"
/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst13'))]]"/>
</function>
<!-- CDNUR Supplier Invoices -->
<record id="demo_invoice_gst_refund6" model="account.invoice.refund">
<field name="description">03-Deficiency in services</field>
<field name="filter_refund">refund</field>
<field name="date_invoice"
eval="DateTime.today().strftime('%Y-%m-26')"/>
</record>
<function
model="account.invoice.refund" name="invoice_refund"
eval="[ref('demo_invoice_gst_refund6')], {'active_ids': [ref('demo_invoice_gst14')]}"/>
<function model="account.invoice" name="action_invoice_open">
<function model="account.invoice"
name="search"
eval="[[('refund_invoice_id', '=', ref('demo_invoice_gst14'))]]"/>
</function>
</data>
</flectra>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- Inherit product demo data and add customer and supplier taxes -->
<record id="product.consu_delivery_02" model="product.product">
<field name="l10n_in_hsn_code">8492</field>
<field name="taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_sale_12')])]"/>
<field name="supplier_taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_purchase_12')])]"/>
</record>
<record id="product.consu_delivery_03" model="product.product">
<field name="l10n_in_hsn_code">84713011</field>
<field name="taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_sale_18')])]"/>
<field name="supplier_taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_purchase_18')])]"/>
</record>
<record id="product.consu_delivery_01" model="product.product">
<field name="l10n_in_hsn_code">847132</field>
<field name="taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_sale_5')])]"/>
<field name="supplier_taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_purchase_5')])]" />
</record>
<record id="product.product_product_25" model="product.product">
<field name="l10n_in_hsn_code">84713011</field>
<field name="taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_sale_5')])]"/>
<field name="supplier_taxes_id" eval="[(6, 0, [ref('l10n_in.sgst_purchase_5')])]"/>
</record>
</data>
</flectra>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="0">
<!-- Company B2C limit lines' demo data -->
<record id="demo_company_b2c_limit1" model="res.company.b2c.limit">
<field name="company_id" ref="base.main_company"/>
<field name="date_from" eval="(DateTime.today() - relativedelta(years=1)).strftime('%Y-01-01')"/>
<field name="date_to" eval="time.strftime('%Y')+'-12-31'"/>
</record>
</data>
</flectra>

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="1">
<!-- Inherit partner demo data and update GST related details -->
<record id="base.main_partner" model="res.partner">
<field name="gst_type">regular</field>
<field name="vat">24ABCDE1234F2Z5</field>
<field name="country_id" ref="base.in"/>
<field name="state_id" ref="base.state_in_gj"/>
</record>
<!-- Demo SGST/CGST Registered Customer -->
<record id="res_partner_gst_registered" model="res.partner">
<field name="name">Demo SGST/CGST Registered Customer</field>
<field eval="[(6, 0, [ref('base.res_partner_category_15')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="city">Ahmedabad</field>
<field name="zip">380009</field>
<field name="state_id" ref="base.state_in_gj"/>
<field name="country_id" ref="base.in"/>
<field name="street">22 Globe Street</field>
<field name="vat">24ANMPD7592B1Z2</field>
<field name="gst_type">regular</field>
<field name="email">sgst_cgst@yourcompany.example.com</field>
<field name="phone">+91 99111 2223</field>
<field name="website">http://www.sgstcgst.com</field>
</record>
<!-- Demo SGST/CGST Unregistered Customer -->
<record id="res_partner_gst_unregistered" model="res.partner">
<field name="name">Demo SGST/CGST Unregistered Customer</field>
<field eval="[(6, 0, [ref('base.res_partner_category_15')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="city">Vadodara</field>
<field name="zip">391510</field>
<field name="state_id" ref="base.state_in_gj"/>
<field name="country_id" ref="base.in"/>
<field name="street">Ajwa</field>
<field name="gst_type">unregistered</field>
<field name="email">sgst_cgst_ur@yourcompany.example.com</field>
<field name="phone">+91 75123 75123</field>
<field name="website">http://www.sgstcgstur.com</field>
</record>
<!-- Demo IGST Registered Customer -->
<record id="res_partner_igst_registered" model="res.partner">
<field name="name">Demo IGST Registered Customer</field>
<field eval="[(6, 0, [ref('base.res_partner_category_14')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="city">Delhi</field>
<field name="zip">110018</field>
<field name="state_id" ref="base.state_in_dl"/>
<field name="country_id" ref="base.in"/>
<field name="street">15 Ashok Nagar</field>
<field name="vat">07GEOPS0823B2ZH</field>
<field name="gst_type">regular</field>
<field name="email">igst@yourcompany.example.com</field>
<field name="phone">+91 99222 5553</field>
<field name="website">http://www.igst.com</field>
<field name="property_account_position_id"
ref="l10n_in.fiscal_position_in_inter_state"/>
</record>
<!-- Demo IGST Unregistered Customer -->
<record id="res_partner_igst_unregistered" model="res.partner">
<field name="name">Demo IGST Unregistered Customer</field>
<field eval="[(6, 0, [ref('base.res_partner_category_16')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="city">Darrang</field>
<field name="zip">784527</field>
<field name="state_id" ref="base.state_in_as"/>
<field name="country_id" ref="base.in"/>
<field name="street">16 Natrani Avenue</field>
<field name="gst_type">unregistered</field>
<field name="email">igstur@yourcompany.example.com</field>
<field name="phone">+91 95951 95951</field>
<field name="website">http://www.igstur.com</field>
<field name="property_account_position_id"
ref="l10n_in.fiscal_position_in_inter_state"/>
</record>
<!-- Demo 2B Registered Supplier -->
<record id="res_partner_gst_registered_supplier" model="res.partner">
<field name="name">Demo B2B Registered Supplier</field>
<field eval="[(6, 0, [ref('base.res_partner_category_15')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="supplier">1</field>
<field name="city">Ahmedabad</field>
<field name="zip">380009</field>
<field name="state_id" ref="base.state_in_gj"/>
<field name="country_id" ref="base.in"/>
<field name="street">22 Globe Street</field>
<field name="vat">24ANMPDFGH55678</field>
<field name="gst_type">regular</field>
<field name="email">b2b_supplier@yourcompany.example.com</field>
<field name="phone">+91 99111 5454</field>
<field name="website">http://www.b2bsupplier.com</field>
</record>
<!-- Demo B2BUR Unregistered Supplier -->
<record id="res_partner_gst_unregistered_supplier" model="res.partner">
<field name="name">Demo B2BUR Unregistered Supplier</field>
<field eval="[(6, 0, [ref('base.res_partner_category_15')])]"
name="category_id"/>
<field name="is_company">1</field>
<field name="supplier">1</field>
<field name="city">Vadodara</field>
<field name="zip">391510</field>
<field name="state_id" ref="base.state_in_gj"/>
<field name="country_id" ref="base.in"/>
<field name="street">gotri</field>
<field name="gst_type">unregistered</field>
<field name="email">b2b_ur_supplier@yourcompany.example.com</field>
<field name="phone">+91 75123 77777</field>
<field name="website">http://www.b2bur.com</field>
</record>
</data>
</flectra>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import res_config_settings
from . import account_invoice
from . import note_issue_reason
from . import product_uom
from . import res_company
from . import res_partner

View File

@ -0,0 +1,123 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models, _
from flectra.exceptions import ValidationError
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
gst_invoice = fields.Selection(
[('b2b', 'B2B'), ('b2cl', 'B2CL'), ('b2cs', 'B2CS'),
('b2bur', 'B2BUR')], string='GST Invoice',
help='B2B Supplies: Taxable supplies made to other registered '
'taxpayers.\n\nB2C Large [For outward supplies]: Taxable '
'outward '
'supplies to consumers where\na)The place of supply is '
'outside the state where the supplier is registered and '
'b)The '
'total invoice value is more than the limit defined in '
'company B2C lines.\ne.g., If in B2C line, B2CL limit is '
'set to Rs 2,50,000 and invoice is of amount Rs 3,00,000 then'
'invoice '
'will be considered as of type B2CL.\n\nB2C Small '
'[For outward supplies]: Supplies made to consumers and '
'unregistered persons of the following nature\n'
'a) Intra-State: any value b) Inter-State: Total invoice '
'value is'
' less than the limit defined in company B2C lines.\n'
'e.g., If in B2C line, B2CS limit is set to Rs 2,50,000 '
'(for period 01-01-2017 to 31-12-2017) for inter state '
'supply '
'and invoice value is Rs 2,00,000 then invoice will be '
'considered as of type B2CS.\n\nB2BUR [For inward supplies]: '
'Inward supplies received from an unregistered supplier \n\n',
copy=False)
e_commerce_partner_id = fields.Many2one('res.partner',
string='E-Commerce Partner')
vat = fields.Char(string='GSTIN',
help='Goods and Services Taxpayer Identification '
'Number', size=15, copy=False)
gst_type = fields.Selection(
[('regular', 'Regular'), ('unregistered', 'Unregistered'),
('composite', 'Composite'), ('volunteer', 'Volunteer')],
string='GST Type', copy=False)
partner_location = fields.Selection(
[('inter_state', 'Inter State'), ('intra_state', 'intra State'),
('inter_country', 'Inter Country')],
related='partner_id.partner_location', string="Partner Location")
@api.onchange('partner_id', 'company_id')
def _onchange_partner_id(self):
super(AccountInvoice, self)._onchange_partner_id()
if self.partner_id and not self.partner_id.partner_location:
self.partner_id.partner_location = \
self.partner_id._get_partner_location_details(self.company_id)
@api.onchange('fiscal_position_id')
def _onchange_fiscal_position_id(self):
""" Onchange of Fiscal Position update tax values in invoice lines. """
for line in self.invoice_line_ids:
line._onchange_product_id()
@api.multi
def action_move_create(self):
""" Do not apply taxes if company has been registered under
composition scheme. """
for invoice in self:
if invoice.type in ('out_invoice',
'out_refund') and \
invoice.company_id.gst_type == 'composite':
for line in invoice.invoice_line_ids:
line.invoice_line_tax_ids = [(6, 0, [])]
line.invoice_id._onchange_invoice_line_ids()
return super(AccountInvoice, self).action_move_create()
@api.multi
def invoice_validate(self):
""" Apply GST invoice type at the time of invoice validation. """
for invoice in self:
partner_location = self.partner_id.partner_location
if invoice.partner_id.vat:
invoice.write({
'vat': invoice.partner_id.vat,
'gst_type': invoice.partner_id.gst_type,
'gst_invoice': 'b2b'
})
elif invoice.type == 'out_invoice' and partner_location:
b2c_limit = self.env['res.company.b2c.limit'].search(
[('date_from', '<=', invoice.date_invoice),
('date_to', '>=', invoice.date_invoice),
('company_id', '=', invoice.company_id.id)])
if not b2c_limit:
raise ValidationError(_('Please define B2C limit line in '
'company for current period!'))
if partner_location == 'inter_state' and \
invoice.amount_total > b2c_limit.b2cl_limit:
invoice.write({'gst_invoice': 'b2cl'})
if partner_location == 'intra_state' or partner_location == \
'inter_state' and invoice.amount_total < \
b2c_limit.b2cs_limit:
invoice.write({'gst_invoice': 'b2cs'})
elif invoice.type == 'in_invoice' and partner_location and \
partner_location != 'inter_country':
invoice.write({'gst_invoice': 'b2bur'})
return super(AccountInvoice, self).invoice_validate()
@api.model
def _prepare_refund(self, invoice, date_invoice=None, date=None,
description=None, journal_id=None):
""" Refund invoice creation, update value of GST Invoice from
base invoice. """
result = super(AccountInvoice, self)._prepare_refund(
invoice, date_invoice=date_invoice, date=date,
description=description, journal_id=journal_id)
if result.get('refund_invoice_id'):
invoice = self.env['account.invoice'].browse(
result.get('refund_invoice_id'))
result.update({
'gst_invoice': invoice.gst_invoice, 'vat': invoice.vat,
'gst_type': invoice.gst_type,
})
return result

View File

@ -0,0 +1,23 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
""" Introduce following new models for GST related customization:
* Note Issue Reasons
"""
from flectra import api, fields, models
class NoteIssueReason(models.Model):
_name = 'note.issue.reason'
name = fields.Char(string='Name', required=True)
code = fields.Char(string='Code', required=True)
@api.multi
def name_get(self):
""" It will display field data in proper format as specified in this
method """
result = []
for record in self:
result.append((record.id, '%s-%s' % (record.code, record.name)))
return result

View File

@ -0,0 +1,9 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra import fields, models
class ProductUomCode(models.Model):
_inherit = 'product.uom'
code = fields.Char(string='Code')

View File

@ -0,0 +1,106 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
import time
from flectra import api, fields, models, _
from flectra.exceptions import ValidationError
class Company(models.Model):
_inherit = 'res.company'
vat = fields.Char(string='GSTIN', related='partner_id.vat')
gst_type = fields.Selection([('regular', 'Regular'),
('unregistered', 'Unregistered'),
('composite', 'Composite'),
('volunteer', 'Volunteer')],
string='GST Type',
related='partner_id.gst_type')
gst_introduce_date = fields.Date(string='GST Introduce Date',
default=time.strftime('2017-07-01'))
company_b2c_limit_line = fields.One2many('res.company.b2c.limit',
'company_id', string='B2C Limit')
def onchange_state(self, gst_type, vat, state):
result = {'vat': '', 'country_id': False}
if gst_type == 'unregistered' and vat:
result['vat'] = False
if gst_type != 'unregistered':
result['vat'] = state.l10n_in_tin
result['country_id'] = state.country_id and \
state.country_id.id or False
return result
@api.multi
@api.constrains('vat', 'state_id')
def _check_gstin_format(self):
""" Validations for GSTIN number format and length """
for res in self:
if res.state_id and res.vat and res.state_id.l10n_in_tin != \
res.vat[:2]:
raise ValidationError(_('Invalid State Code!'))
if res.vat and len(res.vat) != 15 and res.gst_type != \
'unregistered':
raise ValidationError(_('GSTIN length must be of 15 '
'characters!'))
@api.onchange('state_id', 'country_id')
def _onchange_state_id(self):
""" Set state code as a initial characters of GSTIN """
result = self.onchange_state(self.gst_type, self.vat, self.state_id)
self.vat = result['vat']
self.country_id = result['country_id']
@api.onchange('gst_type')
def onchange_gst_type(self):
""" If gst type is unregistered then GSTIN Number should be blank"""
if self.gst_type == 'unregistered':
self.vat = False
@api.model
def create(self, vals):
result = super(Company, self).create(vals)
result.partner_id.gst_company_partner = True
if vals.get('state_id', False):
result.partner_id.state_id = vals['state_id']
if vals.get('country_id', False):
result.partner_id.country_id = vals['country_id']
return result
class CompanyB2CLimit(models.Model):
_name = 'res.company.b2c.limit'
date_from = fields.Date(string='From')
date_to = fields.Date(string='To')
b2cl_limit = fields.Float(string='B2CL Limit', default=250000.0,
help='Inter state minimum limit for B2CL type '
'transactions.')
b2cs_limit = fields.Float(string='B2CS Limit', default=250000.0,
help='Inter state maximum limit for B2CS type '
'transactions.')
company_id = fields.Many2one('res.company', string='Company')
@api.constrains('date_to', 'date_from', 'company_id')
def _check_sheet_date(self):
for line in self:
self.env.cr.execute('''
SELECT id
FROM res_company_b2c_limit
WHERE (date_from <= %s and %s <= date_to)
AND company_id=%s
AND id <> %s''',
(line.date_to, line.date_from,
line.company_id.id, line.id))
if any(self.env.cr.fetchall()):
raise ValidationError(_(
'You cannot have 2 limit lines of same period that '
'overlap for %s!') % (line.company_id and
line.company_id.name))
@api.constrains('date_from', 'date_to')
def _check_dates(self):
if any(self.filtered(lambda line: line.date_from and line.
date_to and line.date_from > line.date_to)):
raise ValidationError(_(
'From date must be lower than to date.'))

View File

@ -0,0 +1,72 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
country_id = fields.Many2one('res.country', string='Country',
compute='_get_gst_details',
inverse='_set_gst_details')
state_id = fields.Many2one('res.country.state', string='State',
domain="[('country_id', '=', country_id)]",
compute='_get_gst_details',
inverse='_set_gst_details')
gstin_number = fields.Char(string='GSTIN', size=15,
compute='_get_gst_details',
inverse='_set_gst_details')
gst_type = fields.Selection([('regular', 'Regular'),
('unregistered', 'Unregistered'),
('composite', 'Composite'),
('volunteer', 'Volunteer')],
string='GST Type',
compute='_get_gst_details',
inverse='_set_gst_details')
gst_applied = fields.Boolean(string='GST Applied')
@api.multi
@api.depends('company_id', 'gst_applied')
def _get_gst_details(self):
""" Get GST configuration details from company """
self.ensure_one()
self.country_id = self.company_id.country_id.id
self.state_id = self.company_id.state_id.id
self.gstin_number = self.company_id.vat
self.gst_type = self.company_id.gst_type
@api.multi
def _set_gst_details(self):
""" Set GST configuration details in a company """
self.ensure_one()
if self.gst_type:
partner = self.company_id.partner_id
partner.write({
'country_id': self.country_id.id,
'state_id': self.state_id.id,
'vat': self.gstin_number,
'gst_company_partner': True,
})
self.company_id.gst_type = self.gst_type
@api.onchange('company_id')
def onchange_company_id(self):
self.gst_applied = False
if self.company_id and self.company_id.gst_type:
self.gst_applied = True
@api.onchange('gstin_number', 'country_id')
def get_state(self):
""" Get state value automatically from GSTIN and country """
if self.gstin_number and self.country_id:
state_code = self.gstin_number[:2]
state_id = self.env['res.country.state'].search([
('l10n_in_tin', '=', state_code),
('country_id', '=', self.country_id.id)])
self.state_id = state_id
@api.onchange('gst_type')
def onchange_gst_type(self):
""" If gst type is unregistered then GSTIN Number should be blank"""
if self.gst_type == 'unregistered':
self.gstin_number = False

View File

@ -0,0 +1,72 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models
from flectra.exceptions import ValidationError
class Partner(models.Model):
""" Inherit Partner """
_inherit = 'res.partner'
gst_company_partner = fields.Boolean(string='Is company partner?')
gst_type = fields.Selection([('regular', 'Regular'),
('unregistered', 'Unregistered'),
('composite', 'Composite'),
('volunteer', 'Volunteer')],
string='GST Type')
e_commerce = fields.Boolean(string='E-Commerce')
partner_location = fields.Selection([('inter_state', 'Inter State'),
('intra_state', 'intra State'),
('inter_country', 'Inter Country')
], "Partner Location")
@api.multi
@api.constrains('vat', 'state_id')
def _check_gstin_format(self):
for res in self:
if res.state_id and res.vat and res.state_id.l10n_in_tin != \
res.vat[:2]:
raise ValidationError(_('Invalid State Code!'))
if res.vat and len(res.vat) != 15 and res.gst_type != \
'unregistered':
raise ValidationError(_('GSTIN length must be of 15 '
'characters!'))
def _get_partner_location_details(self, company):
partner_location = False
if self.country_id and company.country_id:
partner_location = 'inter_country'
if self.country_id.id == company.country_id.id:
partner_location = 'inter_state'
if self.state_id and company.state_id and self.state_id.id == \
company.state_id.id:
partner_location = 'intra_state'
return partner_location
@api.onchange('state_id', 'property_account_position_id', 'country_id')
def _onchange_state_id(self):
""" Set state code as a initial characters of GSTIN """
result = self.company_id.onchange_state(self.gst_type, self.vat,
self.state_id)
self.vat = result['vat']
self.country_id = result['country_id']
self.partner_location = self._get_partner_location_details(
self.company_id)
if self.state_id == self.env.user.company_id.state_id and \
self.property_account_position_id:
self.property_account_position_id = False
return {
'warning': {
'title': 'Warning',
'message': 'Fiscal Position not needed for '
'same state Customers!'
}
}
@api.onchange('gst_type')
def onchange_gst_type(self):
"""
If gst type is unregistered then GSTIN Number should be blank
"""
if self.gst_type == 'unregistered':
self.vat = False

View File

@ -0,0 +1,3 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import gst_report

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_note_issue_reason_all,access_note_issue_reason_all,model_note_issue_reason,account.group_account_manager,1,1,1,1
access_note_issue_reason,access_note_issue_reason,model_note_issue_reason,,1,0,0,0
access_res_company_b2c_limit_all,access_res_company_b2c_limit_all,model_res_company_b2c_limit,base.group_system,1,1,1,1
access_res_company_b2c_limit,access_res_company_b2c_limit,model_res_company_b2c_limit,,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_note_issue_reason_all access_note_issue_reason_all model_note_issue_reason account.group_account_manager 1 1 1 1
3 access_note_issue_reason access_note_issue_reason model_note_issue_reason 1 0 0 0
4 access_res_company_b2c_limit_all access_res_company_b2c_limit_all model_res_company_b2c_limit base.group_system 1 1 1 1
5 access_res_company_b2c_limit access_res_company_b2c_limit model_res_company_b2c_limit 1 0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -0,0 +1,92 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h1 class="oe_slogan"
style="color: #875A7B;text-decoration: underline;text-align: center;">
Goods and Services Tax Management for India</h1>
</div>
<p class="oe_mt8 text-justify">GST module for Flectra enables Indian Organization to use Flectra Accounting in
accordance to GST taxation structure. Providing necessary reporting data for
GSTR-1 filing, Tax Credit etc.</p>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Accounting settings for GST</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot"
src="company_gst_config.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Partner configurations for GST</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot"
src="partner_form.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Successfully manage
your invoices according to their classification in GST</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot"
src="invoice_list_groupby.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">Invoice form with improvements related to
GST details</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="invoice_form.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">GSTR-1 Monthly Summary</h3>
<div class="oe_span6">
<p class="oe_mt8 text-justify">
View month, year and company wise GSTR-1 return summary.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot"
src="gstr1_summary_view1.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">GSTR-1 Summary Details</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot"
src="gstr1_summary_view2.png">
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h3 class="oe_slogan">GSTR-1 Excel Export</h3>
<div class="oe_span6">
<p class="oe_mt8 text-justify">
GSTR-1 excel sheet export feature, this auto generated file
can be imported at GST Offline Utility software without any
modifications.
</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="excel_sheet.png">
</div>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -0,0 +1,389 @@
flectra.define('l10n_in_gst.gstr1', function (require) {
"use strict";
var core = require('web.core');
var Widget = require('web.Widget');
// var Model = require('web.Model');
var rpc = require('web.rpc');
var session = require('web.session');
var ControlPanelMixin = require('web.ControlPanelMixin');
var crash_manager = require('web.crash_manager');
var framework = require('web.framework');
var QWeb = core.qweb;
var GSTRport = Widget.extend(ControlPanelMixin, {
template: 'GSTReportDashboard',
events: {
"click [data-action]": "open_summary_data",
"click [action]": "trigger_action",
"click .show_subline": "show_subline"
},
init: function (parent, action) {
this.actionManager = parent;
this.model = action.context.model; // get default model from context
this.summary_type = action.context.summary_type
this.pager_context = {
rec_limit: 10,
rec_start: 1,
rec_end: 10,
rec_length: null,
rec_range: null,
total_page: null,
};
this.months = {
1: "January", 2: "February", 3: "March", 4: "April", 5: "May", 6: "June",
7: "July", 8: "August", 9: "September", 10: "October", 11: "November", 12: "December"
};
this.gst_report_context = {
'from_date': null,
'to_date': null,
'company_id': session.company_id,
'year': null,
'month': null,
'template': 'ViewSummary',
'data_action_method': 'get_gstr_summary',
'summary_type': this.summary_type
};
this.update_date();
return this._super.apply(this, arguments);
},
start: function () {
var self = this;
var temp = self._rpc({
model: this.model,
method: this.gst_report_context.data_action_method,
args: [[], this.gst_report_context, 1],
}).then(function (data) {
return data;
});
return $.when(temp, this._super.apply(this, arguments)).then(function (data) {
self.$el.html(QWeb.render(self.gst_report_context.template, {data: data['summary']}));
self.$button_html = $(QWeb.render('GSTButton', {}));
self.$pager_html = $(QWeb.render('GSTPager', {}));
self.$search_view_html = $(QWeb.render('GSTFilter', {
companies: data['companies'],
months: self.months,
curr_com_id: session.company_id,
curr_month: new Date().getMonth() + 1,
curr_year: new Date().getFullYear()
}));
self.update_cp();
self.render_control_panel();
});
},
// Update from_date and to_date when change made in month filter
update_date: function () {
var dt;
if (this.gst_report_context.from_date) {
dt = new Date(this.gst_report_context.year + " " + this.gst_report_context.month + " 01");
} else {
dt = new Date();
}
var month = dt.getMonth() + 1,
year = dt.getFullYear();
new Date(year, month, 0).getDate();
this.gst_report_context.year = year;
this.gst_report_context.month = month;
this.gst_report_context.from_date = year + '-' + month + '-01';
this.gst_report_context.to_date = year + '-' + month + '-' + new Date(year, month, 0).getDate();
},
// Update control panel Mixin when go back in GST report
do_show: function () {
this._super.apply(this, arguments);
this.update_cp();
},
// override method for change control panel mixin
update_cp: function () {
var status = {
breadcrumbs: this.actionManager.get_breadcrumbs(),
cp_content: {
$buttons: this.$button_html,
$searchview_buttons: this.$search_view_html,
$pager: this.$pager_html,
$searchview: this.$searchview
}
};
return this.update_control_panel(status, {clear: true});
},
// update el according user select report type
update_report_data: function () {
var self = this;
if (this.gst_report_context.template == 'ViewSummary') {
self._rpc({
model: this.model,
method: this.gst_report_context.data_action_method,
args: [[], this.gst_report_context],
}).then(function (data) {
self.$el.html(QWeb.render(self.gst_report_context.template, {data: data}));
});
} else {
self._rpc({
model: this.model,
method: this.gst_report_context.data_action_method,
args: [[], this.gst_report_context, this.pager_context.rec_start, this.pager_context.rec_end],
}).then(function (data) {
self.$el.html(QWeb.render(self.gst_report_context.template, {data: data['data'], 'summary_type':
self.gst_report_context.summary_type
}));
$("#pager").removeClass('hidden');
self.pager_context.rec_length = data['length'];
if (self.pager_context.rec_limit > self.pager_context.rec_length) {
self.pager_context.rec_limit = self.pager_context.rec_length;
}
if (data['length'] > 0) {
self.pager_context.total_page = Math.ceil(data['length'] / self.pager_context.rec_limit);
self.pager_context.rec_end = Math.min(self.pager_context.rec_end, self.pager_context.rec_length);
self.pager_context.offset = (self.pager_context.total_page * self.pager_context.rec_limit) - self.pager_context.rec_length;
if (self.pager_context.rec_start === self.pager_context.rec_end && self.pager_context.rec_limit === 1) {
self.pager_context.rec_range = self.pager_context.rec_start.toString();
} else if (self.pager_context.rec_start === self.pager_context.rec_end && self.pager_context.rec_limit > 1) {
self.pager_context.rec_range = self.pager_context.rec_start.toString() + '-' + self.pager_context.rec_end.toString();
} else {
self.pager_context.rec_range = self.pager_context.rec_start.toString() + '-' + self.pager_context.rec_end.toString();
}
$("#pager .o_pager_value").html(self.pager_context.rec_range);
$("#pager .o_pager_limit").html(self.pager_context.rec_length);
if (self.pager_context.total_page > 1) {
self.$pager_html.find(".o_pager_next").prop('disabled', false);
self.$pager_html.find(".o_pager_previous").prop('disabled', false);
} else {
self.$pager_html.find(".o_pager_next").prop('disabled', true);
self.$pager_html.find(".o_pager_previous").prop('disabled', true);
}
} else {
$("#pager").addClass('hidden');
}
});
}
},
// function of control panel mixin
render_control_panel: function () {
var self = this;
// view summary function
this.$button_html.find('#view_summary_back').click(function (e) {
var view_summary_back_btn = $(this);
self._rpc({
model: 'gst.report',
method: 'get_gstr_summary',
args: [[], self.gst_report_context],
}).then(function (data) {
self.$el.html(QWeb.render('ViewSummary', {data: data}));
self.gst_report_context.template = 'ViewSummary';
self.gst_report_context.data_action_method = 'get_gstr_summary';
view_summary_back_btn.addClass('hidden');
$("#pager").addClass('hidden');
$("#export_excel").removeClass('hidden');
});
});
// month filter
this.$search_view_html.find('#filter_month li a').click(function (e) {
if (self.gst_report_context.month != $(this).attr('data-value')) {
$('#filter_month li').removeClass('active');
$('#filter_month li a span i').removeClass('fa fa-check pull-right');
$(this).find('i').addClass('fa fa-check pull-right');
$(this).parent().addClass('active');
$(this).parent().parent().prev().html($(this).attr('data-string') + ' <span class="caret"></span>');
self.gst_report_context.month = $(this).attr('data-value');
self.update_date();
self._clear_context();
self.update_report_data();
}
});
// res_company filter
this.$search_view_html.find('#res_company li a').click(function (e) {
if (self.gst_report_context.company_id != parseInt($(this).attr('data-id'))) {
$('#res_company li').removeClass('active');
$('#res_company li a span i').removeClass('fa fa-check pull-right');
$(this).find('i').addClass('fa fa-check pull-right');
$(this).parent().addClass('active');
$(this).parent().parent().prev().html($(this).attr('data-string') + ' <span class="caret"></span>');
self.gst_report_context.company_id = parseInt($(this).attr('data-id'));
self.update_date();
self._clear_context();
self.update_report_data();
}
});
// year filter
this.$search_view_html.find('#filter_year').change(function (e) {
if (self.gst_report_context.year != $(this).val()) {
self.gst_report_context.year = $(this).val();
self.update_date();
self._clear_context();
self.update_report_data();
}
});
// export excel report
this.$button_html.find('#export_excel').click(function (e) {
var c = crash_manager;
session.get_file({
url: '/l10n_in_gst/export_excel',
data: self.gst_report_context,
complete: framework.unblockUI,
error: c.rpc_error.bind(c)
});
});
this.$pager_html.find('.o_pager_value').click(function (e) {
var inner_self = this;
var o_pager_value = $(this).html();
var $input = $('<input>', {type: 'text', value: o_pager_value});
$(this).html($input);
$input.focus();
// Event handlers
$input.click(function (ev) {
ev.stopPropagation(); // ignore clicks on the input
});
$input.blur(function (ev) {
//$(inner_self).html($(this).val());
self._save($(ev.target), $(inner_self)); // save the state when leaving the input
});
$input.on('keydown', function (ev) {
ev.stopPropagation();
if (ev.which === $.ui.keyCode.ENTER) {
self._save($(ev.target), $(inner_self)); // save on enter
} else if (ev.which === $.ui.keyCode.ESCAPE) {
$(inner_self).html(o_pager_value); // leave on escape
}
});
});
this.$pager_html.find('[accesskey]').click(function (e) {
var access_key = $(this).attr('accesskey');
if (access_key == "n") {
self.pager_context.rec_start = self.pager_context.rec_end + 1;
self.pager_context.rec_end = Math.min((self.pager_context.rec_end + self.pager_context.rec_limit), self.pager_context.rec_length);
if (self.pager_context.rec_end < self.pager_context.rec_start) {
self.pager_context.rec_start = 1;
self.pager_context.rec_end = self.pager_context.rec_limit;
}
} else if (access_key == "p") {
self.pager_context.rec_start -= self.pager_context.rec_limit;
self.pager_context.rec_end = Math.max((self.pager_context.rec_start + self.pager_context.rec_limit - 1), 1);
if ((self.pager_context.rec_end == self.pager_context.rec_length) && (self.pager_context.rec_length < (self.pager_context.total_page * self.pager_context.rec_limit))) {
self.pager_context.rec_start = ((self.pager_context.total_page - 2) * self.pager_context.rec_limit) + 1;
self.pager_context.rec_end = self.pager_context.rec_start + self.pager_context.rec_limit;
} else if (self.pager_context.rec_start <= 0) {
self.pager_context.rec_start = ((self.pager_context.total_page - 1) * self.pager_context.rec_limit) + 1;
self.pager_context.rec_end = self.pager_context.rec_length;
}
}
if (self.pager_context.rec_start === self.pager_context.rec_end) {
self.pager_context.rec_range = self.pager_context.rec_start.toString();
} else {
self.pager_context.rec_range = self.pager_context.rec_start.toString() + '-' + self.pager_context.rec_end.toString();
}
self.update_report_data();
});
},
// render more details about report
open_summary_data: function (e) {
var data_action = $(e.target).attr('data-action');
this._clear_context();
this.gst_report_context.template = data_action.split('_data_')[1].toUpperCase() + 'ViewSummary';
this.gst_report_context.data_action_method = data_action;
$("#view_summary_back").removeClass('hidden');
$("#export_excel").addClass('hidden');
this.update_report_data();
},
// open invoice form
trigger_action: function (e) {
var self = this;
var action = $(e.target).attr('action');
var data_id = $(e.target).attr('data-id');
var data_object = $(e.target).attr('data-object');
if (action) {
return self._rpc({
model: this.model,
method: action,
args: ['', {
id: data_id,
object: data_object
}],
}).then(function (result) {
return self.do_action(result);
});
}
},
// display sub line
show_subline: function (e) {
var tr = $(e.target).parent().parent().next('tr.data_subline');
if (tr.attr('class').indexOf('hidden') === -1) {
tr.addClass('hidden');
} else {
tr.removeClass('hidden');
}
},
// clear page context
_clear_context: function () {
this.pager_context = {
rec_limit: 10,
rec_start: 1,
rec_end: 10,
rec_length: null,
rec_range: null,
total_page: null,
offset: null
};
},
// re-render after made change in pagination filter
_save: function ($input, $o_pager_value) {
var value = $input.val().split("-");
var start = parseInt(value[0]);
var end = parseInt(value[1]);
var pager_context = _.clone(this.pager_context);
if (!isNaN(start)) {
if ((start <= this.pager_context.rec_length) && (start > 0)) {
if (value.length === 1) {
this.pager_context.rec_end = this.pager_context.rec_start = start;
this.pager_context.rec_limit = 1;
} else {
this.pager_context.rec_start = start;
}
} else {
$o_pager_value.html(this.pager_context.rec_range);
return false;
}
if (!isNaN(end)) {
if ((end <= this.pager_context.rec_length) && (end > 0) && (end >= this.pager_context.rec_start)) {
this.pager_context.rec_end = end;
this.pager_context.rec_limit = (this.pager_context.rec_end - this.pager_context.rec_start) + 1;
} else {
$o_pager_value.html(this.pager_context.rec_range);
return false;
}
}
if (this.pager_context.rec_start > this.pager_context.rec_end) {
this.pager_context = pager_context;
} else {
if (this.pager_context.rec_start === this.pager_context.rec_end) {
this.pager_context.rec_range = this.pager_context.rec_start.toString();
} else {
this.pager_context.rec_range = this.pager_context.rec_start.toString() + '-' + this.pager_context.rec_end.toString();
}
this.update_report_data();
}
} else {
$o_pager_value.html(this.pager_context.rec_range);
return false;
}
}
});
core.action_registry.add('l10n_in_gst.gstr1', GSTRport);
return {
GSTRport: GSTRport
};
});

View File

@ -0,0 +1,36 @@
.table-border-gst {
border-spacing: 2px;
border-collapse: inherit;
}
.table-header-color-gst {
background-color: #027ec7;
color: white;
}
.sub-table-header-color-gst {
background-color: #989896;
color: white;
}
.td-border {
.table {
>tbody {
>tr {
>td {
border: 1px solid #ddd !important;
}
}
}
}
}
.container-fluid {
.container-blank {
background-color: #fff;
}
}
.data_action_flectra_color {
>a {
color: #006eaf !important;
&:hover {
color: #009efb !important;
}
}
}

View File

@ -0,0 +1,974 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="GSTReportDashboard">
<div class="container-fluid"/>
</t>
<t t-name="GSTButton">
<div class="btn-group o_dropdown">
<button class="btn btn-primary" id="export_excel" type="button">Export XLS</button>
</div>
<div class="btn-group o_dropdown">
<button class="btn btn-primary hidden form-control" type="button" id="view_summary_back">View Summary</button>
</div>
</t>
<t t-name="GSTPager">
<div id="pager" class="hidden">
<span class="o_pager_value">1-8</span> / <span class="o_pager_limit">8</span>
<span class="btn-group btn-group-sm">
<button class="fa fa-chevron-left btn btn-icon o_pager_previous" type="button" accesskey="p" ></button>
<button class="fa fa-chevron-right btn btn-icon o_pager_next" type="button" accesskey="n" ></button>
</span>
</div>
</t>
<t t-name="GSTFilter">
<div>
<div class="btn-group o_dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><t t-esc="companies[curr_com_id]"/>
<span class="caret"></span></button>
<ul class="dropdown-menu" id="res_company">
<t t-foreach="companies" t-as="com">
<li t-att-class="curr_com_id == com ? 'active' : None"><a href="javascript:void(0);" t-att-data-id="com" t-att-data-string="companies[com]"><span><i t-att-class="curr_com_id == com ? 'fa fa-check pull-right' : None"/><t t-esc="companies[com]"/></span></a></li>
</t>
</ul>
</div>
<div class="btn-group o_dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><t t-esc="months[curr_month]"/>
<span class="caret"></span></button>
<ul class="dropdown-menu" id="filter_month">
<t t-foreach="months" t-as="i">
<li t-att-class="curr_month == i ? 'active' : None"><a href="javascript:void(0);" t-att-data-value="i" t-att-data-string="months[i]"><span><i t-att-class="curr_month == i ? 'fa fa-check pull-right' : None"/><t t-esc="months[i]"/></span></a></li>
</t>
</ul>
</div>
<div class="btn-group o_dropdown">
<input type="number" t-att-value="curr_year" min="0" step="1" class="form-control" id="filter_year"/>
</div>
<!--<div class="btn-group o_dropdown">-->
<!---->
<!--</div>-->
</div>
</t>
<t t-name="ViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<h1>Summary</h1>
</div>
</div>
<div class="row table-responsive td-border container-blank" id="view_summary">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>Section Name</span></th>
<th class="text-center"><span>No. of Invoices</span></th>
<th class="text-center"><span>Total Central Tax Amount (₹)</span></th>
<th class="text-center"><span>Total State/UT Tax Amount (₹)</span></th>
<th class="text-center"><span>Total Integrated Tax Amount (₹)</span></th>
<th class="text-center"><span>Total CESS (₹)</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="l">
<tr>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" t-att-data-action="l.action"
><t t-esc="l.name"/></a>
</td>
<td class="text-center">
<t t-esc="l.no_of_invoices"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="l.cgst_amount" t-esc="l.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="l.sgst_amount" t-esc="l.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="l.igst_amount" t-esc="l.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="l.cess_amt_total" t-esc="l.cess_amt_total.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="6">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="B2BViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<t t-if="summary_type == 'gstr1'">
<h1>B2B Invoices - 4A, 4B, 4C, 6B, 6C</h1>
</t>
<t t-if="summary_type == 'gstr2'">
<h1>Supplies From Registered Suppliers B2B - 3,4A</h1>
</t>
</div>
</div>
<div class="row table-responsive td-border container-blank" id="b2bview_summary">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>Receiver GSTIN/UIN</span></th>
<th class="text-center"><span>Invoices No.</span></th>
<th class="text-center"><span>Invoices Date</span></th>
<th class="text-center"><span>Place of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>Invoice Type</span></th>
<th class="text-center"><span>Reverse Charges</span></th>
<th class="text-center"><span>E-Commerce GSTIN</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left">
<t t-esc="line.gstin_partner"/>
</td>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.date"/>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-left">
<t t-esc="line.inv_type"/>
</td>
<td class="text-center">
<t t-esc="line.reverse_charge"/>
</td>
<td class="text-center">
<t t-esc="line.ecommerce_gstin"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="11">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr>
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="13">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="B2CLViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<h1>B2C(Large) Invoices - 5A, 5B</h1>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>Invoices No.</span></th>
<th class="text-center"><span>Invoices Date</span></th>
<th class="text-center"><span>Place of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>E-Commerce
GSTIN</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.date"/>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-center">
<t t-esc="line.ecommerce_gstin"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="11">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr>
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="10">
<span>No Record Found</span>
</td>
</tr>
</t>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="B2CSViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<h1>B2C(Small) Details - 7</h1>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>Invoices No.</span></th>
<th class="text-center"><span>Place of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>Type</span></th>
<th class="text-center"><span>E-Commerce
GSTIN</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-left">
<t t-esc="line.type"/>
</td>
<td class="text-center">
<t t-esc="line.ecommerce_gstin"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="8">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr class="table-border-gst">
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="11">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="CDNRViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<t t-if="summary_type == 'gstr1'">
<h1>Credit/Debit Notes(Registered) - 9B </h1>
</t>
<t t-if="summary_type == 'gstr2'">
<h1>Debit/Credit Notes (Registered) - 6C </h1>
</t>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>GSTIN/UIN of Recipient</span></th>
<th class="text-center"><span>Invoice/Advance Receipt Number</span></th>
<th class="text-center"><span>Invoice/Advance Receipt date</span></th>
<th class="text-center"><span>Note/Refund Voucher Number</span></th>
<th class="text-center"><span>Note/Refund Voucher date</span></th>
<th class="text-center"><span>Document Type</span></th>
<th class="text-center"><span>Reason For Issuing document</span></th>
<th class="text-center"><span>Place Of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Pre GST</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left">
<t t-esc="line.gstin_partner"/>
</td>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.refund_invoice_id" data-object="account.invoice"><t t-esc="line.refund_inv_no"/></a>
</td>
<td class="text-left">
<t t-esc="line.refund_date_invoice"/>
</td>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.inv_date"/>
</td>
<td class="text-center">
<t t-esc="line.document_type"/>
</td>
<td class="text-left">
<t t-esc="line.reason"/>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-center" style="white-space: nowrap;">
<t t-esc="line.pre_gst"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="11">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr class="table-border-gst">
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="15">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="CDNURViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<t t-if="summary_type == 'gstr1'">
<h1>Credit/Debit Notes(Unregistered) - 9B</h1>
</t>
<t t-if="summary_type == 'gstr2'">
<h1>Credit/Debit Notes(Unregistered) - 6C</h1>
</t>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>UR Type</span></th>
<th class="text-center"><span>Invoice/Advance Receipt Number</span></th>
<th class="text-center"><span>Invoice/Advance Receipt date</span></th>
<th class="text-center"><span>Note/Refund Voucher Number</span></th>
<th class="text-center"><span>Note/Refund Voucher date</span></th>
<th class="text-center"><span>Document Type</span></th>
<th class="text-center"><span>Reason For Issuing document</span></th>
<th class="text-center"><span>Place Of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Pre GST</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left">
<t t-esc="line.gst_invoice_type"/>
</td>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.refund_invoice_id" data-object="account.invoice"><t t-esc="line.refund_inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.refund_date_invoice"/>
</td>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.inv_date"/>
</td>
<td class="text-center">
<t t-esc="line.document_type"/>
</td>
<td class="text-left">
<t t-esc="line.reason"/>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-center">
<t t-esc="line.pre_gst"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="11">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr>
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="15">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="HSNViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<t t-if="summary_type == 'gstr1'">
<h1>HSN-Wise Summary of outward Supplies - 12</h1>
</t>
<t t-if="summary_type == 'gstr2'">
<h1>HSN-Wise Summary of outward Supplies - 13</h1>
</t>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped table-bordered mb32">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>HSN</span></th>
<th class="text-center"><span>Description</span></th>
<th class="text-center"><span>UQC</span></th>
<th class="text-center"><span>Total Quantity</span></th>
<th class="text-center"><span>Total Value</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-center">
<t t-esc="line.hsn"/>
</td>
<td class="text-left">
<t t-esc="line.product_name"/>
</td>
<td class="text-center">
<t t-esc="line.uqc"/>
</td>
<td class="text-center">
<t t-esc="line.total_qty"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.value" t-esc="line.value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst_amt" t-esc="line.igst_amt.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst_amt" t-esc="line.cgst_amt.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst_amt" t-esc="line.sgst_amt.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="10">
<span>No Record Found</span>
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
<t t-name="B2BURViewSummary">
<div class="row container-blank">
<div class="col-md-12 text-center mt16 mb16">
<h1>Supplies From Unregistered Suppliers B2BUR - 4C</h1>
</div>
</div>
<div class="row table-responsive td-border container-blank">
<table class="table table-striped">
<thead>
<tr class="table-header-color-gst">
<th class="text-center"><span>Invoices No.</span></th>
<th class="text-center"><span>Invoices Date</span></th>
<th class="text-center"><span>Place of Supply</span></th>
<th class="text-center"><span>Rate</span></th>
<th class="text-center"><span>E-Commerce GSTIN</span></th>
<th class="text-center"><span>Taxable Value</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="data" t-as="line">
<tr>
<td class="text-left data_action_flectra_color">
<a href="javascript:void(0);" action="open_document" t-att-data-id="line.id" data-object="account.invoice"><t t-esc="line.inv_no"/></a>
</td>
<td class="text-center">
<t t-esc="line.date"/>
</td>
<td class="text-left">
<t t-esc="line.place_supply"/>
</td>
<td class="text-center data_action_flectra_color">
<a href="javascript:void(0);" class="show_subline"><t t-esc="line.rate"/> %</a>
</td>
<td class="text-center">
<t t-esc="line.ecommerce_gstin"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.taxable_value" t-esc="line.taxable_value.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.igst" t-esc="line.igst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cgst" t-esc="line.cgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.sgst" t-esc="line.sgst.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="line.cess_amount" t-esc="line.cess_amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
<t t-if="line.lines.length">
<tr class="data_subline hidden">
<td colspan="2"/>
<td colspan="11">
<table class="table table-striped table-bordered table-border-gst mb0">
<thead>
<tr class="sub-table-header-color-gst">
<th class="text-left"><span>Product Name</span></th>
<th class="text-center"><span>Quantity</span></th>
<th class="text-center"><span>Price</span></th>
<th class="text-center"><span>IGST</span></th>
<th class="text-center"><span>CGST</span></th>
<th class="text-center"><span>SGST</span></th>
<th class="text-center"><span>CESS</span></th>
<th class="text-center"><span>Amount</span></th>
</tr>
</thead>
<tbody>
<t t-foreach="line.lines" t-as="sub_line">
<tr>
<td class="text-left">
<t t-esc="sub_line.product_name"/>
</td>
<td class="text-center">
<t t-esc="sub_line.quantity"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.price_unit" t-esc="sub_line.price_unit.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.igst_amount" t-esc="sub_line.igst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cgst_amount" t-esc="sub_line.cgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.sgst_amount" t-esc="sub_line.sgst_amount.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.cess" t-esc="sub_line.cess.toFixed(2) + ' ₹'"/>
</td>
<td class="text-right" style="white-space: nowrap;">
<t t-if="sub_line.amount" t-esc="sub_line.amount.toFixed(2) + ' ₹'"/>
</td>
</tr>
</t>
</tbody>
</table>
</td>
</tr>
</t>
<t t-if="data.length == 0">
<tr>
<td class="text-black-50 text-center" colspan="10">
<span>No Record Found</span>
</td>
</tr>
</t>
</t>
</tbody>
</table>
</div>
</t>
</templates>

View File

@ -0,0 +1,7 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import test_gst_common
from . import test_account_invoice
from . import test_res_partner
from . import test_res_company
from . import test_gst_summary_reports

View File

@ -0,0 +1,237 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
import logging
from .test_gst_common import TestGSTCommon
class TestCreateInvoice(TestGSTCommon):
def setUp(self):
super(TestCreateInvoice, self).setUp()
def details_of_invoice(self, invoice_id):
logging.info('\n\n')
logging.info('|=== Test case for %s type invoice ===|' %
invoice_id.gst_invoice)
logging.info('Invoice No. : %s' % invoice_id.number)
logging.info('Invoice Type : %s' % invoice_id.gst_invoice)
logging.info('Customer Name : %s' % invoice_id.partner_id.name)
logging.info('Invoice date : %s' % invoice_id.date_invoice)
logging.info('GST Type : %s' % invoice_id.gst_type)
logging.info('GST Number : %s' % (invoice_id.vat or 'N/A'))
logging.info('Journal : %s' % invoice_id.journal_id.name)
logging.info('Account : %s' % invoice_id.account_id.name)
logging.info('Source Doc. : %s' % (invoice_id.origin or '-'))
logging.info('Invoice lines :')
for line in invoice_id.invoice_line_ids:
logging.info('\t\t Product name : %s' % line.product_id.name)
logging.info('\t\t Quantity : %d' % line.quantity)
logging.info('\t\t Price unit : %d' % line.price_unit)
logging.info('\t\t Total : %d' % line.price_subtotal)
logging.info('\t\t Taxes : %s' %
(line.invoice_line_tax_ids.name or 'N/A'))
def test_invoice_b2b(self):
# Add tax for product
for line in self.account_invoice_b2b.invoice_line_ids:
line.write({
'invoice_line_tax_ids': [(4, self.tax_gst_5.id)]
})
# Test for state initially
self.assertEquals(self.account_invoice_b2b.state, 'draft')
# Test for invoice type before validation
assert not self.account_invoice_b2b.gst_invoice, \
'Invoice type should be null'
# Test state of invoice after validation
self.account_invoice_b2b.action_invoice_open()
self.assertEquals(self.account_invoice_b2b.state, 'open')
# Test for move attachment
assert self.account_invoice_b2b.move_id, \
'Move is not created for open invoice'
# Test for GST Invoice type
if self.account_invoice_b2b.partner_id.vat:
self.assertTrue(self.account_invoice_b2b.gst_invoice == 'b2b',
'Invoice must be a type B2B')
# Test GST number of a partner
if self.account_invoice_b2b.partner_id.gst_type != 'unregistered':
assert self.account_invoice_b2b.vat,\
'Registered partner must have GST Number'
self.details_of_invoice(self.account_invoice_b2b)
# Create refund invoice
self.account_invoice_refund_b2b = self.account_invoice_b2b.refund()
# Test case for invoice type
assert self.account_invoice_refund_b2b.gst_invoice, \
'Invoice type should be null'
# Test for state initially
self.assertEquals(self.account_invoice_refund_b2b.state, 'draft')
# Test the state after invoice validation
self.account_invoice_refund_b2b.action_invoice_open()
self.assertEquals(self.account_invoice_refund_b2b.state, 'open')
# Test whether refund invoice is created
assert self.account_invoice_refund_b2b.refund_invoice_id, \
'Refund invoice is not created'
# Test for refund invoice created for B2B type invoice
self.assertEquals(self.account_invoice_refund_b2b.refund_invoice_id.id,
self.account_invoice_b2b.id,
'Refund invoice for B2B type is not created')
# Test refunded amount total
self.assertEquals(
-self.account_invoice_refund_b2b.amount_untaxed_signed,
self.account_invoice_b2b.amount_untaxed_signed,
'Amount total is wrong in refund')
self.details_of_invoice(self.account_invoice_refund_b2b)
self.env.ref('l10n_in_gst.l10n_in_gst_report_action')
def test_invoice_b2cs(self):
# Add tax for product
for line in self.account_invoice_b2cs.invoice_line_ids:
line.write({
'invoice_line_tax_ids': [(4, self.tax_gst_18.id)]
})
# Test for invoice type before validation
assert not self.account_invoice_b2cs.gst_invoice, \
'Invoice type should be null'
# Test the state of invoice before validation
self.assertEquals(self.account_invoice_b2cs.state, 'draft')
# Test state of invoice after validation
self.account_invoice_b2cs.action_invoice_open()
self.assertEquals(self.account_invoice_b2cs.state, 'open')
# Test for move attachment
assert self.account_invoice_b2cs.move_id, \
'Move is not created for open invoice'
partner_location = \
self.account_invoice_b2cs.partner_id.partner_location
# Test for GST Invoice type
if self.account_invoice_b2cs.partner_id and not self.\
account_invoice_b2cs.vat and partner_location == \
'intra_state' or partner_location == 'inter_state' and \
self.account_invoice_b2cs.amount_total < \
self.b2c_limit_b2cs.b2cs_limit:
self.assertTrue(self.account_invoice_b2cs.gst_invoice == 'b2cs',
'Invoice must be a type B2CS')
# Test GST number of a partner
if self.account_invoice_b2cs.partner_id.gst_type != 'unregistered':
self.assertTrue(self.account_invoice_b2cs.vat, False,
'Registered partner must have GST Number')
self.details_of_invoice(self.account_invoice_b2cs)
def test_invoice_b2cl(self):
# Add tax for product
for line in self.account_invoice_b2cl.invoice_line_ids:
line.write({
'invoice_line_tax_ids': [(4, self.tax_igst_5.id)]
})
# Test for invoice type before validation
assert not self.account_invoice_b2cl.gst_invoice, \
'Invoice type should be null'
# Test the state of invoice before validation
self.assertEquals(self.account_invoice_b2cl.state, 'draft')
# Test state of invoice after validation
self.account_invoice_b2cl.action_invoice_open()
self.assertEquals(self.account_invoice_b2cl.state, 'open')
# Test for move attachment
assert self.account_invoice_b2cl.move_id, \
'Move is not created for open invoice'
partner_location = \
self.account_invoice_b2cl.partner_id.partner_location
# Test for GST Invoice type
if self.account_invoice_b2cl.partner_id and not \
self.account_invoice_b2cl.vat and \
partner_location == 'inter_state' and \
self.account_invoice_b2cl.amount_total > \
self.b2c_limit_b2cl.b2cl_limit:
self.assertTrue(self.account_invoice_b2cl.gst_invoice == 'b2cl',
'Invoice must be a type B2CL')
# Test GST number of a partner
if self.account_invoice_b2cl.partner_id.gst_type != 'unregistered':
self.assertTrue(self.account_invoice_b2cl.vat, False,
'Registered partner must have GST Number')
self.details_of_invoice(self.account_invoice_b2cl)
# Create refund invoice
self.account_invoice_refund_b2cl = self.account_invoice_b2cl.refund()
# Test for invoice type
assert self.account_invoice_refund_b2cl.gst_invoice, \
'Invoice type should be null'
# Test for state initially
self.assertEquals(self.account_invoice_refund_b2cl.state, 'draft')
# Test the state after invoice validation
self.account_invoice_refund_b2cl.action_invoice_open()
self.assertEquals(self.account_invoice_refund_b2cl.state, 'open')
# Test whether refund invoice is created
assert self.account_invoice_refund_b2cl.refund_invoice_id, \
'Refund invoice is not created'
# Test for refund invoice created for B2CL type invoice
self.assertEquals(self.account_invoice_refund_b2cl.
refund_invoice_id.id, self.account_invoice_b2cl.id,
'Refund invoice for B2CL type is not created')
# Test refunded amount total
self.assertEquals(
-self.account_invoice_refund_b2cl.amount_untaxed_signed,
self.account_invoice_b2cl.amount_untaxed_signed,
'Amount total is wrong in refund')
self.details_of_invoice(self.account_invoice_refund_b2cl)
def test_invoice_composite(self):
company_id = self.account_invoice_composite.company_id
company_id.write({'gst_type': 'composite'})
# Add tax for product
for line in self.account_invoice_b2cl.invoice_line_ids:
line.write({
'invoice_line_tax_ids': [(4, self.tax_gst_18.id)]
})
# Test for state initially
self.assertEquals(self.account_invoice_composite.state, 'draft')
# Test for invoice type before validation
assert not self.account_invoice_composite.gst_invoice, \
'Invoice type should be null'
# Test state of invoice after validation
self.account_invoice_composite.action_invoice_open()
self.assertEquals(self.account_invoice_composite.state, 'open')
# If company is composite then tax computation is not there
if company_id.gst_type == 'composite':
self.assertEquals(len(
self.account_invoice_composite.tax_line_ids.ids), 0,
'Taxes should not be calculated if company is composite')
self.details_of_invoice(self.account_invoice_composite)
company_id.write({'gst_type': 'regular'})

View File

@ -0,0 +1,56 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra.tests.common import TransactionCase
class TestGSTCommon(TransactionCase):
def setUp(self):
super(TestGSTCommon, self).setUp()
self.account_invoice_b2b = self.env.ref(
'l10n_in_gst.demo_invoice_gst9')
self.account_invoice_b2cs = self.env.ref(
'l10n_in_gst.demo_invoice_gst10')
self.b2c_limit_b2cs = self.env['res.company.b2c.limit'].search([
('date_from', '<=', self.account_invoice_b2cs.date_invoice),
('date_to', '>=', self.account_invoice_b2cs.date_invoice),
('company_id', '=', self.account_invoice_b2cs.company_id.id)])
self.account_invoice_b2cl = self.env.ref(
'l10n_in_gst.demo_invoice_gst8')
self.b2c_limit_b2cl = self.env['res.company.b2c.limit'].search([
('date_from', '<=', self.account_invoice_b2cl.date_invoice),
('date_to', '>=', self.account_invoice_b2cl.date_invoice),
('company_id', '=', self.account_invoice_b2cl.company_id.id)])
self.account_invoice_composite = self.env.ref(
'l10n_in_gst.demo_invoice_gst11')
self.res_partner_registered = self.env.ref(
'l10n_in_gst.res_partner_gst_registered')
self.res_partner_unregistered = self.env.ref(
'l10n_in_gst.res_partner_gst_unregistered')
self.demo_company = self.env.ref('base.main_company')
self.tax_gst_5 = self.env['account.tax'].create({
'name': 'Test-GST 5%',
'type_tax_use': 'sale',
'amount': 5
})
self.tax_gst_18 = self.env['account.tax'].create({
'name': 'Test-GST 18%',
'type_tax_use': 'sale',
'amount': 18
})
self.tax_igst_5 = self.env['account.tax'].create({
'name': 'Test-IGST 5%',
'type_tax_use': 'sale',
'amount': 5
})
self.tax_igst_28 = self.env['account.tax'].create({
'name': 'Test-IGST 28%',
'type_tax_use': 'sale',
'amount': 28
})

View File

@ -0,0 +1,35 @@
from datetime import datetime
from dateutil.relativedelta import relativedelta
from .test_gst_common import TestGSTCommon
class TestGSTSummaryReports(TestGSTCommon):
def test_00_gstr_summary_reports(self):
# call open_document
gst_report_obj = self.env['gst.report'].sudo(self.env.uid)
options = {'object': 'account.invoice', 'id': self.account_invoice_b2b}
gst_report_obj.open_document(options)
data = {
'from_date': (datetime.today() - relativedelta(months=1))
.strftime('%Y-%m-01'),
'to_date': (datetime.today() - relativedelta(months=1))
.strftime('%Y-%m-28'),
'company_id': self.env.user.company_id.id,
'year': datetime.today().year,
'month': datetime.today().month,
'template': 'ViewSummary',
'data_action_method': 'get_gstr_summary'
}
# call summary for GSTR1
data.update({'summary_type': 'gstr1'})
gst_report_obj.get_gstr_summary(data)
# print excel report for gstr 1 report
gst_report_obj.write_data_into_sheets({'form': data})
# call summary for GSTR2
data.update({'summary_type': 'gstr2'})
gst_report_obj.get_gstr_summary(data)
# print excel report for gstr 2 report
gst_report_obj.write_data_into_sheets({'form': data})

View File

@ -0,0 +1,27 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from .test_gst_common import TestGSTCommon
class TestResCompany(TestGSTCommon):
def test_res_company(self):
# Test case for regisetered company
if self.demo_company.gst_type == 'regular':
assert self.demo_company.vat,\
'Registered company must have GSTIN'
self.assertEquals(self.demo_company.state_id.l10n_in_tin,
self.demo_company.vat[:2],
'GST Number is not valid')
self.assertEquals(len(self.demo_company.vat), 15,
'GSTIN length must be of 15 characters!')
# Test case for unregisetered company
if self.demo_company.gst_type == 'unregistered':
assert not self.res_partner_unregistered.vat, \
'Unregistered partner does not have GSTIN'
# Test case for B2C Limit lines
self.assertTrue(len(self.demo_company.company_b2c_limit_line.ids) != 0,
'Company must have B2C Limit')

View File

@ -0,0 +1,60 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra.osv.orm import except_orm
from .test_gst_common import TestGSTCommon
class TestResPartner(TestGSTCommon):
def test_partner_gstin(self):
# test cases for check constrains on create of partners
with self.assertRaises(except_orm):
self.env['res.partner'].create({
'name': 'Demo IGST Unregistered Customer',
'category_id': self.env.ref('base.res_partner_category_16'),
'is_company': 1,
'city': 'Darrang',
'zip': '784527',
'state_id': self.env.ref("base.state_in_as").id,
'country_id': self.env.ref("base.in").id,
'street': '16 Natrani Avenue',
'gst_type': 'regular',
'vat': '18weqqeqe',
'email': 'igstur@yourcompany.example.com',
'phone': '+91 95951 95951'
})
with self.assertRaises(except_orm):
self.env['res.partner'].create({
'name': 'Demo IGST Unregistered Customer',
'category_id': self.env.ref('base.res_partner_category_16'),
'is_company': 1, 'city': 'Darrang', 'zip': '784527',
'state_id': self.env.ref("base.state_in_as").id,
'country_id': self.env.ref("base.in").id,
'street': '16 Natrani Avenue', 'gst_type': 'regular',
'vat': '24weqqeqe45trfg',
'email': 'igstur@yourcompany.example.com',
'phone': '+91 95951 95951'
})
# Test case for regisetered partner
if self.res_partner_registered.gst_type == 'regular':
assert self.res_partner_registered.vat,\
'Registered partner must have GSTIN'
self.assertEquals(self.res_partner_registered.state_id.l10n_in_tin,
self.res_partner_registered.vat[:2],
'GST Number is not valid')
self.assertEquals(len(self.res_partner_registered.vat), 15,
'GSTIN length must be of 15 characters!')
if self.res_partner_registered.state_id.id == \
self.res_partner_registered.company_id.state_id.id:
assert not self.res_partner_registered.\
property_account_position_id, 'Fiscal position must not be set'
# Test case for unregisetered partner
if self.res_partner_unregistered.gst_type == 'unregistered':
assert not self.res_partner_unregistered.vat, \
'Unregistered partner does not have GSTIN'

View File

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Customer Invoice Form View -->
<record id="invoice_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.form.inherit.gst.cust</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='number']" position="after">
<field name="gst_invoice" readonly="1"
class="oe_right"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"
style="color: #7c7bad"/>
</xpath>
<xpath expr="//field[@name='fiscal_position_id']" position="replace"/>
<xpath expr="//field[@name='date_invoice']" position="after">
<field name="partner_location" invisible="1"/>
<field name="fiscal_position_id"
options="{'no_create': True}"
attrs="{'required': [('partner_location', '=', 'inter_country')]}"/>
<field name="gst_type" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
<field name="vat" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="e_commerce_partner_id"
attrs="{'readonly': [('state', 'not in', 'draft')]}"
domain="[('e_commerce', '=', True)]"/>
</xpath>
<xpath expr="//field[@name='tax_line_ids']" position="replace"/>
<xpath expr="//group[@name='left_panel']" position="inside">
<field name="tax_line_ids" attrs="{'invisible': [('tax_line_ids', '=', [])]}" nolabel="1" colspan="4">
<tree editable="bottom" string="Taxes"
create="0">
<field name="name"/>
<field name="tax_id" invisible="1"/>
<field name="account_analytic_id"
invisible="1"/>
<field name="sequence" invisible="1"/>
<field name="manual" invisible="1"/>
<field name="account_id"
groups="account.group_account_user"/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</xpath>
<xpath expr="//page[@name='other_info']/group/group/field[@name='name']"
position="attributes">
<attribute name="attrs">{'readonly': [('type', '=', 'out_refund')]}</attribute>
</xpath>
</field>
</record>
<!-- Inherit Supplier Invoice Form View -->
<record id="invoice_supplier_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.form.inherit.gst</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='number']" position="after">
<field name="gst_invoice" readonly="1"
class="oe_inline oe_right"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"
style="color: #7c7bad"/>
</xpath>
<xpath expr="//field[@name='fiscal_position_id']" position="replace"/>
<xpath expr="//field[@name='date_invoice']" position="after">
<field name="partner_location" invisible="1"/>
<field name="fiscal_position_id"
options="{'no_create': True}"
attrs="{'required': [('partner_location', '=', 'inter_country')]}"/>
<field name="gst_type" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
<field name="vat" readonly="1"
attrs="{'invisible': [('state', 'not in', ('open', 'paid'))]}"/>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="e_commerce_partner_id"
attrs="{'readonly': [('state', '!=', 'draft')]}"
domain="[('e_commerce', '=', True)]"/>
</xpath>
<xpath expr="//field[@name='tax_line_ids']" position="attributes">
<attribute name="attrs">{'invisible': [('tax_line_ids', '=', [])]}</attribute>
</xpath>
</field>
</record>
<!-- Inherit Invoice Search View -->
<record id="view_account_invoice_search_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.search.inherit.gst</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<group expand="0" position="inside">
<filter string="GST Invoice"
context="{'group_by':'gst_invoice'}"/>
<filter string="E-Commerce"
context="{'group_by':'e_commerce_partner_id'}"/>
</group>
</field>
</record>
</flectra>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- GST Summary Report -->
<template id="assets_backend" name="Account GST Assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/l10n_in_gst/static/src/less/gst_report.less"/>
<script type="text/javascript" src="/l10n_in_gst/static/src/js/gst_report.js"/>
</xpath>
</template>
</flectra>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="l10n_in_gst_report_action" model="ir.actions.client">
<field name="name">GSTR1</field>
<field name="tag">l10n_in_gst.gstr1</field>
<field name="context" eval="{'model': 'gst.report', 'summary_type': 'gstr1'}"/>
</record>
<record id="l10n_in_gstr2_report_action" model="ir.actions.client">
<field name="name">GSTR2</field>
<field name="tag">l10n_in_gst.gstr1</field>
<field name="context" eval="{'model': 'gst.report', 'summary_type': 'gstr2'}"/>
</record>
</flectra>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<flectra>
<!-- Note Issue Reasons -->
<menuitem id="menu_note_issue_reason"
parent="account.account_account_menu"
sequence="50"
action="act_open_note_issue_reason_view"
groups="account.group_account_manager"/>
<!-- GST Reports Menu -->
<menuitem id="menu_gst_reports" name="GST Reports"
parent="account.menu_finance_reports"
groups="account.group_account_manager"/>
<!-- GSTR1 Summary Menu -->
<menuitem name="GSTR-1 Summary"
id="l10n_in_gst_report_menu"
action="l10n_in_gst_report_action"
parent="menu_gst_reports"
sequence="10"/>
<menuitem name="GSTR-2 Summary"
id="l10n_in_gst2_report_menu"
action="l10n_in_gstr2_report_action"
parent="menu_gst_reports"
sequence="20"/>
</flectra>

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<flectra>
<!-- Note Issue Reasons List View -->
<record id="view_note_issue_reason_tree" model="ir.ui.view">
<field name="name">note.issue.reason.tree</field>
<field name="model">note.issue.reason</field>
<field name="type">tree</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<tree string="Note Issue Reasons">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Note Issue Reasons Form View -->
<record id="view_note_issue_reason_form" model="ir.ui.view">
<field name="name">note.issue.reason.form</field>
<field name="model">note.issue.reason</field>
<field name="type">form</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Note Issue Reasons">
<sheet>
<group>
<field name="code" required="1"/>
<field name="name" required="1"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- Note Issue Reasons Search View -->
<record id="view_note_issue_reason_search" model="ir.ui.view">
<field name="name">note.issue.reason.search</field>
<field name="model">note.issue.reason</field>
<field name="type">search</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<search string="Note Issue Reasons">
<field name="name"/>
<field name="code"/>
</search>
</field>
</record>
<record id="act_open_note_issue_reason_view" model="ir.actions.act_window">
<field name="name">Note Issue Reasons</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">note.issue.reason</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_note_issue_reason_search"/>
<field name="domain">[]</field>
<field name="context">{}</field>
</record>
<record id="act_open_note_issue_reason_view_form" model="ir.actions.act_window.view">
<field name="act_window_id" ref="act_open_note_issue_reason_view"/>
<field name="sequence" eval="20"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_note_issue_reason_form"/>
</record>
<record id="act_open_note_issue_reason_view_tree" model="ir.actions.act_window.view">
<field name="act_window_id" ref="act_open_note_issue_reason_view"/>
<field name="sequence" eval="10"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_note_issue_reason_tree"/>
</record>
</flectra>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Product UOM Form View -->
<record id="product_uom_form_view_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">product.uom.form.inherit.gst</field>
<field name="model">product.uom</field>
<field name="inherit_id" ref="product.product_uom_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='rounding']" position="after">
<field name="code" required="1"/>
</xpath>
</field>
</record>
<!-- Inherit Product UOM List View -->
<record id="product_uom_tree_view_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">product.uom.tree.inherit.gst</field>
<field name="model">product.uom</field>
<field name="inherit_id" ref="product.product_uom_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="code"/>
</xpath>
</field>
</record>
</flectra>

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Company Form View -->
<record id="view_company_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">res.company.form.inherit.gst</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='vat']" position="after">
<field name="gst_type"/>
<field name="gst_introduce_date" required="1"/>
</xpath>
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="attrs">{'required': [('gst_type', '!=', 'unregistered')], 'invisible': [('gst_type', '=', 'unregistered')]}</attribute>
</xpath>
<xpath expr="//page" position="inside">
<separator string="B2C Limit"/>
<field name="company_b2c_limit_line"/>
</xpath>
</field>
</record>
<!-- B2C Limit List View -->
<record id="view_res_company_b2c_limit_tree" model="ir.ui.view">
<field name="name">res.company.b2c.limit.tree</field>
<field name="model">res.company.b2c.limit</field>
<field name="type">tree</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<tree string="Company B2C Limit" editable="top">
<field name="date_from" required="1"/>
<field name="date_to" required="1"/>
<field name="b2cl_limit"/>
<field name="b2cs_limit"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<!-- B2C Limit Form View -->
<record id="view_res_company_b2c_limit_form" model="ir.ui.view">
<field name="name">res.company.b2c.limit.form</field>
<field name="model">res.company.b2c.limit</field>
<field name="type">form</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Company B2C Limit">
<group>
<group>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group>
<field name="b2cl_limit"/>
<field name="b2cs_limit"/>
<field name="company_id" invisible="1"/>
</group>
</group>
</form>
</field>
</record>
</flectra>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Account Settings Configuration for GST -->
<record id="res_config_settings_view_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.res.config.extended.gst</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="priority">2</field>
<field name="arch" type="xml">
<xpath expr="//div[@id='analytic']" position="after">
<h2>GST</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<div class="content-group">
<div class="row mt16">
<label for="gst_type"
class="col-md-3 o_light_label"/>
<field name="gst_type"
attrs="{'readonly': [('gst_applied','=',True)]}"/>
</div>
<div class="row mt16"
attrs="{'invisible': [('gst_type', 'in', [False,'unregistered'])]}">
<label for="gstin_number"
class="col-md-3 o_light_label"/>
<field name="gstin_number"
attrs="{'invisible': [('gst_type', 'in', [False,'unregistered'])], 'required': [('gst_type', '!=', 'unregistered')], 'readonly': [('gst_applied','=',True)]}"/>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
<div class="content-group">
<div class="row mt16"
attrs="{'invisible': [('gst_type', '=', False)]}">
<label for="country_id"
class="col-md-3 o_light_label"/>
<field name="country_id"
options="{'no_create_edit': True, 'no_open': True}"
attrs="{'invisible': [('gst_type','=', False)], 'required': [('gst_type', '!=', False)], 'readonly': [('gst_applied','=',True)]}"/>
</div>
<div class="row mt16" attrs="{'invisible': [('gst_type', '=', False)]}">
<label for="state_id"
class="col-md-3 o_light_label"/>
<field name="state_id"
options="{'no_create_edit': True, 'no_open': True}"
attrs="{'invisible': [('gst_type','=', False)], 'required': [('gst_type', '!=', False)], 'readonly': [('gst_applied','=',True)]}"/>
<field name="gst_applied" invisible="1"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</flectra>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Partner Form View -->
<record id="view_partner_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">res.partner.form.inherit.gst</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='company_type']" position="after">
<div>
<field name="e_commerce"/>
<label for="e_commerce"/>
</div>
</xpath>
<xpath expr="//field[@name='vat']" position="before">
<field name="gst_company_partner" invisible="1"/>
<field name="gst_type"
attrs="{'required': [('gst_company_partner', '!=', True)]}"/>
</xpath>
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="attrs">{'required': ['|', ('gst_type', '!=', 'unregistered'), ('e_commerce', '!=', False)], 'invisible': [('gst_type', '=', 'unregistered')]}</attribute>
</xpath>
<xpath expr="//field[@name='category_id']" position="after">
<field name="partner_location" invisible="1"/>
</xpath>
<xpath expr="//field[@name='lang']" position="after">
<field name="partner_location" invisible="1"/>
<field name="property_account_position_id"
options="{'no_create': True, 'no_open': True}"
attrs="{'required': [('partner_location', '=', 'inter_country')]}"/>
</xpath>
</field>
</record>
<!-- Inherit Account Partner Form View -->
<record id="view_partner_property_form_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">res.partner.form.inherit.property.gst</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='fiscal_information']"
position="replace"/>
</field>
</record>
</flectra>

View File

@ -0,0 +1,4 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from . import account_invoice_refund

View File

@ -0,0 +1,17 @@
# Part of Flectra See LICENSE file for full copyright and licensing details.
from flectra import api, fields, models
class AccountInvoiceRefund(models.TransientModel):
_inherit = 'account.invoice.refund'
note_issue_reason_id = fields.Many2one('note.issue.reason',
string='Reason for Issuing Note')
@api.onchange('note_issue_reason_id')
def onchange_note_issue_reason(self):
""" Add value of Issuing Note into Reason """
if self.note_issue_reason_id:
self.description = ('%s-%s') % (self.note_issue_reason_id.code,
self.note_issue_reason_id.name)

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<!-- Inherit Invoice Refund Form View -->
<record id="view_account_invoice_refund_inherit_l10n_in_gst" model="ir.ui.view">
<field name="name">account.invoice.refund.form.inherit.gst</field>
<field name="model">account.invoice.refund</field>
<field name="inherit_id"
ref="account.view_account_invoice_refund"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='description']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='description']" position="before">
<field name="note_issue_reason_id" widget="selection"
required="1"/>
</xpath>
</field>
</record>
</flectra>