Merge pull request #31549 from resilient-tech/ic-lingering-code

chore: remove missed code for India localisation
This commit is contained in:
Deepesh Garg 2022-07-15 15:20:06 +05:30 committed by GitHub
commit b62028722e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 144418 deletions

View File

@ -346,4 +346,4 @@ erpnext.patches.v13_0.job_card_status_on_hold
erpnext.patches.v14_0.copy_is_subcontracted_value_to_is_old_subcontracting_flow
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
erpnext.patches.v14_0.crm_ux_cleanup
erpnext.patches.v14_0.remove_india_localisation
erpnext.patches.v14_0.remove_india_localisation # 14-07-2022

View File

@ -3,7 +3,10 @@ import frappe
def execute():
if not frappe.db.exists("Company", {"country": "India"}):
if (
not frappe.db.exists("Company", {"country": "India"})
or "india_compliance" in frappe.get_installed_apps()
):
return
click.secho(

View File

@ -3,6 +3,24 @@ import frappe
def execute():
if "india_compliance" in frappe.get_installed_apps():
return
delete_docs()
unlink_custom_fields()
if not frappe.db.exists("Company", {"country": "India"}):
return
click.secho(
"India-specific regional features have been moved to a separate app."
" Please install India Compliance to continue using these features:"
" https://github.com/resilient-tech/india-compliance",
fg="yellow",
)
def delete_docs():
to_delete = {
"DocType": [
"C-Form",
@ -12,6 +30,7 @@ def execute():
"E Invoice Settings",
"E Invoice User",
"GST HSN Code",
"HSN Tax Rate",
"GST Settings",
"GSTR 3B Report",
],
@ -43,12 +62,10 @@ def execute():
ignore_missing=True,
)
if not frappe.db.exists("Company", {"country": "India"}):
return
click.secho(
"India-specific regional features have been moved to a separate app."
" Please install India Compliance to continue using these features:"
" https://github.com/resilient-tech/india-compliance",
fg="yellow",
def unlink_custom_fields():
frappe.db.set_value(
"Custom Field",
{"dt": "Item", "fieldname": "gst_hsn_code"},
{"fieldtype": "Data", "options": ""},
)

View File

@ -1,9 +0,0 @@
{{ address_line1 }}<br>{% if address_line2 %}{{ address_line2 }}<br>{% endif -%}{{ city }}<br>
{% if gst_state %}{{ gst_state }}{% endif -%}
{% if gst_state_number %}, State Code: {{ gst_state_number }}<br>{% endif -%}
{% if pincode %}Postal Code: {{ pincode }}<br>{% endif -%}
{{ country }}<br>
{% if phone %}Phone: {{ phone }}<br>{% endif -%}
{% if fax %}Fax: {{ fax }}<br>{% endif -%}
{% if email_id %}Email: {{ email_id }}<br>{% endif -%}
{% if gstin %}GSTIN: {{ gstin }}<br>{% endif -%}

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +0,0 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2022-05-11 13:32:42.534779",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"minimum_taxable_value",
"tax_rate"
],
"fields": [
{
"columns": 2,
"fieldname": "minimum_taxable_value",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Minimum Taxable Value"
},
{
"columns": 2,
"fieldname": "tax_rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Tax Rate"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2022-05-15 15:37:56.152470",
"modified_by": "Administrator",
"module": "Regional",
"name": "HSN Tax Rate",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@ -1,9 +0,0 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class HSNTaxRate(Document):
pass