Merge branch 'develop'

This commit is contained in:
Rushabh Mehta 2016-07-26 18:02:38 +05:30
commit 6fe4a336f1
4 changed files with 9 additions and 7 deletions

View File

@ -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'''

View File

@ -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, "<br>"+no_email_sp.join("<br>")
self.owner, "<br>"+no_email_sp.join("<br>")
))
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):

View File

@ -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()

View File

@ -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")