Remove gst reports for non indian accounts (#9553)

* remove gst reports for non indian accounts

* [Fix] GSN code auto name
This commit is contained in:
rohitwaghchaure 2017-07-04 16:45:29 +05:30 committed by Makarand Bauskar
parent e5ca48a76a
commit 10a4a13e5e
3 changed files with 22 additions and 2 deletions

View File

@ -410,3 +410,4 @@ erpnext.patches.v8_0.save_system_settings
erpnext.patches.v8_1.delete_deprecated_reports
erpnext.patches.v8_1.setup_gst_india #2017-06-27
execute:frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
erpnext.patches.v8_1.removed_roles_from_gst_report_non_indian_account

View File

@ -0,0 +1,18 @@
# Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('core', 'doctype', 'has_role')
company = frappe.get_all('Company', filters = {'country': 'India'})
if not company:
frappe.db.sql("""
delete from
`tabHas Role`
where
parenttype = 'Report' and parent in('GST Sales Register',
'GST Purchase Register', 'GST Itemised Sales Register',
'GST Itemised Purchase Register')""")

View File

@ -84,7 +84,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-06-29 21:28:09.053351",
"modified": "2017-06-30 20:12:57.903983",
"modified_by": "Administrator",
"module": "Regional",
"name": "GST HSN Code",
@ -94,10 +94,11 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "description",
"search_fields": "hsn_code, description",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "hsn_code",
"track_changes": 1,
"track_seen": 0
}