diff --git a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.json b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.json index 64b055c4..54f1ffa5 100644 --- a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.json +++ b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "E-CON-2018-.###", + "autoname": "E-CON-.YYYY.-.###", "beta": 0, "creation": "2017-07-06 16:20:28.662095", "custom": 0, @@ -20,6 +20,38 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fieldname": "participant_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": "Participant 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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "fieldname": "participant_name", "fieldtype": "Data", "hidden": 0, @@ -52,6 +84,103 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fieldname": "column_break_3", + "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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "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, + "options": "User", + "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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "conference_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": "Conference 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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, "default": "", "fieldname": "conference", "fieldtype": "Select", @@ -150,8 +279,40 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "tshirt_size", - "fieldtype": "Select", + "fieldname": "paid", + "fieldtype": "Check", + "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": "Paid", + "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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_10", + "fieldtype": "Column Break", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -159,10 +320,8 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "T-Shirt Size", "length": 0, "no_copy": 0, - "options": "S\nM\nL\nXL\nXXL\nXXXL", "permlevel": 0, "precision": "", "print_hide": 0, @@ -183,19 +342,52 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "currency", + "fieldname": "tshirt_size", "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, "in_standard_filter": 0, - "label": "Currency", + "label": "T-Shirt Size", "length": 0, "no_copy": 0, - "options": "USD\nINR", + "options": "S\nM\nL\nXL\nXXL\nXXXL", + "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, + "translatable": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_in_quick_entry": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "currency", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "options": "USD\nINR", "permlevel": 0, "precision": "", "print_hide": 0, @@ -216,16 +408,16 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "amount", - "fieldtype": "Currency", + "fieldname": "amount", + "fieldtype": "Currency", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 1, "in_standard_filter": 0, - "label": "Amount", + "label": "Amount", "length": 0, "no_copy": 0, "permlevel": 0, @@ -235,39 +427,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "paid", - "fieldtype": "Check", - "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": "Paid", - "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, + "reqd": 1, "search_index": 0, "set_only_once": 0, "translatable": 0, @@ -316,7 +476,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-07-12 16:12:42.283557", + "modified": "2018-10-02 12:44:37.868959", "modified_by": "Administrator", "module": "ERPNext Foundation", "name": "Conference Participant", diff --git a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py index e664d0b6..86e61823 100644 --- a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py +++ b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py @@ -9,9 +9,12 @@ from frappe.model.document import Document class ConferenceParticipant(Document): 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 validate_payment(self): - self.amount = self.full_conference_tickets * (4000 if self.currency=='INR' else 60) + self.amount = self.full_conference_tickets * (4000 if self.currency == 'INR' else 60) def on_payment_authorized(self, status_changed_to=None): self.paid = 1 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 240cebb2..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 @@ -3,7 +3,7 @@ "allow_guest_to_view": 1, "allow_import": 0, "allow_rename": 0, - "autoname": "field:title", + "autoname": "TALK-.YYYY.-.###", "beta": 0, "creation": "2017-07-06 14:56:52.586022", "custom": 0, @@ -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": 1, - "in_standard_filter": 0, - "label": "Talk Title", + "in_list_view": 0, + "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, @@ -118,7 +207,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, "in_standard_filter": 0, "label": "Speaker Bio", "length": 0, @@ -148,7 +237,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 1, + "in_list_view": 0, "in_standard_filter": 0, "label": "Talk Summary", "length": 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": "2017-07-11 15:37:52.074765", + "modified": "2018-10-02 13:20:28.827852", "modified_by": "Administrator", "module": "ERPNext Foundation", "name": "Conference Talk Proposal", @@ -247,7 +456,6 @@ "permissions": [ { "amend": 0, - "apply_user_permissions": 0, "cancel": 0, "create": 1, "delete": 1, @@ -273,6 +481,8 @@ "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "title_field": "title", "track_changes": 1, - "track_seen": 0 + "track_seen": 0, + "track_views": 0 } \ No newline at end of file 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 a49751bc..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 @@ -5,12 +5,23 @@ from __future__ import unicode_literals import frappe from frappe.website.website_generator import WebsiteGenerator +from frappe.model.naming import make_autoname class ConferenceTalkProposal(WebsiteGenerator): def get_context(self, context): context.show_sidebar = 1 context.website_sidebar = 'Conference 2017 Sidebar' + def autoname(self): + ''' autoname = TALK-.YYYY.-.### ''' + 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'