From 66833f109bba209e099c2eda7420a490a832fcc5 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 30 Jan 2019 19:37:46 +0530 Subject: [PATCH 1/4] fix(accounts): fetch subscription details only if required fields are populated --- erpnext/accounts/doctype/payment_request/payment_request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js index ef930d0497..2fce7dd6c2 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.js +++ b/erpnext/accounts/doctype/payment_request/payment_request.js @@ -54,7 +54,7 @@ frappe.ui.form.on("Payment Request", "is_a_subscription", function(frm) { 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}, From 76728b87ab68903e3eb790b69b79d8fad1ede2e6 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 31 Jan 2019 08:19:38 +0530 Subject: [PATCH 2/4] fix: value missing for selling settings - sales_update_frequency (#16530) --- .../setup_wizard/operations/install_fixtures.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index c732c4b479..6009bccb4d 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -263,10 +263,13 @@ def install(country=None): 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 @@ def set_more_defaults(): 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" From 7ea2497b9aa901685d3d0bf9505b80a5d18f9c39 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 31 Jan 2019 09:17:29 +0530 Subject: [PATCH 3/4] Fix salary patch (#16531) fix: salary structure assignment patch, add .vscode to gitignore --- .gitignore | 1 + .../salary_structure_assignment/salary_structure_assignment.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 16522447c2..473a621326 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ erpnext/docs/current *.swo __pycache__ *~ +.vscode/ node_modules/ \ No newline at end of file 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 cf0906687c..668e0ec471 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 @@ class SalaryStructureAssignment(Document): 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}") From fea55fc01804b150c711e1e125f30e6deb08ec49 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Thu, 31 Jan 2019 13:53:07 +0550 Subject: [PATCH 4/4] bumped to version 11.1.3 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 569f406ad1..d5f17c81ce 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe 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'''