[minor] cleanup

This commit is contained in:
Rushabh Mehta 2017-06-22 18:16:51 +05:30
parent 919a74ad88
commit 25366a22ad
5 changed files with 13 additions and 7 deletions

View File

@ -316,6 +316,8 @@ def setup_account():
doc.parent_account = frappe.db.get_value('Account', {'account_name': doc.parent_account})
doc.insert()
frappe.flags.in_import = False
def setup_account_to_expense_type():
company_abbr = frappe.db.get_value("Company", erpnext.get_default_company(), "abbr")
expense_types = [{'name': _('Calls'), "account": "Sales Expenses - "+ company_abbr},
@ -380,4 +382,6 @@ def import_json(doctype, submit=False, values=None):
frappe.db.commit()
frappe.flags.in_import = False

View File

@ -1,6 +1,13 @@
import frappe
def execute():
frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
for report_name in ('GST Sales Register', 'GST Purchase Register',
'GST Itemised Sales Register', 'GST Itemised Purchase Register'):
frappe.reload_doc('regional', 'report', frappe.scrub(report_name))
if frappe.db.get_single_value('System Settings', 'country')=='India':
from erpnext.regional.india.setup import setup
setup()

View File

@ -104,7 +104,7 @@ body[data-route="pos"] .pos-payment-row {
}
body[data-route="pos"] .pos-payment-row:hover,
body[data-route="pos"] .pos-keyboard-key:hover {
background-color: #FAFBFC;
background-color: #fafbfc;
cursor: pointer;
}
body[data-route="pos"] .pos-keyboard-key,
@ -214,7 +214,7 @@ body[data-route="pos"] .amount-label {
font-size: 16px;
}
body[data-route="pos"] .selected-payment-mode {
background-color: #FAFBFC;
background-color: #fafbfc;
cursor: pointer;
}
body[data-route="pos"] .pos-invoice-list {

View File

@ -32,8 +32,6 @@ def update_address_template():
).insert()
def add_hsn_codes():
frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
if frappe.db.count('GST HSN Code') > 100:
return
@ -55,8 +53,6 @@ def add_custom_roles_for_reports():
for report_name in ('GST Sales Register', 'GST Purchase Register',
'GST Itemised Sales Register', 'GST Itemised Purchase Register'):
frappe.reload_doc('regional', 'report', frappe.scrub(report_name))
if not frappe.db.get_value('Custom Role', dict(report=report_name)):
frappe.get_doc(dict(
doctype='Custom Role',

View File

@ -345,7 +345,6 @@ def make_sales_and_purchase_tax_templates(accounts, template_name=None):
purchase_tax_template["doctype"] = "Purchase Taxes and Charges Template"
doc = frappe.get_doc(purchase_tax_template)
print frappe.as_json(doc)
doc.insert(ignore_permissions=True)
def create_items(args):