Merge branch 'master' into develop
diff --git a/.gitignore b/.gitignore
index 630effc..652fbdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,5 @@
__pycache__
*~
.idea/
+.vscode/
node_modules/
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index aa0dfad..5d93aaf 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
-__version__ = '11.1.2'
+__version__ = '11.1.3'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js
index bd021b1..a455e74 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.js
+++ b/erpnext/accounts/doctype/payment_request/payment_request.js
@@ -54,7 +54,7 @@
frm.toggle_reqd("payment_gateway_account", frm.doc.is_a_subscription);
frm.toggle_reqd("subscription_plans", frm.doc.is_a_subscription);
- if (frm.doc.is_a_subscription) {
+ if (frm.doc.is_a_subscription && frm.doc.reference_doctype && frm.doc.reference_name) {
frappe.call({
method: "erpnext.accounts.doctype.payment_request.payment_request.get_subscription_details",
args: {"reference_doctype": frm.doc.reference_doctype, "reference_name": frm.doc.reference_name},
diff --git a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py
index cf09066..668e0ec 100644
--- a/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py
+++ b/erpnext/hr/doctype/salary_structure_assignment/salary_structure_assignment.py
@@ -20,7 +20,7 @@
if self.from_date:
if frappe.db.exists("Salary Structure Assignment", {"employee": self.employee, "from_date": self.from_date, "docstatus": 1}):
- frappe.throw("Salary Structure Assignment for Employee already exists")
+ frappe.throw(_("Salary Structure Assignment for Employee already exists"), DuplicateAssignment)
if joining_date and getdate(self.from_date) < joining_date:
frappe.throw(_("From Date {0} cannot be before employee's joining Date {1}")
diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py
index c732c4b..6009bcc 100644
--- a/erpnext/setup/setup_wizard/operations/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py
@@ -263,10 +263,13 @@
def set_more_defaults():
# Do more setup stuff that can be done here with no dependencies
-
- # set default customer group and territory
selling_settings = frappe.get_doc("Selling Settings")
selling_settings.set_default_customer_group_and_territory()
+ selling_settings.cust_master_name = "Customer Name"
+ selling_settings.so_required = "No"
+ selling_settings.dn_required = "No"
+ selling_settings.allow_multiple_items = 1
+ selling_settings.sales_update_frequency = "Each Transaction"
selling_settings.save()
add_uom_data()
@@ -276,14 +279,6 @@
doc.set_default_fields()
doc.save()
- selling_settings = frappe.get_doc("Selling Settings")
- selling_settings.cust_master_name = "Customer Name"
- selling_settings.so_required = "No"
- selling_settings.dn_required = "No"
- selling_settings.allow_multiple_items = 1
- selling_settings.sales_update_frequency = "Each Transaction"
- selling_settings.save()
-
buying_settings = frappe.get_doc("Buying Settings")
buying_settings.supp_master_name = "Supplier Name"
buying_settings.po_required = "No"