diff --git a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.json b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.json index 17b75493..5152ac5b 100644 --- a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.json +++ b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.json @@ -19,6 +19,65 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fieldname": "title", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Talk Title", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "default": "Pending Review", "fieldname": "status", "fieldtype": "Select", @@ -51,16 +110,16 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "title", - "fieldtype": "Data", + "fieldname": "speaker_details_section", + "fieldtype": "Section Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, "in_list_view": 0, - "in_standard_filter": 0, - "label": "Talk Title", + "in_standard_filter": 0, + "label": "Speaker Details", "length": 0, "no_copy": 0, "permlevel": 0, @@ -70,7 +129,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 1, + "reqd": 0, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -111,6 +170,36 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fieldname": "email", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Email", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "fieldname": "speaker_bio", "fieldtype": "Text", "hidden": 0, @@ -171,6 +260,66 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fieldname": "website_details_section", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Website Details", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "route", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Route", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "default": "1", "fieldname": "published", "fieldtype": "Check", @@ -202,7 +351,67 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "route", + "fieldname": "column_break_12", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "year", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Year", + "length": 0, + "no_copy": 0, + "options": "\n2018\n2017", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "discuss_link", "fieldtype": "Data", "hidden": 0, "ignore_user_permissions": 0, @@ -211,7 +420,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Route", + "label": "Discuss Link", "length": 0, "no_copy": 0, "permlevel": 0, @@ -238,7 +447,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-10-02 11:58:55.614084", + "modified": "2018-10-02 13:20:28.827852", "modified_by": "Administrator", "module": "ERPNext Foundation", "name": "Conference Talk Proposal", diff --git a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py index 0fff6ee5..abfc5fe6 100644 --- a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py +++ b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py @@ -17,6 +17,12 @@ class ConferenceTalkProposal(WebsiteGenerator): autoname = frappe.get_meta(self.get("doctype")).autoname or "" self.name = make_autoname(autoname) + def validate(self): + self.conference = '2018' + if self.owner not in ["Guest", "Administrator"] and not self.get("email") \ + and frappe.db.get_value("User", self.owner, "user_type") == "Website User": + self.email = frappe.db.get_value('User', self.owner, "email") + def get_list_context(context): context.title = 'Talk Proposals' context.no_breadcrumbs = 1