Commit 14ece076 authored by Aurel's avatar Aurel

define a system pref

parent d02a1b0c
...@@ -162,6 +162,7 @@ return {\'now\': DateTime(),\n ...@@ -162,6 +162,7 @@ return {\'now\': DateTime(),\n
\'outgoing_event_howto_ticket_comment\': \'ZUITE-TEST-OUTGOING-EVENT-TICKET-COMMENT This is a comment of a ticket\',\n \'outgoing_event_howto_ticket_comment\': \'ZUITE-TEST-OUTGOING-EVENT-TICKET-COMMENT This is a comment of a ticket\',\n
\'outgoing_event_howto_ticket_content\': \'ZUITE-TEST-OUTGOING-EVENT-TICKET-CONTENT This is the content of the ticket\',\n \'outgoing_event_howto_ticket_content\': \'ZUITE-TEST-OUTGOING-EVENT-TICKET-CONTENT This is the content of the ticket\',\n
\'howto_preference_id\': \'zuite_erp5_ui_test_preference\',\n \'howto_preference_id\': \'zuite_erp5_ui_test_preference\',\n
\'howto_system_preference_id\': \'zuite_erp5_ui_test_system_preference\',\n
\'full_text_person_title\': \'ZUITE_TEST_FULL_TEXT_PERSON_TITLE_001\',\n \'full_text_person_title\': \'ZUITE_TEST_FULL_TEXT_PERSON_TITLE_001\',\n
\'full_text_person_reference\': \'ZUITE_TEST_FULL_TEXT_PERSON_REFERENCE_001\',\n \'full_text_person_reference\': \'ZUITE_TEST_FULL_TEXT_PERSON_REFERENCE_001\',\n
\'full_text_person_email\': \'ZUITE_TEST_FULL_TEXT_PERSON_REFERENCE_001@tiolive.com\',\n \'full_text_person_email\': \'ZUITE_TEST_FULL_TEXT_PERSON_REFERENCE_001@tiolive.com\',\n
......
...@@ -112,6 +112,16 @@ if isTransitionPossible(pref, \'enable\'):\n ...@@ -112,6 +112,16 @@ if isTransitionPossible(pref, \'enable\'):\n
\n \n
pref.setPreferredTextEditor(\'text_area\')\n pref.setPreferredTextEditor(\'text_area\')\n
\n \n
sys_pref = getattr(context.portal_preferences, howto_dict[\'howto_preference_id\'], None)\n
if pref is None:\n
sys_pref = context.portal_preferences.newContent(portal_type="System Preference",\n
preferred_event_sender_email=("test@nexedi.com",),\n
id=howto_dict[\'howto_sys_preference_id\'])\n
\n
sys_pref.setPreferredEventSenderEmail("test@nexedi.com",)\n
if isTransitionPossible(sys_pref, \'enable\'):\n
sys_pref.enable()\n
\n
context.portal_caches.clearAllCache()\n context.portal_caches.clearAllCache()\n
\n \n
return "Init Ok"\n return "Init Ok"\n
......
788 789
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment