diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index fa2f6b4695..edfd964f0c 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe -from frappe.utils import flt, getdate +from frappe.utils import flt, getdate, get_url from frappe import _ from frappe.model.document import Document @@ -36,7 +36,8 @@ class Project(Document): self.validate_dates() self.sync_tasks() self.tasks = [] - + self.send_welcome_email() + def validate_dates(self): if self.expected_start_date and self.expected_end_date: if getdate(self.expected_end_date) < getdate(self.expected_start_date): @@ -123,8 +124,26 @@ class Project(Document): from `tabPurchase Invoice Item` where project = %s and docstatus=1""", self.name) self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0 + + def send_welcome_email(self): + url = get_url("/project/{0}".format(self.name)) + messages = ( + _("You have been invited to collaborate on the project: {0}".format(self.name)), + url, + _("Join") + ) + content = """ +

{0}.

+

{2}

+ """ + for user in self.users: + if user.welcome_email_sent==0: + print user.welcome_email_sent + frappe.sendmail(user.user, subject=_("Project Collaboration Invitation"), content=content.format(*messages), bulk=True) + user.welcome_email_sent=1 + def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20): return frappe.db.sql('''select distinct project.* diff --git a/erpnext/projects/doctype/project_user/project_user.json b/erpnext/projects/doctype/project_user/project_user.json index f808701c68..39863fd725 100644 --- a/erpnext/projects/doctype/project_user/project_user.json +++ b/erpnext/projects/doctype/project_user/project_user.json @@ -33,6 +33,31 @@ "search_index": 1, "set_only_once": 0, "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "welcome_email_sent", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Welcome email sent", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "hide_heading": 0, @@ -44,7 +69,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-03-25 03:01:08.629640", + "modified": "2016-03-28 17:33:08.621181", "modified_by": "Administrator", "module": "Projects", "name": "Project User", @@ -54,5 +79,6 @@ "read_only": 0, "read_only_onload": 0, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json index fb1a71072b..21e68cc49c 100644 --- a/erpnext/projects/doctype/time_log/time_log.json +++ b/erpnext/projects/doctype/time_log/time_log.json @@ -19,6 +19,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Activity Type", @@ -43,6 +44,7 @@ "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Series", @@ -68,6 +70,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Project", @@ -93,6 +96,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Task", @@ -117,6 +121,7 @@ "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Status", @@ -141,6 +146,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -164,6 +170,7 @@ "fieldtype": "Datetime", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "From Time", @@ -188,6 +195,7 @@ "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, "label": "Hours", @@ -211,6 +219,7 @@ "fieldtype": "Datetime", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "To Time", @@ -234,6 +243,7 @@ "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billable", @@ -257,6 +267,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -279,6 +290,7 @@ "fieldtype": "Text Editor", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Note", @@ -302,6 +314,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -325,6 +338,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "User", @@ -350,6 +364,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Employee", @@ -375,6 +390,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -397,6 +413,7 @@ "fieldtype": "Check", "hidden": 1, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "For Manufacturing", @@ -422,6 +439,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -446,6 +464,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Production Order", @@ -472,6 +491,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Operation", @@ -498,6 +518,7 @@ "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Operation ID", @@ -523,6 +544,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -547,6 +569,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Workstation", @@ -574,6 +597,7 @@ "fieldtype": "Float", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Completed Qty", @@ -599,6 +623,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -624,6 +649,7 @@ "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Costing Rate based on Activity Type (per hour)", @@ -649,6 +675,7 @@ "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Costing Amount", @@ -673,6 +700,7 @@ "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -698,6 +726,7 @@ "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billing Rate based on Activity Type (per hour)", @@ -723,6 +752,7 @@ "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Additional Cost", @@ -749,6 +779,7 @@ "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Billing Amount", @@ -773,6 +804,7 @@ "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "length": 0, @@ -797,6 +829,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Time Log Batch", @@ -822,6 +855,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Sales Invoice", @@ -846,6 +880,7 @@ "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 1, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Amended From", @@ -870,6 +905,7 @@ "fieldtype": "Data", "hidden": 1, "ignore_user_permissions": 0, + "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, "label": "Title", @@ -897,7 +933,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-01-29 04:05:43.489154", + "modified": "2016-03-29 15:55:12.780956", "modified_by": "Administrator", "module": "Projects", "name": "Time Log", @@ -905,7 +941,7 @@ "permissions": [ { "amend": 1, - "apply_user_permissions": 0, + "apply_user_permissions": 1, "cancel": 1, "create": 1, "delete": 1, @@ -917,6 +953,8 @@ "print": 1, "read": 1, "report": 1, + "restrict": 0, + "restricted": 1, "role": "Projects User", "set_user_permissions": 0, "share": 1, @@ -937,6 +975,8 @@ "print": 1, "read": 1, "report": 1, + "restrict": 0, + "restricted": 0, "role": "Projects Manager", "set_user_permissions": 0, "share": 1, @@ -947,5 +987,6 @@ "read_only": 0, "read_only_onload": 0, "sort_order": "ASC", - "title_field": "title" + "title_field": "title", + "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/templates/includes/project_row.html b/erpnext/templates/includes/project_row.html index 3c7331bea4..fc264c1051 100644 --- a/erpnext/templates/includes/project_row.html +++ b/erpnext/templates/includes/project_row.html @@ -8,11 +8,10 @@
{% if doc.percent_complete %} -
+
- {{ doc.percent_complete|round|int }}% Complete
{% else %} diff --git a/erpnext/templates/includes/projects.css b/erpnext/templates/includes/projects.css index 99ec4c87d9..8c83e17881 100644 --- a/erpnext/templates/includes/projects.css +++ b/erpnext/templates/includes/projects.css @@ -4,24 +4,46 @@ text-decoration: underline; } -.page-container .indicator { +.page-container { font-weight: normal; + margin: 50px auto; + max-width: 700px; } +.project-item:hover { + background-color: #f7f7f7; +} + +.project-item { + color: #6c7680; + font-size: 14px; +} + +.task-subject +{ + margin: 0px; +} + +.item-timestamp +{ + font-size: 10px; +} .page-container .project-item { padding-top: 5px; padding-bottom: 5px; } #project-search { - border: none; + position: relative; + outline:none; + border:none; } -.task-link { +.task-link, .timelog-link { font-weight: bold; } -.task-link.seen { +.task-link.seen, .timelog-link.seen { font-weight: normal; } @@ -62,116 +84,12 @@ padding: 8px; } -.timeline-centered { - position: relative; - margin-bottom: 10px; +.gravatar-top{ + margin-top:8px; } -.timeline-centered:before { - content: ''; - position: absolute; - display: block; - width: 3px; - background: #f5f5f6; - /*left: 50%;*/ - top: 0px; - bottom: 0px; - margin-left: 10px; -} - -.timeline-centered .timeline-entry { - position: relative; - /*width: 50%; -float: right;*/ - margin-top: 5px; - margin-left: 10px; - margin-bottom: 5px; - clear: both; -} - - -.timeline-centered .timeline-entry .timeline-entry-inner { - position: relative; - margin-left: -3px; -} - - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon { - margin-top:14px; - background: #fff; - color: #737881; - display: block; - width: 10px; - height: 10px; - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; - text-align: center; - -moz-box-shadow: 0 0 0 2px #f5f5f6; - -webkit-box-shadow: 0 0 0 2px #f5f5f6; - box-shadow: 0 0 0 2px #f5f5f6; - line-height: 30px; - float: left; -} - - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-primary { - background-color: #303641; - color: #fff; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-secondary { - background-color: #ee4749; - color: #fff; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-success { - background-color: #98d85b; - color: #fff; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-info { - background-color: #21a9e1; - color: #fff; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-warning { - background-color: #ffa00a; - color: #fff; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon.bg-danger { - background-color: #ff5858; - color: #fff; -} - - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-label { - position: relative; - background: #f5f5f6; - padding: 1em; - margin-left: 40px; - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -.timeline-centered .timeline-entry .timeline-entry-inner .timeline-label:after { - content: ''; - display: block; - position: absolute; - width: 0; - height: 0; - border-style: solid; - border-width: 9px 9px 9px 0; - border-color: transparent #f5f5f6 transparent transparent; - left: 0; - top: 10px; - margin-left: -9px; -} +.progress-hg{ + margin-bottom: 0!important; + margin-top: 30px!important; + height:5px; +} \ No newline at end of file diff --git a/erpnext/templates/includes/projects/project_issues.html b/erpnext/templates/includes/projects/project_issues.html deleted file mode 100644 index f8924f5b3f..0000000000 --- a/erpnext/templates/includes/projects/project_issues.html +++ /dev/null @@ -1,28 +0,0 @@ -{%- from "templates/includes/projects/macros.html" import back_link -%} - -{% for issue in doc.issues %} - -{% endfor %} \ No newline at end of file diff --git a/erpnext/templates/includes/projects/project_search_box.html b/erpnext/templates/includes/projects/project_search_box.html index 59ebaa4d11..ab02f0c143 100644 --- a/erpnext/templates/includes/projects/project_search_box.html +++ b/erpnext/templates/includes/projects/project_search_box.html @@ -1,12 +1,21 @@ -