From 387e1e21cbe9f6379ec5836a2fcc821215d285ba Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Thu, 18 Dec 2014 11:36:23 +0530 Subject: [PATCH 1/4] add reload_doc in a few patches --- erpnext/patches/v4_1/fix_jv_remarks.py | 1 + erpnext/patches/v4_2/recalculate_bom_costs.py | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/patches/v4_1/fix_jv_remarks.py b/erpnext/patches/v4_1/fix_jv_remarks.py index 3b2f342231..99797e10f3 100644 --- a/erpnext/patches/v4_1/fix_jv_remarks.py +++ b/erpnext/patches/v4_1/fix_jv_remarks.py @@ -6,6 +6,7 @@ import frappe def execute(): reference_date = guess_reference_date() + frappe.reload_doc('accounts', 'doctype', 'journal_voucher_detail') for name in frappe.db.sql_list("""select name from `tabJournal Voucher` where date(creation)>=%s""", reference_date): jv = frappe.get_doc("Journal Voucher", name) diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py index c05fd03709..37f04131b0 100644 --- a/erpnext/patches/v4_2/recalculate_bom_costs.py +++ b/erpnext/patches/v4_2/recalculate_bom_costs.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doc('manufacturing', 'doctype', 'bom_operation') for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and exists(select bom_op.name from `tabBOM Operation` bom_op where bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1): From a04489a72b33b5b0d5489f55a9614f3dae07716f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 22 Dec 2014 14:58:36 +0530 Subject: [PATCH 2/4] minor fix no-copy --- erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index ec50b95fff..98e774804f 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -180,7 +180,7 @@ "fieldtype": "Data", "hidden": 0, "label": "Customer's Purchase Order No", - "no_copy": 1, + "no_copy": 0, "oldfieldname": "po_no", "oldfieldtype": "Data", "permlevel": 0, @@ -1013,7 +1013,7 @@ "idx": 1, "in_create": 0, "is_submittable": 1, - "modified": "2014-12-16 10:37:08.934881", + "modified": "2014-12-22 14:58:19.575566", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", From da4e3fb3662ec36916fbf3e3bb1bd61609dfe028 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 Dec 2014 10:58:01 +0530 Subject: [PATCH 3/4] fixed negative batch wty message --- .../stock/doctype/stock_ledger_entry/stock_ledger_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 7fdd440f2e..6202e9451a 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -39,8 +39,8 @@ class StockLedgerEntry(Document): (self.warehouse, self.item_code, self.batch_no))[0][0]) if batch_bal_after_transaction < 0: - frappe.throw(_("Negative balance in Batch {0} for Item {1} at Warehouse {2} on {3} {4}").format(\ - batch_bal_after_transaction - self.actual_qty, self.item_code, self.warehouse, + frappe.throw(_("Negative balance {0} in Batch {1} for Item {2} at Warehouse {3} on {4} {5}") + .format(batch_bal_after_transaction - self.actual_qty, self.batch_no, self.item_code, self.warehouse, formatdate(self.posting_date), self.posting_time)) def validate_mandatory(self): From f64d11da3c16c5d3ff08b99786a30af4c45093a4 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 23 Dec 2014 19:41:08 +0600 Subject: [PATCH 4/4] bumped to version 4.15.2 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 38f5230929..85c4e14d1e 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.1' +__version__ = '4.15.2' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 076dad6cd4..52e001c7fa 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.1" +app_version = "4.15.2" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 731141e14a..64e7b4deb7 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.1" +version = "4.15.2" with open("requirements.txt", "r") as f: install_requires = f.readlines()