GST Treatment: * Is show that how This invoice or partner is treated in GST * Set default value in customer * This is help in GST retrun filing. * Value of treamtmnet as below - Registered Business - Regular - Registered Business - Composition - Unregistered Business - Consumer - Overseas - Special Economic Zone - Deemed Export * GSTIN is required in - Registered Business - Regular - Registered Business - Composition - Special Economic Zone - Deemed Export GSTIN: * GST identification number or GST number * There can be multiple GSTIN for a single person, being an assessee under the Income Tax Act for every State or Union Territory in which such person operates from * Add Validate of this number using regular expression remove field l10n_in_export_type and l10n_in_import_export becouse it's covered by GST Treatment remove field l10n_in_partner_vat becouse not use anyware.
30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, fields, models, _
|
|
|
|
|
|
class AccountChartTemplate(models.Model):
|
|
_inherit = 'account.chart.template'
|
|
|
|
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
|
|
res = super(AccountChartTemplate, self)._prepare_all_journals(acc_template_ref, company, journals_dict=journals_dict)
|
|
if self == self.env.ref('l10n_in.indian_chart_template_standard'):
|
|
for journal in res:
|
|
if journal.get('type') in ('sale','purchase'):
|
|
journal['l10n_in_gstin_partner_id'] = company.partner_id.id
|
|
if journal['code'] == 'INV':
|
|
journal['name'] = _('Tax Invoices')
|
|
return res
|
|
|
|
class AccountTaxTemplate(models.Model):
|
|
_inherit = 'account.tax.template'
|
|
|
|
l10n_in_reverse_charge = fields.Boolean("Reverse charge", help="Tick this if this tax is reverse charge. Only for Indian accounting")
|
|
|
|
def _get_tax_vals(self, company, tax_template_to_tax):
|
|
val = super(AccountTaxTemplate, self)._get_tax_vals(company, tax_template_to_tax)
|
|
if self.tax_group_id:
|
|
val['l10n_in_reverse_charge'] = self.l10n_in_reverse_charge
|
|
return val
|