Merge pull request #22611 from frappe/hrms-dashboard-fix
fix: HR dashboard number card filter
diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template.js b/erpnext/accounts/doctype/item_tax_template/item_tax_template.js
index 42abdb8..e921a0d 100644
--- a/erpnext/accounts/doctype/item_tax_template/item_tax_template.js
+++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template.js
@@ -6,6 +6,18 @@
frm.set_query("tax_type", "taxes", function(doc) {
return {
filters: [
+ ['Account', 'company', '=', frm.doc.company],
+ ['Account', 'is_group', '=', 0],
+ ['Account', 'account_type', 'in', ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']]
+ ]
+ }
+ });
+ },
+ company: function (frm) {
+ frm.set_query("tax_type", "taxes", function(doc) {
+ return {
+ filters: [
+ ['Account', 'company', '=', frm.doc.company],
['Account', 'is_group', '=', 0],
['Account', 'account_type', 'in', ['Tax', 'Chargeable', 'Income Account', 'Expense Account', 'Expenses Included In Valuation']]
]
diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template.json b/erpnext/accounts/doctype/item_tax_template/item_tax_template.json
index f713cfc..856c371 100644
--- a/erpnext/accounts/doctype/item_tax_template/item_tax_template.json
+++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template.json
@@ -1,168 +1,85 @@
{
- "allow_copy": 0,
- "allow_events_in_timeline": 0,
- "allow_guest_to_view": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:title",
- "beta": 0,
- "creation": "2018-11-22 22:45:00.370913",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 1,
- "engine": "InnoDB",
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:title",
+ "creation": "2018-11-22 22:45:00.370913",
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "title",
+ "company",
+ "taxes"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "title",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 1,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Title",
- "length": 0,
- "no_copy": 1,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Title",
+ "no_copy": 1,
+ "reqd": 1,
"unique": 1
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "taxes",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Tax Rates",
- "length": 0,
- "no_copy": 0,
- "options": "Item Tax Template Detail",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
+ "fieldname": "taxes",
+ "fieldtype": "Table",
+ "label": "Tax Rates",
+ "options": "Item Tax Template Detail",
+ "reqd": 1
+ },
+ {
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "label": "Company",
+ "options": "Company",
+ "reqd": 1
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-12-21 23:51:16.328340",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Item Tax Template",
- "name_case": "",
- "owner": "Administrator",
+ ],
+ "modified": "2020-06-18 20:27:42.615842",
+ "modified_by": "ahmad@havenir.com",
+ "module": "Accounts",
+ "name": "Item Tax Template",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 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,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
"write": 1
- },
+ },
{
- "amend": 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": "Accounts Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "share": 1,
"write": 1
- },
+ },
{
- "amend": 0,
- "cancel": 0,
- "create": 0,
- "delete": 0,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Accounts User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 0
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts User",
+ "share": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "",
- "show_name_in_global_search": 1,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 1,
- "track_seen": 0,
- "track_views": 0
+ ],
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
}
\ No newline at end of file
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index bfe35ab..a245d63 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -140,10 +140,8 @@
gle = frappe.new_doc("GL Entry")
gle.update(args)
gle.flags.ignore_permissions = 1
- gle.validate()
- gle.db_insert()
+ gle.insert()
gle.run_method("on_update_with_args", adv_adj, update_outstanding)
- gle.flags.ignore_validate = True
gle.submit()
# check against budget
diff --git a/erpnext/accounts/module_onboarding/accounts/accounts.json b/erpnext/accounts/module_onboarding/accounts/accounts.json
index 12da440..ba1a779 100644
--- a/erpnext/accounts/module_onboarding/accounts/accounts.json
+++ b/erpnext/accounts/module_onboarding/accounts/accounts.json
@@ -13,7 +13,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/accounts",
"idx": 0,
"is_complete": 0,
- "modified": "2020-05-14 22:11:06.475938",
+ "modified": "2020-07-08 14:06:09.033880",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts",
@@ -44,8 +44,7 @@
"step": "Configure Account Settings"
}
],
- "subtitle": "Accounts, invoices and taxation.",
- "success_message": "The Accounts module is now set up!",
- "title": "Let's Setup Your Accounts and Taxes.",
- "user_can_dismiss": 1
+ "subtitle": "Accounts, Invoices, Taxation, and more.",
+ "success_message": "The Accounts Module is all set up!",
+ "title": "Let's Set Up Your Accounts and Taxes."
}
\ No newline at end of file
diff --git a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json
index bb396d2..5a403b0 100644
--- a/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json
+++ b/erpnext/accounts/onboarding_step/create_a_customer/create_a_customer.json
@@ -8,7 +8,7 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-05-14 17:46:41.831517",
+ "modified": "2020-06-01 13:16:19.731719",
"modified_by": "Administrator",
"name": "Create a Customer",
"owner": "Administrator",
diff --git a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json
index 450bee1..d2068e1 100644
--- a/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json
+++ b/erpnext/accounts/onboarding_step/create_a_product/create_a_product.json
@@ -1,6 +1,6 @@
{
"action": "Create Entry",
- "creation": "2020-05-14 17:45:28.554605",
+ "creation": "2020-05-12 18:16:06.624554",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
@@ -8,7 +8,7 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-05-14 17:45:28.554605",
+ "modified": "2020-05-12 18:30:02.489949",
"modified_by": "Administrator",
"name": "Create a Product",
"owner": "Administrator",
diff --git a/erpnext/assets/module_onboarding/assets/assets.json b/erpnext/assets/module_onboarding/assets/assets.json
index 66dd60a..1086ab4 100644
--- a/erpnext/assets/module_onboarding/assets/assets.json
+++ b/erpnext/assets/module_onboarding/assets/assets.json
@@ -13,7 +13,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/asset",
"idx": 0,
"is_complete": 0,
- "modified": "2020-05-08 16:17:31.685943",
+ "modified": "2020-07-08 14:05:51.828497",
"modified_by": "Administrator",
"module": "Assets",
"name": "Assets",
@@ -27,7 +27,7 @@
},
{
"step": "Create an Asset Category"
- },
+ },
{
"step": "Purchase an Asset Item"
},
@@ -35,8 +35,7 @@
"step": "Create an Asset"
}
],
- "subtitle": "Assets, Depreciations, Repairs and more",
- "success_message": "The Asset Module is all set up!",
- "title": "Let's Setup Asset Management",
- "user_can_dismiss": 1
+ "subtitle": "Assets, Depreciations, Repairs, and more.",
+ "success_message": "The Assets Module is all set up!",
+ "title": "Let's Set Up the Assets Module."
}
\ No newline at end of file
diff --git a/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json b/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json
index f5818c0..51702d9 100644
--- a/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json
+++ b/erpnext/assets/onboarding_step/create_a_fixed_asset_item/create_a_fixed_asset_item.json
@@ -6,11 +6,14 @@
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
+ "is_single": 0,
"is_skipped": 0,
"modified": "2020-05-08 13:20:00.259985",
"modified_by": "Administrator",
"name": "Create a Fixed Asset Item",
"owner": "Administrator",
"reference_document": "Item",
- "title": "Create a Fixed Asset Item"
+ "show_full_form": 0,
+ "title": "Create a Fixed Asset Item",
+ "validate_action": 0
}
\ No newline at end of file
diff --git a/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json b/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json
index 5488b1d..b4f8a05 100644
--- a/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json
+++ b/erpnext/assets/onboarding_step/create_an_asset/create_an_asset.json
@@ -6,11 +6,14 @@
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
+ "is_single": 0,
"is_skipped": 0,
"modified": "2020-05-08 13:21:53.332538",
"modified_by": "Administrator",
"name": "Create an Asset",
"owner": "Administrator",
"reference_document": "Asset",
- "title": "Create an Asset"
+ "show_full_form": 0,
+ "title": "Create an Asset",
+ "validate_action": 0
}
\ No newline at end of file
diff --git a/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json b/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json
index 3bf54af..ffdb954 100644
--- a/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json
+++ b/erpnext/assets/onboarding_step/create_an_asset_category/create_an_asset_category.json
@@ -1,16 +1,19 @@
{
- "action": "Create Entry",
- "creation": "2020-05-08 13:21:53.332538",
- "docstatus": 0,
- "doctype": "Onboarding Step",
- "idx": 0,
- "is_complete": 0,
- "is_mandatory": 0,
- "is_skipped": 0,
- "modified": "2020-05-08 13:21:53.332538",
- "modified_by": "Administrator",
- "name": "Create an Asset Category",
- "owner": "Administrator",
- "reference_document": "Asset Category",
- "title": "Create an Asset Category"
- }
\ No newline at end of file
+ "action": "Create Entry",
+ "creation": "2020-05-08 13:21:53.332538",
+ "docstatus": 0,
+ "doctype": "Onboarding Step",
+ "idx": 0,
+ "is_complete": 0,
+ "is_mandatory": 0,
+ "is_single": 0,
+ "is_skipped": 0,
+ "modified": "2020-05-08 13:21:53.332538",
+ "modified_by": "Administrator",
+ "name": "Create an Asset Category",
+ "owner": "Administrator",
+ "reference_document": "Asset Category",
+ "show_full_form": 0,
+ "title": "Create an Asset Category",
+ "validate_action": 0
+}
\ No newline at end of file
diff --git a/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json b/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json
index d48dd1c..d89da27 100644
--- a/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json
+++ b/erpnext/assets/onboarding_step/introduction_to_assets/introduction_to_assets.json
@@ -6,11 +6,14 @@
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
+ "is_single": 0,
"is_skipped": 0,
"modified": "2020-05-08 16:06:16.625646",
"modified_by": "Administrator",
"name": "Introduction to Assets",
"owner": "Administrator",
+ "show_full_form": 0,
"title": "Introduction to Assets",
+ "validate_action": 0,
"video_url": "https://www.youtube.com/watch?v=I-K8pLRmvSo"
}
\ No newline at end of file
diff --git a/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json b/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json
index 732ff7f..ce3185e 100644
--- a/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json
+++ b/erpnext/assets/onboarding_step/purchase_an_asset_item/purchase_an_asset_item.json
@@ -6,11 +6,14 @@
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
+ "is_single": 0,
"is_skipped": 0,
"modified": "2020-05-08 13:21:28.208059",
"modified_by": "Administrator",
"name": "Purchase an Asset Item",
"owner": "Administrator",
"reference_document": "Purchase Receipt",
- "title": "Purchase an Asset Item"
+ "show_full_form": 0,
+ "title": "Purchase an Asset Item",
+ "validate_action": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/module_onboarding/buying/buying.json b/erpnext/buying/module_onboarding/buying/buying.json
index 6e4bbc9..887f85b 100644
--- a/erpnext/buying/module_onboarding/buying/buying.json
+++ b/erpnext/buying/module_onboarding/buying/buying.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/buying",
"idx": 0,
"is_complete": 0,
- "modified": "2020-06-01 12:55:09.234944",
+ "modified": "2020-07-08 14:05:28.273641",
"modified_by": "Administrator",
"module": "Buying",
"name": "Buying",
@@ -47,8 +47,7 @@
"step": "Buying Settings"
}
],
- "subtitle": "Products, Purchases, Analysis and more.",
+ "subtitle": "Products, Purchases, Analysis, and more.",
"success_message": "The Buying Module is all set up!",
- "title": "Let's Set Up the Buying Module.",
- "user_can_dismiss": 1
+ "title": "Let's Set Up the Buying Module."
}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/buying_settings/buying_settings.json b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json
index 6d765af..a788ccd 100644
--- a/erpnext/buying/onboarding_step/buying_settings/buying_settings.json
+++ b/erpnext/buying/onboarding_step/buying_settings/buying_settings.json
@@ -1,19 +1,19 @@
{
- "action": "Show Form Tour",
+ "action": "Update Settings",
"creation": "2020-05-06 15:53:44.667414",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
- "is_mandatory": 1,
- "is_single": 1,
+ "is_mandatory": 0,
+ "is_single": 0,
"is_skipped": 0,
- "modified": "2020-06-01 12:52:57.668870",
+ "modified": "2020-05-12 18:30:06.323797",
"modified_by": "Administrator",
"name": "Buying Settings",
"owner": "Administrator",
"reference_document": "Buying Settings",
"show_full_form": 0,
"title": "Configure Buying Settings.",
- "validate_action": 0
+ "validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
index 557c905..9457dee 100644
--- a/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
+++ b/erpnext/buying/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
@@ -8,13 +8,13 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-05-19 18:54:19.383397",
+ "modified": "2020-07-04 12:33:16.970031",
"modified_by": "Administrator",
"name": "Setup your Warehouse",
"owner": "Administrator",
"path": "Tree/Warehouse",
"reference_document": "Warehouse",
"show_full_form": 0,
- "title": "Setup your Warehouse",
+ "title": "Set up your Warehouse",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index f373a43..31e3498 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -582,7 +582,8 @@
args = {
'item_code': filters.get('item_code'),
'posting_date': filters.get('valid_from'),
- 'tax_category': filters.get('tax_category')
+ 'tax_category': filters.get('tax_category'),
+ 'company': filters.get('company')
}
taxes = _get_item_tax_template(args, taxes, for_validate=True)
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index 4e568e2..a9eb996 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -53,7 +53,8 @@
'tax_category': self.doc.get('tax_category'),
'posting_date': self.doc.get('posting_date'),
'bill_date': self.doc.get('bill_date'),
- 'transaction_date': self.doc.get('transaction_date')
+ 'transaction_date': self.doc.get('transaction_date'),
+ 'company': self.doc.get('company')
}
item_group = item_doc.item_group
diff --git a/erpnext/crm/dashboard_fixtures.py b/erpnext/crm/dashboard_fixtures.py
index 0535cbb..901c058 100644
--- a/erpnext/crm/dashboard_fixtures.py
+++ b/erpnext/crm/dashboard_fixtures.py
@@ -172,7 +172,9 @@
"doctype": "Number Card",
"document_type": "Lead",
"name": "New Lead (Last 1 Month)",
- "filters_json": json.dumps([["Lead","creation","Previous","1 month",False]]),
+ "filters_json": json.dumps([
+ ["Lead", "creation", "Timespan", "last month"]
+ ]),
"function": "Count",
"is_public": 1,
"label": _("New Lead (Last 1 Month)"),
@@ -183,7 +185,9 @@
"doctype": "Number Card",
"document_type": "Opportunity",
"name": "New Opportunity (Last 1 Month)",
- "filters_json": json.dumps([["Opportunity","creation","Previous","1 month",False]]),
+ "filters_json": json.dumps([
+ ["Opportunity", "creation", "Timespan", "last month"]
+ ]),
"function": "Count",
"is_public": 1,
"label": _("New Opportunity (Last 1 Month)"),
@@ -194,7 +198,10 @@
"doctype": "Number Card",
"document_type": "Opportunity",
"name": "Won Opportunity (Last 1 Month)",
- "filters_json": json.dumps([["Opportunity","creation","Previous","1 month",False]]),
+ "filters_json": json.dumps([
+ ["Opportunity", "status", "=", "Converted",False],
+ ["Opportunity", "creation", "Timespan", "last month"]
+ ]),
"function": "Count",
"is_public": 1,
"label": _("Won Opportunity (Last 1 Month)"),
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index ec7d14d..315d298 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -114,10 +114,12 @@
def set_lead_name(self):
if not self.lead_name:
# Check for leads being created through data import
- if not self.company_name and not self.flags.ignore_mandatory:
+ if not self.company_name and not self.email_id and not self.flags.ignore_mandatory:
frappe.throw(_("A Lead requires either a person's name or an organization's name"))
-
- self.lead_name = self.company_name
+ elif self.company_name:
+ self.lead_name = self.company_name
+ else:
+ self.lead_name = self.email_id.split("@")[0]
def set_title(self):
if self.organization_lead:
diff --git a/erpnext/crm/module_onboarding/crm/crm.json b/erpnext/crm/module_onboarding/crm/crm.json
index 44d672a..8315218 100644
--- a/erpnext/crm/module_onboarding/crm/crm.json
+++ b/erpnext/crm/module_onboarding/crm/crm.json
@@ -16,7 +16,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/CRM",
"idx": 0,
"is_complete": 0,
- "modified": "2020-05-28 21:07:41.278784",
+ "modified": "2020-07-08 14:05:42.644448",
"modified_by": "Administrator",
"module": "CRM",
"name": "CRM",
@@ -35,8 +35,7 @@
"step": "Create and Send Quotation"
}
],
- "subtitle": "Lead, Opportunity, Customer and more.",
- "success_message": "CRM Module is all Set Up!",
- "title": "Let's Set Up Your CRM.",
- "user_can_dismiss": 1
+ "subtitle": "Lead, Opportunity, Customer, and more.",
+ "success_message": "The CRM Module is all set up!",
+ "title": "Let's Set Up Your CRM."
}
\ No newline at end of file
diff --git a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json
index 3e50726..56c3c13 100644
--- a/erpnext/healthcare/module_onboarding/healthcare/healthcare.json
+++ b/erpnext/healthcare/module_onboarding/healthcare/healthcare.json
@@ -10,7 +10,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/healthcare",
"idx": 0,
"is_complete": 0,
- "modified": "2020-05-26 23:16:37.603361",
+ "modified": "2020-07-08 14:06:19.512946",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Healthcare",
@@ -35,8 +35,7 @@
"step": "Explore Clinical Procedure Templates"
}
],
- "subtitle": "Patients, Practitioner Schedules, Settings and more.",
- "success_message": "Yayy! The Healthcare Module is all set up!",
- "title": "Let's Setup the Healthcare Module",
- "user_can_dismiss": 1
+ "subtitle": "Patients, Practitioner Schedules, Settings, and more.",
+ "success_message": "The Healthcare Module is all set up!",
+ "title": "Let's Set Up the Healthcare Module."
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index fb1f2c0..4001a45 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/hr/doctype/leave_application/leave_application.js
@@ -40,6 +40,8 @@
validate: function(frm) {
if (frm.doc.from_date == frm.doc.to_date && frm.doc.half_day == 1){
frm.doc.half_day_date = frm.doc.from_date;
+ }else if (frm.doc.half_day == 0){
+ frm.doc.half_day_date = "";
}
frm.toggle_reqd("half_day_date", frm.doc.half_day == 1);
},
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 0423824..3f25f58 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -293,6 +293,8 @@
def set_half_day_date(self):
if self.from_date == self.to_date and self.half_day == 1:
self.half_day_date = self.from_date
+ elif self.half_day == 0:
+ self.half_day_date = None
def notify_employee(self):
employee = frappe.get_doc("Employee", self.employee)
diff --git a/erpnext/hr/module_onboarding/human_resource/human_resource.json b/erpnext/hr/module_onboarding/human_resource/human_resource.json
index e64582b..518c002 100644
--- a/erpnext/hr/module_onboarding/human_resource/human_resource.json
+++ b/erpnext/hr/module_onboarding/human_resource/human_resource.json
@@ -13,7 +13,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources",
"idx": 0,
"is_complete": 0,
- "modified": "2020-05-20 11:20:07.992597",
+ "modified": "2020-07-08 14:05:47.018799",
"modified_by": "Administrator",
"module": "HR",
"name": "Human Resource",
@@ -44,8 +44,7 @@
"step": "HR Settings"
}
],
- "subtitle": "Employee, Leaves and more.",
- "success_message": "The HR Module is all set up!",
- "title": "Let's Setup the Human Resource Module. ",
- "user_can_dismiss": 0
+ "subtitle": "Employee, Leaves, and more.",
+ "success_message": "The Human Resource Module is all set up!",
+ "title": "Let's Set Up the Human Resource Module. "
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json b/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json
index a36b63a..7b5747e 100644
--- a/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json
+++ b/erpnext/manufacturing/module_onboarding/manufacturing/manufacturing.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/manufacturing",
"idx": 0,
"is_complete": 0,
- "modified": "2020-06-29 20:25:36.899106",
+ "modified": "2020-07-08 14:05:56.197563",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Manufacturing",
@@ -50,7 +50,7 @@
"step": "Explore Manufacturing Settings"
}
],
- "subtitle": "Products, Raw Materials, BOM, Work Order and more.",
- "success_message": "Manufacturing module is all setup!",
- "title": "Let's Set Up the Manufacturing Module"
-}
+ "subtitle": "Products, Raw Materials, BOM, Work Order, and more.",
+ "success_message": "Manufacturing module is all set up!",
+ "title": "Let's Set Up the Manufacturing Module."
+}
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index c7a7abf..cd4a221 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -707,3 +707,4 @@
erpnext.patches.v13_0.move_payroll_setting_separately_from_hr_settings #22-06-2020
erpnext.patches.v13_0.check_is_income_tax_component #22-06-2020
erpnext.patches.v12_0.add_taxjar_integration_field
+erpnext.patches.v12_0.update_item_tax_template_company
diff --git a/erpnext/patches/v12_0/update_item_tax_template_company.py b/erpnext/patches/v12_0/update_item_tax_template_company.py
new file mode 100644
index 0000000..f749699
--- /dev/null
+++ b/erpnext/patches/v12_0/update_item_tax_template_company.py
@@ -0,0 +1,13 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ frappe.reload_doc('accounts', 'doctype', 'item_tax_template')
+
+ item_tax_template_list = frappe.get_list('Item Tax Template')
+ for template in item_tax_template_list:
+ doc = frappe.get_doc('Item Tax Template', template.name)
+ for tax in doc.taxes:
+ doc.company = frappe.get_value('Account', tax.tax_type, 'company')
+ break
+ doc.save()
\ No newline at end of file
diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js
index 1ae3553..8d35a7b 100644
--- a/erpnext/payroll/doctype/payroll_entry/payroll_entry.js
+++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry.js
@@ -30,6 +30,7 @@
).toggleClass('btn-primary', !(frm.doc.employees || []).length);
}
if ((frm.doc.employees || []).length) {
+ frm.page.clear_primary_action();
frm.page.set_primary_action(__('Create Salary Slips'), () => {
frm.save('Submit').then(()=>{
frm.page.clear_primary_action();
@@ -49,13 +50,14 @@
return frappe.call({
doc: frm.doc,
method: 'fill_employee_details',
- callback: function(r) {
- if (r.docs[0].employees){
- frm.save();
- frm.refresh();
- if(r.docs[0].validate_attendance){
- render_employee_attendance(frm, r.message);
- }
+ }).then(r => {
+ if (r.docs && r.docs[0].employees){
+ frm.employees = r.docs[0].employees;
+ frm.dirty();
+ frm.save();
+ frm.refresh();
+ if(r.docs[0].validate_attendance){
+ render_employee_attendance(frm, r.message);
}
}
})
diff --git a/erpnext/payroll/module_onboarding/payroll/payroll.json b/erpnext/payroll/module_onboarding/payroll/payroll.json
index 7ed786f..b5226b2 100644
--- a/erpnext/payroll/module_onboarding/payroll/payroll.json
+++ b/erpnext/payroll/module_onboarding/payroll/payroll.json
@@ -13,7 +13,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources/payroll-entry",
"idx": 0,
"is_complete": 0,
- "modified": "2020-06-29 17:00:25.113341",
+ "modified": "2020-07-08 14:06:13.994310",
"modified_by": "Administrator",
"module": "Payroll",
"name": "Payroll",
@@ -44,8 +44,7 @@
"step": "Payroll Settings"
}
],
- "subtitle": "Salary, Compensations and more.",
- "success_message": "The Payroll is all set up!",
- "title": "Let's Setup the Payroll Module. ",
- "user_can_dismiss": 1
+ "subtitle": "Salary, Compensation, and more.",
+ "success_message": "The Payroll Module is all set up!",
+ "title": "Let's Set Up the Payroll Module. "
}
\ No newline at end of file
diff --git a/erpnext/payroll/onboarding_step/create_employee/create_employee.json b/erpnext/payroll/onboarding_step/create_employee/create_employee.json
index 5839ae6..3aa33c6 100644
--- a/erpnext/payroll/onboarding_step/create_employee/create_employee.json
+++ b/erpnext/payroll/onboarding_step/create_employee/create_employee.json
@@ -15,5 +15,5 @@
"reference_document": "Employee",
"show_full_form": 0,
"title": "Create Employee",
- "validate_action": 1
+ "validate_action": 0
}
\ No newline at end of file
diff --git a/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json b/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json
index b1a7cc2..4bae675 100644
--- a/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json
+++ b/erpnext/payroll/onboarding_step/create_payroll_period/create_payroll_period.json
@@ -8,7 +8,7 @@
"is_mandatory": 1,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-06-29 11:53:54.553947",
+ "modified": "2020-06-01 11:53:54.553947",
"modified_by": "Administrator",
"name": "Create Payroll Period",
"owner": "Administrator",
diff --git a/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json b/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json
index a7cf7bf..946b8c8 100644
--- a/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json
+++ b/erpnext/payroll/onboarding_step/payroll_settings/payroll_settings.json
@@ -1,19 +1,19 @@
{
- "action": "Update Settings",
+ "action": "Go to Page",
"creation": "2020-06-04 16:34:29.664917",
"docstatus": 0,
"doctype": "Onboarding Step",
"idx": 0,
"is_complete": 0,
"is_mandatory": 0,
- "is_single": 1,
+ "is_single": 0,
"is_skipped": 0,
- "modified": "2020-06-29 16:34:29.664917",
+ "modified": "2020-06-04 16:34:29.664917",
"modified_by": "Administrator",
"name": "Payroll Settings",
"owner": "Administrator",
- "reference_document": "Payroll Settings",
+ "path": "#Form/Payroll Settings",
"show_full_form": 0,
"title": "Payroll Settings",
- "validate_action": 0
+ "validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 905f6fb..3c56a63 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -1835,7 +1835,8 @@
if (doc.tax_category)
filters['tax_category'] = doc.tax_category;
-
+ if (doc.company)
+ filters['company'] = doc.company;
return {
query: "erpnext.controllers.queries.get_tax_template",
filters: filters
diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py
index e04228b..0c85a1b 100644
--- a/erpnext/selling/doctype/product_bundle/product_bundle.py
+++ b/erpnext/selling/doctype/product_bundle/product_bundle.py
@@ -26,7 +26,7 @@
def validate_child_items(self):
for item in self.items:
if frappe.db.exists("Product Bundle", item.item_code):
- frappe.throw(_("Child Item should not be a Product Bundle. Please remove item `{0}` and save").format(item.item_code))
+ frappe.throw(_("Row #{0}: Child Item should not be a Product Bundle. Please remove Item {1} and Save").format(item.idx, frappe.bold(item.item_code)))
@frappe.whitelist()
def get_new_item_code(doctype, txt, searchfield, start, page_len, filters):
diff --git a/erpnext/selling/module_onboarding/selling/selling.json b/erpnext/selling/module_onboarding/selling/selling.json
index 10a33c9..160208f 100644
--- a/erpnext/selling/module_onboarding/selling/selling.json
+++ b/erpnext/selling/module_onboarding/selling/selling.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/selling",
"idx": 0,
"is_complete": 0,
- "modified": "2020-06-01 13:35:16.100512",
+ "modified": "2020-07-08 14:05:37.669753",
"modified_by": "Administrator",
"module": "Selling",
"name": "Selling",
@@ -47,8 +47,7 @@
"step": "Selling Settings"
}
],
- "subtitle": "Products, Sales, Analysis and more.",
+ "subtitle": "Products, Sales, Analysis, and more.",
"success_message": "The Selling Module is all set up!",
- "title": "Let's Set Up the Selling Module.",
- "user_can_dismiss": 1
+ "title": "Let's Set Up the Selling Module."
}
\ No newline at end of file
diff --git a/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
index 557c905..9457dee 100644
--- a/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
+++ b/erpnext/selling/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
@@ -8,13 +8,13 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-05-19 18:54:19.383397",
+ "modified": "2020-07-04 12:33:16.970031",
"modified_by": "Administrator",
"name": "Setup your Warehouse",
"owner": "Administrator",
"path": "Tree/Warehouse",
"reference_document": "Warehouse",
"show_full_form": 0,
- "title": "Setup your Warehouse",
+ "title": "Set up your Warehouse",
"validate_action": 1
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_price/item_price.json b/erpnext/stock/doctype/item_price/item_price.json
index 2e0ddfd..5f62381 100644
--- a/erpnext/stock/doctype/item_price/item_price.json
+++ b/erpnext/stock/doctype/item_price/item_price.json
@@ -172,7 +172,7 @@
"default": "Today",
"fieldname": "valid_from",
"fieldtype": "Date",
- "label": "Valid From "
+ "label": "Valid From"
},
{
"default": "0",
@@ -187,7 +187,7 @@
{
"fieldname": "valid_upto",
"fieldtype": "Date",
- "label": "Valid Upto "
+ "label": "Valid Upto"
},
{
"fieldname": "section_break_24",
@@ -208,7 +208,7 @@
"icon": "fa fa-flag",
"idx": 1,
"links": [],
- "modified": "2020-02-28 14:21:25.580331",
+ "modified": "2020-07-06 22:31:32.943475",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Price",
diff --git a/erpnext/stock/doctype/item_tax/item_tax.json b/erpnext/stock/doctype/item_tax/item_tax.json
index a93e463..ae36efc 100644
--- a/erpnext/stock/doctype/item_tax/item_tax.json
+++ b/erpnext/stock/doctype/item_tax/item_tax.json
@@ -1,5 +1,4 @@
{
- "actions": [],
"creation": "2013-02-22 01:28:01",
"doctype": "DocType",
"editable_grid": 1,
@@ -38,8 +37,7 @@
],
"idx": 1,
"istable": 1,
- "links": [],
- "modified": "2019-12-28 21:54:40.807849",
+ "modified": "2020-06-25 01:40:28.859752",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Tax",
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 0af018b..1f30f5a 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -413,7 +413,7 @@
continue
out[item_code] = {}
item = frappe.get_cached_doc("Item", item_code)
- get_item_tax_template({"tax_category": tax_category}, item, out[item_code])
+ get_item_tax_template({"company": company, "tax_category": tax_category}, item, out[item_code])
out[item_code]["item_tax_rate"] = get_item_tax_map(company, out[item_code].get("item_tax_template"), as_json=True)
return out
@@ -442,7 +442,8 @@
taxes_with_no_validity = []
for tax in taxes:
- if tax.valid_from:
+ tax_company = frappe.get_value("Item Tax Template", tax.item_tax_template, 'company')
+ if tax.valid_from and tax_company == args['company']:
# In purchase Invoice first preference will be given to supplier invoice date
# if supplier date is not present then posting date
validation_date = args.get('transaction_date') or args.get('bill_date') or args.get('posting_date')
@@ -450,7 +451,8 @@
if getdate(tax.valid_from) <= getdate(validation_date):
taxes_with_validity.append(tax)
else:
- taxes_with_no_validity.append(tax)
+ if tax_company == args['company']:
+ taxes_with_no_validity.append(tax)
if taxes_with_validity:
taxes = sorted(taxes_with_validity, key = lambda i: i.valid_from, reverse=True)
diff --git a/erpnext/stock/module_onboarding/stock/stock.json b/erpnext/stock/module_onboarding/stock/stock.json
index 10f05d4..1d5bf8c 100644
--- a/erpnext/stock/module_onboarding/stock/stock.json
+++ b/erpnext/stock/module_onboarding/stock/stock.json
@@ -19,7 +19,7 @@
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/stock",
"idx": 0,
"is_complete": 0,
- "modified": "2020-06-29 16:41:09.440378",
+ "modified": "2020-07-08 14:22:07.951891",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock",
@@ -47,7 +47,7 @@
"step": "Stock Settings"
}
],
- "subtitle": "Inventory, Warehouses, Analysis and more.",
+ "subtitle": "Inventory, Warehouses, Analysis, and more.",
"success_message": "The Stock Module is all set up!",
"title": "Let's Set Up the Stock Module."
}
\ No newline at end of file
diff --git a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
index 4e753f4..7a64224 100644
--- a/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
+++ b/erpnext/stock/onboarding_step/create_a_supplier/create_a_supplier.json
@@ -8,7 +8,7 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-06-29 16:36:53.948242",
+ "modified": "2020-05-14 22:09:10.043554",
"modified_by": "Administrator",
"name": "Create a Supplier",
"owner": "Administrator",
diff --git a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
index 557c905..9457dee 100644
--- a/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
+++ b/erpnext/stock/onboarding_step/setup_your_warehouse/setup_your_warehouse.json
@@ -8,13 +8,13 @@
"is_mandatory": 0,
"is_single": 0,
"is_skipped": 0,
- "modified": "2020-05-19 18:54:19.383397",
+ "modified": "2020-07-04 12:33:16.970031",
"modified_by": "Administrator",
"name": "Setup your Warehouse",
"owner": "Administrator",
"path": "Tree/Warehouse",
"reference_document": "Warehouse",
"show_full_form": 0,
- "title": "Setup your Warehouse",
+ "title": "Set up your Warehouse",
"validate_action": 1
}
\ No newline at end of file