From 8a9daece7ec070a4628cea87561c685b1848016a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 26 Jul 2016 12:57:05 +0530 Subject: [PATCH 1/4] [Fix] Timesheet patch --- erpnext/patches/v7_0/calculate_total_costing_amount.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches/v7_0/calculate_total_costing_amount.py b/erpnext/patches/v7_0/calculate_total_costing_amount.py index f4269040748..3163517ef3a 100644 --- a/erpnext/patches/v7_0/calculate_total_costing_amount.py +++ b/erpnext/patches/v7_0/calculate_total_costing_amount.py @@ -10,5 +10,6 @@ def execute(): ts = frappe.get_doc('Timesheet', data.name) ts.update_cost() ts.calculate_total_amounts() + ts.flags.ignore_validate = True ts.flags.ignore_validate_update_after_submit = True ts.save() From 21a5658fdfe96dadb22cb3acc94b697d5ed50737 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 26 Jul 2016 15:03:41 +0530 Subject: [PATCH 2/4] [fix] fee component rename patch fix --- .../patches/v7_0/rename_fee_amount_to_fee_component.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py b/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py index 662a260753c..5cb6a3b7c43 100644 --- a/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py +++ b/erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py @@ -7,9 +7,10 @@ import frappe from frappe.model.utils.rename_field import rename_field def execute(): - frappe.rename_doc("DocType", "Fee Amount", "Fee Component") - for dt in ("Fees", "Fee Structure"): - frappe.reload_doctype(dt) - rename_field(dt, "amount", "components") + if frappe.db.exists("DocType", "Fee Amount"): + frappe.rename_doc("DocType", "Fee Amount", "Fee Component") + for dt in ("Fees", "Fee Structure"): + frappe.reload_doctype(dt) + rename_field(dt, "amount", "components") \ No newline at end of file From 17a9940f00b1fb8405ac147b70f99f4363426df2 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 26 Jul 2016 17:18:45 +0530 Subject: [PATCH 3/4] [minor][fix] end date should not be less or equal to start date --- .../doctype/maintenance_schedule/maintenance_schedule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py index 98212461295..4cbccafb152 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py @@ -58,7 +58,7 @@ class MaintenanceSchedule(TransactionBase): if no_email_sp: frappe.msgprint( frappe._("Setting Events to {0}, since the Employee attached to the below Sales Persons does not have a User ID{1}").format( - doc.owner, "
"+no_email_sp.join("
") + self.owner, "
"+no_email_sp.join("
") )) scheduled_date = frappe.db.sql("""select scheduled_date from @@ -153,7 +153,7 @@ class MaintenanceSchedule(TransactionBase): elif not d.sales_person: throw(_("Please select Incharge Person's name")) - if getdate(d.start_date) > getdate(d.end_date): + if getdate(d.start_date) >= getdate(d.end_date): throw(_("Start date should be less than end date for Item {0}").format(d.item_code)) def validate_sales_order(self): From 154be9b6935febf400e2cc85132376bc9a993fb2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 26 Jul 2016 18:32:38 +0600 Subject: [PATCH 4/4] bumped to version 7.0.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e0ce4fb7892..18501469a29 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.0.4' +__version__ = '7.0.5' def get_default_company(user=None): '''Get default company for user'''