mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
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:
committed by
Rushabh Mehta
parent
fd39d6bd3c
commit
95d8fd38f5
@@ -84,13 +84,34 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-06-30 20:12:57.903983",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2017-08-31 14:38:52.220743",
|
||||
"modified_by": "ewdszx@ed.ews",
|
||||
"module": "Regional",
|
||||
"name": "GST HSN Code",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
|
||||
23
erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.js
Normal file
23
erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable */
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: GST HSN Code", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially([
|
||||
// insert a new GST HSN Code
|
||||
() => frappe.tests.make('GST HSN Code', [
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.key, 'value');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
||||
@@ -83,13 +83,34 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-06-28 16:20:21.206397",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2017-08-31 14:39:15.625952",
|
||||
"modified_by": "ewdszx@ed.ews",
|
||||
"module": "Regional",
|
||||
"name": "GST Settings",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "System Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
|
||||
23
erpnext/regional/doctype/gst_settings/test_gst_settings.js
Normal file
23
erpnext/regional/doctype/gst_settings/test_gst_settings.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable */
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: GST Settings", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially([
|
||||
// insert a new GST Settings
|
||||
() => frappe.tests.make('GST Settings', [
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.key, 'value');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user