User Progress (#10336)

* [user-progress] first cut

* [user-progress] Add users slide, remove taxes, make sample data

* wip tests

* [setup-wiz] UI test

* [user-progress] notif test, docs trim

* wip

* [user-progress] Setup Progress single to update action states, fixtures

* setup progress actions patch

* rename sales_target field patch

* [progress] wip reform slide data

* [progress] remove slide data

* [setup] add roles for GST doctypes, remove commit from fixtures
This commit is contained in:
Prateeksha Singh
2017-09-04 11:14:04 +05:30
committed by Rushabh Mehta
parent fd39d6bd3c
commit 95d8fd38f5
42 changed files with 1361 additions and 792 deletions

View File

@@ -39,12 +39,12 @@ def add_hsn_sac_codes():
hsn_codes = json.loads(f.read())
create_hsn_codes(hsn_codes, code_field="hsn_code")
# SAC Codes
with open(os.path.join(os.path.dirname(__file__), 'sac_code_data.json'), 'r') as f:
sac_codes = json.loads(f.read())
create_hsn_codes(sac_codes, code_field="sac_code")
def create_hsn_codes(data, code_field):
for d in data:
if not frappe.db.exists("GST HSN Code", d[code_field]):
@@ -54,8 +54,6 @@ def create_hsn_codes(data, code_field):
hsn_code.name = d[code_field]
hsn_code.db_insert()
frappe.db.commit()
def add_custom_roles_for_reports():
for report_name in ('GST Sales Register', 'GST Purchase Register',
'GST Itemised Sales Register', 'GST Itemised Purchase Register'):
@@ -101,7 +99,7 @@ def make_custom_fields():
dict(fieldname='ecommerce_gstin', label='E-commerce GSTIN',
fieldtype='Data', insert_after='export_type', print_hide=1)
]
purchase_invoice_gst_fields = [
dict(fieldname='supplier_gstin', label='Supplier GSTIN',
fieldtype='Data', insert_after='supplier_address',
@@ -110,7 +108,7 @@ def make_custom_fields():
fieldtype='Data', insert_after='shipping_address',
options='shipping_address.gstin', print_hide=1)
]
sales_invoice_gst_fields = [
dict(fieldname='customer_gstin', label='Customer GSTIN',
fieldtype='Data', insert_after='shipping_address',
@@ -122,7 +120,7 @@ def make_custom_fields():
fieldtype='Data', insert_after='company_address',
options='company_address.gstin', print_hide=1)
]
custom_fields = {
'Address': [
dict(fieldname='gstin', label='Party GSTIN', fieldtype='Data',