Added patch

This commit is contained in:
Rohit Waghchaure 2019-01-17 19:26:25 +05:30
parent 425dff93d7
commit 7e71e132a3
3 changed files with 18 additions and 5 deletions

View File

@ -580,4 +580,5 @@ erpnext.patches.v11_0.update_delivery_trip_status
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code
erpnext.patches.v11_0.rename_bom_wo_fields
erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
erpnext.patches.v11_0.renamed_from_to_fields_in_project

View File

@ -0,0 +1,13 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc('projects', 'doctype', 'project')
if frappe.db.has_column('Project', 'from'):
rename_field('Project', 'from', 'from_time')
rename_field('Project', 'to', 'to_time')

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
import frappe
import datetime
from frappe import _
from six import iteritems
from email_reply_parser import EmailReplyParser
@ -476,7 +475,7 @@ def send_project_update_email_to_users(project):
"naming_series": "UPDATE-.project.-.YY.MM.DD.-",
}).insert()
subject = "<b>Project %s</b> update your project status" % (project)
subject = "For project %s, update your status" % (project)
incoming_email_account = frappe.db.get_value('Email Account',
dict(enable_incoming=1, default_incoming=1), 'email_id')
@ -490,7 +489,7 @@ def send_project_update_email_to_users(project):
)
def collect_project_status():
for data in frappe.get_all("Project Update",
for data in frappe.get_all("Project Update",
{'date': today(), 'sent': 0}):
replies = frappe.get_all('Communication',
fields=['content', 'text_content', 'sender'],
@ -517,7 +516,7 @@ def collect_project_status():
doc.save(ignore_permissions=True)
def send_project_status_email_to_users():
yesterday = today()
yesterday = add_days(today(), -1)
for d in frappe.get_all("Project Update",
{'date': yesterday, 'sent': 0}):