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''' 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): 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() 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