From 8a2b1bcb97524d06989b7310d34e38887bc25bdf Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Wed, 3 Jun 2015 17:50:35 +0530
Subject: [PATCH 1/9] [fix] bank reconciliation: fetch journal entry order by
posting date asc
---
.../doctype/bank_reconciliation/bank_reconciliation.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index fa178fea631..7dd021e8380 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -25,7 +25,8 @@ class BankReconciliation(Document):
where
t2.parent = t1.name and t2.account = %s
and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1
- and ifnull(t1.is_opening, 'No') = 'No' %s""" %
+ and ifnull(t1.is_opening, 'No') = 'No' %s
+ order by t1.posting_date""" %
('%s', '%s', '%s', condition), (self.bank_account, self.from_date, self.to_date), as_dict=1)
self.set('journal_entries', [])
From c9963f180583f6f52c0f4f79938e4675ec623cc5 Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Wed, 3 Jun 2015 18:01:00 +0530
Subject: [PATCH 2/9] [fix] journal entry against expense claim: pending amount
validation
---
.../accounts/doctype/journal_entry/journal_entry.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 1f296e5fa72..efbd1e9cd90 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import cstr, flt, fmt_money, formatdate, getdate, cint
+from frappe.utils import cstr, flt, fmt_money, formatdate, getdate
from frappe import msgprint, _, scrub
from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import AccountsController
@@ -428,12 +428,11 @@ class JournalEntry(AccountsController):
def validate_expense_claim(self):
for d in self.accounts:
if d.against_expense_claim:
- sanctioned_amount, reimbursed_amount = frappe.db.get_value("Expense Claim", d.against_expense_claim,
- ("total_sanctioned_amount", "total_amount_reimbursed"))
- pending_amount = cint(sanctioned_amount) - cint(reimbursed_amount)
+ sanctioned_amount, reimbursed_amount = frappe.db.get_value("Expense Claim",
+ d.against_expense_claim, ("total_sanctioned_amount", "total_amount_reimbursed"))
+ pending_amount = flt(sanctioned_amount) - flt(reimbursed_amount)
if d.debit > pending_amount:
- frappe.throw(_("Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. \
- Pending Amount is {2}".format(d.idx, d.against_expense_claim, pending_amount)))
+ frappe.throw(_("Row No {0}: Amount cannot be greater than Pending Amount against Expense Claim {1}. Pending Amount is {2}".format(d.idx, d.against_expense_claim, pending_amount)))
def validate_credit_debit_note(self):
if self.stock_entry:
From 6262496e70e85e7e349d47fff8a5905b237010ef Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Wed, 3 Jun 2015 18:33:47 +0530
Subject: [PATCH 3/9] [fix] item test case
---
erpnext/stock/doctype/item/test_item.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index 33778c97991..02ff714bdaf 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -90,7 +90,7 @@ class TestItem(unittest.TestCase):
"income_account": "Sales - _TC",
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"cost_center": "_Test Cost Center 2 - _TC",
- "qty": 0.0,
+ "qty": 1.0,
"price_list_rate": 100.0,
"base_price_list_rate": 0.0,
"discount_percentage": 0.0,
From 0b18a2d3475445e2e3bf80331c9fe5b907a5abdc Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Fri, 5 Jun 2015 12:01:29 +0530
Subject: [PATCH 4/9] Reset values in tools like Payment Tool
---
.../bank_reconciliation/bank_reconciliation.js | 7 +++++--
.../payment_reconciliation.js | 4 ++++
.../doctype/payment_tool/payment_tool.js | 1 +
.../doctype/payment_tool/payment_tool.json | 2 +-
.../report/gross_profit/gross_profit.py | 2 +-
.../leave_control_panel/leave_control_panel.js | 6 +++++-
.../leave_control_panel.json | 6 +++---
.../hr/doctype/salary_manager/salary_manager.js | 5 +++++
.../doctype/salary_manager/salary_manager.json | 3 ++-
.../upload_attendance/upload_attendance.js | 1 +
.../upload_attendance/upload_attendance.json | 17 ++++++++++-------
.../production_planning_tool.json | 4 +++-
erpnext/patches.txt | 1 +
erpnext/patches/v5_0/reset_values_in_tools.py | 11 +++++++++++
14 files changed, 53 insertions(+), 17 deletions(-)
create mode 100644 erpnext/patches/v5_0/reset_values_in_tools.py
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index c39550b6957..cd9d9d0f7e2 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -2,6 +2,10 @@
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Bank Reconciliation", {
+ refresh: function(frm) {
+ frm.disable_save();
+ },
+
update_clearance_date: function(frm) {
return frappe.call({
method: "update_details",
@@ -33,5 +37,4 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.set_value("from_date", frappe.datetime.month_start());
cur_frm.set_value("to_date", frappe.datetime.month_end());
-}
-
+}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index 71df6cf0c2d..1355ea49651 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -44,6 +44,10 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
}
});
},
+
+ refresh: function() {
+ this.frm.disable_save();
+ },
party: function() {
var me = this
diff --git a/erpnext/accounts/doctype/payment_tool/payment_tool.js b/erpnext/accounts/doctype/payment_tool/payment_tool.js
index cff0bd2f22b..6eefdb936c3 100644
--- a/erpnext/accounts/doctype/payment_tool/payment_tool.js
+++ b/erpnext/accounts/doctype/payment_tool/payment_tool.js
@@ -32,6 +32,7 @@ frappe.ui.form.on("Payment Tool", "onload", function(frm) {
});
frappe.ui.form.on("Payment Tool", "refresh", function(frm) {
+ frm.disable_save();
frappe.ui.form.trigger("Payment Tool", "party_type");
});
diff --git a/erpnext/accounts/doctype/payment_tool/payment_tool.json b/erpnext/accounts/doctype/payment_tool/payment_tool.json
index 909f9c49901..15cdb98948a 100644
--- a/erpnext/accounts/doctype/payment_tool/payment_tool.json
+++ b/erpnext/accounts/doctype/payment_tool/payment_tool.json
@@ -312,7 +312,7 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
- "modified": "2015-02-21 03:59:08.154966",
+ "modified": "2015-06-05 11:17:33.843334",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool",
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index dd7def8bd62..716cc3d4f62 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -14,7 +14,7 @@ def execute(filters=None):
source = gross_profit_data.grouped_data if filters.get("group_by") != "Invoice" else gross_profit_data.data
group_wise_columns = frappe._dict({
- "invoice": ["parent", "posting_date", "posting_time", "item_code", "item_name", "brand", "description", \
+ "invoice": ["parent", "customer", "posting_date", "posting_time", "item_code", "item_name", "brand", "description", \
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
"item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 8ab893a7ed3..3720f2f6361 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -24,4 +24,8 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
cur_frm.cscript.allocation_type = function (doc, cdt, cdn){
doc.no_of_days = '';
refresh_field('no_of_days');
-}
\ No newline at end of file
+}
+
+frappe.ui.form.on("Leave Control Panel", "refresh", function(frm) {
+ frm.disable_save();
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
index 2eb4eb6d576..dead10b93cb 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
@@ -94,11 +94,11 @@
}
],
"hide_heading": 0,
- "hide_toolbar": 0,
+ "hide_toolbar": 1,
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
- "modified": "2015-02-05 05:11:40.791976",
+ "modified": "2015-06-05 11:38:19.994852",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
@@ -110,7 +110,7 @@
"read": 1,
"report": 0,
"role": "HR User",
- "share": 1,
+ "share": 0,
"submit": 0,
"write": 1
}
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js
index 834f5d45145..240547c679a 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.js
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.js
@@ -43,3 +43,8 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
frappe.set_route("Form", doc.doctype, doc.name);
});
}
+
+
+frappe.ui.form.on("Salary Manager", "refresh", function(frm) {
+ frm.disable_save();
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.json b/erpnext/hr/doctype/salary_manager/salary_manager.json
index 21560a47c23..93ee138a048 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.json
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.json
@@ -150,10 +150,11 @@
"permlevel": 0
}
],
+ "hide_toolbar": 1,
"icon": "icon-cog",
"idx": 1,
"issingle": 1,
- "modified": "2015-02-25 07:21:04.778082",
+ "modified": "2015-06-05 11:33:00.152362",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Manager",
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index c0c8490c245..47ffec096b8 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -12,6 +12,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
},
refresh: function() {
+ this.frm.disable_save();
this.show_upload();
},
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.json b/erpnext/hr/doctype/upload_attendance/upload_attendance.json
index 195879d7c04..ab18f5d0a1e 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.json
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.json
@@ -1,4 +1,5 @@
{
+ "allow_copy": 1,
"creation": "2013-01-25 11:34:53",
"docstatus": 0,
"doctype": "DocType",
@@ -53,11 +54,13 @@
"permlevel": 0
}
],
+ "hide_heading": 0,
+ "hide_toolbar": 1,
"icon": "icon-upload-alt",
"idx": 1,
"issingle": 1,
"max_attachments": 1,
- "modified": "2015-02-05 05:11:48.540845",
+ "modified": "2015-06-05 11:37:04.348120",
"modified_by": "Administrator",
"module": "HR",
"name": "Upload Attendance",
@@ -65,25 +68,25 @@
"permissions": [
{
"create": 1,
- "email": 1,
+ "email": 0,
"permlevel": 0,
- "print": 1,
+ "print": 0,
"read": 1,
"report": 0,
"role": "HR User",
- "share": 1,
+ "share": 0,
"submit": 0,
"write": 1
},
{
"create": 1,
- "email": 1,
+ "email": 0,
"permlevel": 0,
- "print": 1,
+ "print": 0,
"read": 1,
"report": 0,
"role": "HR Manager",
- "share": 1,
+ "share": 0,
"submit": 0,
"write": 1
}
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
index f2c7cc7e142..e0ac26c6699 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.json
@@ -1,4 +1,5 @@
{
+ "allow_copy": 1,
"creation": "2013-01-21 12:03:47",
"default_print_format": "Standard",
"docstatus": 0,
@@ -154,11 +155,12 @@
"permlevel": 0
}
],
+ "hide_toolbar": 1,
"icon": "icon-calendar",
"idx": 1,
"in_create": 1,
"issingle": 1,
- "modified": "2015-02-05 05:11:43.010625",
+ "modified": "2015-06-05 11:44:31.629114",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Planning Tool",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 729221a35c7..139f49427c4 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -163,3 +163,4 @@ execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and mo
erpnext.patches.v5_0.update_item_and_description_again
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
erpnext.patches.v5_0.portal_fixes
+erpnext.patches.v5_0.reset_values_in_tools
\ No newline at end of file
diff --git a/erpnext/patches/v5_0/reset_values_in_tools.py b/erpnext/patches/v5_0/reset_values_in_tools.py
new file mode 100644
index 00000000000..2825e4fc649
--- /dev/null
+++ b/erpnext/patches/v5_0/reset_values_in_tools.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ for dt in ["Payment Tool", "Bank Reconciliation", "Payment Reconciliation", "Leave Control Panel",
+ "Salary Manager", "Upload Attenadance", "Production Planning Tool", "BOM Replace Tool"]:
+ frappe.db.sql("delete from `tabSingles` where doctype=%s", dt)
+
\ No newline at end of file
From 3c1017c43b03737a2f6295a1268243cb71cffe7a Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Fri, 5 Jun 2015 12:15:01 +0530
Subject: [PATCH 5/9] Removed deprecated page users
---
erpnext/patches.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 139f49427c4..2104f7bcf82 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -163,4 +163,5 @@ execute:frappe.db.sql_list("delete from `tabDocPerm` where parent='Issue' and mo
erpnext.patches.v5_0.update_item_and_description_again
erpnext.patches.v5_0.repost_gle_for_jv_with_multiple_party
erpnext.patches.v5_0.portal_fixes
-erpnext.patches.v5_0.reset_values_in_tools
\ No newline at end of file
+erpnext.patches.v5_0.reset_values_in_tools
+execute:frappe.delete_doc("Page", "users")
\ No newline at end of file
From 39669f2717e7b4b18c487d2158dde00208f56570 Mon Sep 17 00:00:00 2001
From: Neil Trini Lasrado
Date: Fri, 5 Jun 2015 12:17:46 +0530
Subject: [PATCH 6/9] operation made non mandatory in time log
---
erpnext/projects/doctype/time_log/time_log.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py
index f7b501d4519..a0fa23b64a7 100644
--- a/erpnext/projects/doctype/time_log/time_log.py
+++ b/erpnext/projects/doctype/time_log/time_log.py
@@ -195,8 +195,6 @@ class TimeLog(Document):
if self.for_manufacturing:
if not self.production_order:
frappe.throw(_("Production Order is Mandatory"))
- if not self.operation:
- frappe.throw(_("Operation is Mandatory"))
if not self.completed_qty:
self.completed_qty = 0
From 27d7f21553af709272cfb5ff5daecfe87c555408 Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Fri, 5 Jun 2015 15:09:37 +0530
Subject: [PATCH 7/9] [fix] pos profile link in Start POS page
---
erpnext/accounts/page/pos/pos_page.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/erpnext/accounts/page/pos/pos_page.html b/erpnext/accounts/page/pos/pos_page.html
index 98cce009ad4..5a4c538f17b 100644
--- a/erpnext/accounts/page/pos/pos_page.html
+++ b/erpnext/accounts/page/pos/pos_page.html
@@ -9,7 +9,7 @@
-
- {%= __("Make new POS Setting") %}
+
+ {%= __("Make new POS Profile") %}
From 6bf301f53c44692004d30b41ce3b551b0d19f5a3 Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Fri, 5 Jun 2015 15:49:25 +0530
Subject: [PATCH 8/9] Show item description in grid view based on 'In List
View' property
---
erpnext/templates/form_grid/includes/visible_cols.html | 2 +-
erpnext/templates/form_grid/item_grid.html | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/erpnext/templates/form_grid/includes/visible_cols.html b/erpnext/templates/form_grid/includes/visible_cols.html
index 285c1254b69..e9be40ceb2a 100644
--- a/erpnext/templates/form_grid/includes/visible_cols.html
+++ b/erpnext/templates/form_grid/includes/visible_cols.html
@@ -1,6 +1,6 @@
{% $.each(visible_columns || [], function(i, df) { %}
{% var val = doc.get_formatted(df.fieldname);
- if(val) { %}
+ if((df.fieldname !== "description") && val) { %}
{%= __(df.label) %}:
diff --git a/erpnext/templates/form_grid/item_grid.html b/erpnext/templates/form_grid/item_grid.html
index 9905f99480f..8ea3e7d72af 100644
--- a/erpnext/templates/form_grid/item_grid.html
+++ b/erpnext/templates/form_grid/item_grid.html
@@ -47,6 +47,12 @@
{% if(doc.item_name != doc.item_code) { %}
{%= doc.item_name %}{% } %}
+
+ {% if((doc.description != doc.item_code != doc.item_name) &&
+ in_list($.map(visible_columns, function(x, i) {return x.fieldname}), "description")) { %}
+
+ Description:
+ {%= doc.get_formatted("description") %}{% } %}
{% include "templates/form_grid/includes/visible_cols.html" %}
From 45994679396d6b492a163cd2c423952723873a35 Mon Sep 17 00:00:00 2001
From: Pratik Vyas
Date: Fri, 5 Jun 2015 16:26:49 +0600
Subject: [PATCH 9/9] bumped to version 5.0.18
---
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 1f6e8304fff..4d1f63eb394 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
from __future__ import unicode_literals
-__version__ = '5.0.17'
+__version__ = '5.0.18'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 73afe899f53..dd46af32019 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -5,7 +5,7 @@ app_publisher = "Frappe 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 = "5.0.17"
+app_version = "5.0.18"
error_report_email = "support@erpnext.com"
diff --git a/setup.py b/setup.py
index 96539e8ed00..d4a9356fae0 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
-version = "5.0.17"
+version = "5.0.18"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()