diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_destination_title.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_destination_title.xml index 52be6b82aa65c4a249379add03b140ded547f1e8..7c013204e3a515c0e54889535471dc432be185d0 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_destination_title.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_destination_title.xml @@ -79,7 +79,7 @@ <dictionary> <item> <key> <string>base_category</string> </key> - <value> <string>destination</string> </value> + <value> <string>default_event_path_destination</string> </value> </item> <item> <key> <string>field_id</string> </key> diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_source_title.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_source_title.xml index d35b1450872d722eb74c76ccbc2c13fb6ea2c884..fce368f622916da4093a2786e4c69fc5665a557d 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_source_title.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Campaign_viewEventPath/my_default_event_path_source_title.xml @@ -10,6 +10,7 @@ <key> <string>delegated_list</string> </key> <value> <list> + <string>base_category</string> <string>editable</string> </list> </value> @@ -71,6 +72,10 @@ <key> <string>values</string> </key> <value> <dictionary> + <item> + <key> <string>base_category</string> </key> + <value> <string>default_event_path_source</string> </value> + </item> <item> <key> <string>editable</string> </key> <value> <int>1</int> </value> diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_countDefaultEventPathDestinationList.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_countDefaultEventPathDestinationList.xml index dc39a1916eac89a49033897c111202bfc4202ee0..442d020b9976a5f9a8a5840b62cf5f0ad38c3b2b 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_countDefaultEventPathDestinationList.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_countDefaultEventPathDestinationList.xml @@ -52,6 +52,9 @@ <key> <string>_body</string> </key> <value> <string>portal_catalog = context.getPortalObject().portal_catalog\n domain = context.getDefaultEventPathDestinationValue()\n +if domain is None:\n + return [[0]]\n +\n return portal_catalog.countResults(\n selection_domain={domain.getParentId(): (\'portal_domains\', domain.getRelativeUrl(),)})\n </string> </value> diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml index eb85575a330ff686a78517e46398130f570ca0de..d75b4ccfbd9868da3bb028ecb99450ab51d81744 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_createEventFromDefaultEventPath.xml @@ -52,16 +52,19 @@ <key> <string>_body</string> </key> <value> <string>portal = context.getPortalObject()\n domain = context.getDefaultEventPathDestinationValue()\n -event_path = context.getDefaultEventPathValue(portal_type="Event Path")\n \n -method_kw = {\'event_path\': event_path.getRelativeUrl(),\n - \'keep_draft\': keep_draft}\n -portal.portal_catalog.searchAndActivate("Entity_createEventFromDefaultEventPath",\n - selection_domain={domain.getParentId(): (\'portal_domains\', domain.getRelativeUrl())},\n - method_kw=method_kw)\n +if domain is None:\n + message = \'Recipients must be defined\'\n +else:\n + event_path = context.getDefaultEventPathValue(portal_type="Event Path")\n + method_kw = {\'event_path\': event_path.getRelativeUrl(),\n + \'keep_draft\': keep_draft}\n + portal.portal_catalog.searchAndActivate("Entity_createEventFromDefaultEventPath",\n + selection_domain={domain.getParentId(): (\'portal_domains\', domain.getRelativeUrl())},\n + method_kw=method_kw)\n + message = \'Events are being created in background\'\n \n -return context.Base_redirect(\n - keep_items={\'portal_status_message\': context.Base_translateString(\'Events are being created in background\')})\n +return context.Base_redirect(keep_items={\'portal_status_message\': context.Base_translateString(message)})\n </string> </value> </item> <item> diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision index e78e423d296152cb9e841cab70201228c7ba6ab3..b0c703c41aeb461a340aaf1f9b0cf3e7ef8dd773 100644 --- a/bt5/erp5_crm/bt/revision +++ b/bt5/erp5_crm/bt/revision @@ -1 +1 @@ -627 \ No newline at end of file +628 \ No newline at end of file