Commit 6b945473 authored by Rafael Monnerat's avatar Rafael Monnerat

Update upstream

parents 554f3126 c9c2bd8b
Pipeline #31424 failed with stage
in 0 seconds

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

Changes
=======
0.4.75 (2023-11-15)
-------------------
* testnode:
- make ``killall`` support processes with changed title
0.4.74 (2022-05-13)
-------------------
......
......@@ -54,7 +54,7 @@ def sort(x,y):
return cmp(display(x), display(y))
def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,
user_name=None, simulation_state=None):
simulation_state=None):
"""Returns a list of Account path items. """
if category is not None:
cat = portal.portal_categories.resolveCategory(category)
......@@ -78,9 +78,13 @@ def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,
# wrap the previous method in a cache, including the cache cookie that
# we reset everytime and account is validated or invalidated.
cache_cookie = portal.account_module.getCacheCookie('account_list')
getItemList = CachingMethod(getItemList,
id='AccountingTransactionLine_getNodeItemList-%s' % cache_cookie,
cache_factory='erp5_content_long')
getItemList = CachingMethod(
getItemList,
id='AccountingTransactionLine_getNodeItemList-%s-%s-%s' % (
cache_cookie,
getSecurityManager().getUser().getIdOrUserName(),
portal.portal_preferences.getPreferredAccountNumberMethod()),
cache_factory='erp5_content_long')
# the cache vary with the simulation state of the current transaction,
# to display all accounts when the transaction is already delivered.
......@@ -91,7 +95,6 @@ item_list = getItemList( category=category,
portal_path=context.getPortalObject().getPhysicalPath(),
mirror=mirror,
omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter
user_name=getSecurityManager().getUser().getIdOrUserName(),
simulation_state=simulation_state)
# make sure that the current value is included in this list, this is
......
......@@ -4,7 +4,8 @@ Used as a fast input dialog action.
from Products.CMFCore.WorkflowCore import WorkflowException
portal = context.getPortalObject()
Base_translateString = portal.Base_translateString
psm = Base_translateString('Nothing matches.')
portal_status_message = Base_translateString('Nothing matches.')
portal_status_level = 'error'
request = container.REQUEST
# update selected uids
......@@ -54,8 +55,9 @@ if grouping == 'grouping':
grouped_line_list = context.AccountingTransaction_guessGroupedLines(
accounting_transaction_line_uid_list=uids)
if grouped_line_list:
psm = Base_translateString('${grouped_line_count} lines grouped.',
portal_status_message = Base_translateString('${grouped_line_count} lines grouped.',
mapping=dict(grouped_line_count=len(grouped_line_list)))
portal_status_level = 'success'
# make sure nothing will be checked next time
portal.portal_selections.setSelectionCheckedUidsFor(list_selection_name, [])
......@@ -121,14 +123,14 @@ else:
# to know the number of ungrouped lines.
ungrouped_line_list.extend(line.AccountingTransactionLine_resetGroupingReference(async=False))
psm = Base_translateString('${ungrouped_line_count} lines ungrouped.',
portal_status_message = Base_translateString('${ungrouped_line_count} lines ungrouped.',
mapping=dict(ungrouped_line_count=len(ungrouped_line_list)))
portal_status_level = 'success'
# make sure nothing will be checked next time
portal.portal_selections.setSelectionCheckedUidsFor(list_selection_name, [])
return context.Base_renderForm(
'AccountingTransactionModule_viewGroupingFastInputDialog',
REQUEST=request,
keep_items={'portal_status_message': psm}
keep_items={'portal_status_message': portal_status_message, 'portal_status_level': portal_status_level}
)
......@@ -96,6 +96,7 @@
<string>listbox_title</string>
<string>listbox_credit</string>
<string>listbox_debit</string>
<string>listbox_mirror_node_title</string>
</list>
</value>
</item>
......
......@@ -184,6 +184,10 @@
<string>Movement_getMirrorSectionTitle</string>
<string>Third Party</string>
</tuple>
<tuple>
<string>mirror_node_title</string>
<string>Third Party Account</string>
</tuple>
</list>
</value>
</item>
......
mirror_node_formatted_title = ''
if context.mirror_node_uid:
brain_list = context.getPortalObject().portal_catalog(
uid=context.mirror_node_uid,
portal_type='Account',
limit=2,
)
if brain_list:
brain, = brain_list
mirror_node_formatted_title = brain.getObject().Account_getFormattedTitle()
return mirror_node_formatted_title
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Brain_getMirrorNodeFormattedTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -3,7 +3,7 @@ from Products.ERP5Type.Message import translateString
internal_invoice = state_change['object']
old_state = state_change['old_state']
if old_state.getId() == 'draft':
if old_state.getReference() == 'draft':
if internal_invoice.InternalInvoiceTransaction_getAuthenticatedUserSection() == internal_invoice.getDestinationSection():
raise ValidationFailed(translateString("Your entity should not be destination."))
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_group_dialog_show_mirror_account.html</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Grouping Dialog show mirror account</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Grouping Dialog show mirror account
</td></tr>
</thead><tbody tal:define="init_method string:AccountingTransactionModule_createAccountingTransactionList?add_draft_transactions:int=0&internal_transactions:bool=True">
<!-- Setup {{{ -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForAccountingRenderjsUi/macros/init"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_module_list" />
<tal:block tal:define="click_configuration python: {'text': 'Organisations'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tal:block tal:define="search_query python: 'title: &quot;Client 1&quot;'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<!-- {{{ Select Client 1 Organisation and use grouping fast input -->
<tal:block tal:define="click_configuration python: {'text': 'Client 1'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Actions'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Grouping Reference Fast Input'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- }}} -->
<!-- The mode should be 'grouping' by default -->
<tr>
<td>assertValue</td>
<td>//input[@name='field_your_grouping' and @value='grouping']</td>
<td>on</td>
</tr>
<tr>
<td>assertText</td>
<td>//label[contains(text(),"Total Selected Amount")]/../div[1]/</td>
<td>0.00</td>
</tr>
<tr>
<td>select</td>
<td>field_your_node</td>
<td>value=account_module/receivable</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(3)', 'footer': '3 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block tal:define="line_configuration python: {'line': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" />
</tal:block>
<tal:block tal:define="line_configuration python: {'line': 2}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/select_listbox_line" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'error',
'text': 'Nothing matches.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr>
<td>assertText</td>
<td>//label[contains(text(),"Total Selected Amount")]/../div[1]/</td>
<td>0.00</td>
</tr>
<!-- the "Third Party Account" columns helps understanding why grouping is refused -->
<tr>
<td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//th[10]</td>
<td>Third Party Account</td>
</tr>
<tr>
<td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//tbody/tr[1]/td[10]</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//tbody/tr[2]/td[10]</td>
<td>40 - Payable</td>
</tr>
<tr>
<td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//tbody/tr[3]/td[10]</td>
<td>7 - Goods Sales</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -87,7 +87,7 @@ Grouping from account transaction view
<!-- Not possible to group for now -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
<tal:block tal:define="notification_configuration python: {'class': 'error',
'text': 'Nothing matches.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
......
......@@ -80,6 +80,10 @@
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>O-CLI1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_group_dialog_show_mirror_account.html</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html>
<head><title>Grouping Dialog show mirror account</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="4">
Grouping Dialog show mirror account
</td></tr>
</thead><tbody tal:define="init_method string:AccountingTransactionModule_createAccountingTransactionList?add_draft_transactions:int=0&internal_transactions:bool=True">
<tal:block metal:use-macro="here/ERP5Site_viewAccountingZuiteCommonTemplate/macros/init"/>
<tr>
<td>selectAndWait</td>
<td>select_module</td>
<td>Organisations</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Folder_show:method</td>
<td></td>
</tr>
<tr>
<td>type</td>
<!-- title -->
<td>//tr[@class='listbox-search-line']/th[2]/input</td>
<td>Client 1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@class="listbox-select-action"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Client 1</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='Grouping Reference Fast Input']</td>
<td></td>
</tr>
<tr>
<td>verifySelected</td>
<td>//select[@name='field_your_section_category']</td>
<td>Demo Group</td>
</tr>
<tr>
<td>verifyText</td>
<td>//label[contains(text(),"Total Selected Amount")]/../div[1]/</td>
<td>0.00</td>
</tr>
<tr>
<td>select</td>
<td>field_your_node</td>
<td>label=41 - Receivable</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@id="dialog_update_button"]</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Updated</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//span[@class="listbox-current-page-total-number"]</td>
<td>3 records</td>
</tr>
<tr>
<td>click</td>
<td>//tr[@class='listbox-data-line-1 DataB']/td[1]/input</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//tr[@class='listbox-data-line-2 DataA']/td[1]/input</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@id="dialog_submit_button"]</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Nothing matches.</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>//label[contains(text(),"Total Selected Amount")]/../div[1]/</td>
<td>0.00</td>
</tr>
<!-- the "Third Party Account" columns helps understanding why grouping is refused -->
<tr>
<td>assertText</td>
<td>//th[@class="listbox-table-header-cell"][10]</td>
<td>Third Party Account</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-0 DataA']/td[11]</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-1 DataB']/td[11]</td>
<td>40 - Payable</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-2 DataA']/td[11]</td>
<td>7 - Goods Sales</td>
</tr>
<!-- This also works when using "Account Reference" for account number method -->
<tr>
<td>open</td>
<td>${base_url}/PreferenceTool_setAccountingTestAccountReferencePreference</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Preference Set</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>select_module</td>
<td>Organisations</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Folder_show:method</td>
<td></td>
</tr>
<tr>
<td>type</td>
<!-- title -->
<td>//tr[@class='listbox-search-line']/th[2]/input</td>
<td>Client 1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@class="listbox-select-action"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Client 1</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='Grouping Reference Fast Input']</td>
<td></td>
</tr>
<tr>
<td>verifySelected</td>
<td>field_your_node</td>
<td>label=A-REC - Receivable</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-0 DataA']/td[11]</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-1 DataB']/td[11]</td>
<td>A-PAY - Payable</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -13,9 +13,9 @@ business_process = portal.portal_catalog.getResultValue(
portal_type='Business Process').getRelativeUrl()
# if the previous test didn't change input data, no need to recreate content
current_script_data_id = '%s_month_count_%s_draft_%s_state_%s_payment_%s_leger_%s_both_sections_%s' % (
current_script_data_id = '%s_month_count_%s_draft_%s_state_%s_payment_%s_leger_%s_both_sections_%s_internal_transactions_%s' % (
month_count, add_draft_transactions, transaction_state,
add_related_payments, set_ledger, both_sections, script.getId())
add_related_payments, set_ledger, both_sections, internal_transactions, script.getId())
if accounting_module.getProperty('current_content_script',
'') == current_script_data_id:
......@@ -274,6 +274,66 @@ for section in section_list:
source=getAccountByTitle('Goods Sales'),
quantity=random.randint(300, 400),)
if internal_transactions:
allowed_accounting_type_list = portal.portal_types['Accounting Transaction Module'].getTypeAllowedContentTypeList()
if 'Internal Invoice Transaction' not in allowed_accounting_type_list:
portal.portal_types['Accounting Transaction Module'].setTypeAllowedContentTypeList(
tuple(allowed_accounting_type_list) + ('Internal Invoice Transaction',))
tr = accounting_module.newContent(
portal_type='Internal Invoice Transaction',
title='Internal Transaction 1',
source_section=getOrganisationByTitle('My Organisation'),
destination_section=getOrganisationByTitle('Client 1'),
created_by_builder=1,
start_date=DateTime(2005, 6, 1),
stop_date=DateTime(2005, 6, 1),
resource=euro_resource,
)
tr.newContent(
portal_type='Internal Invoice Transaction Line',
source=getAccountByTitle('Receivable'),
destination=getAccountByTitle('Payable'),
quantity=100,
)
tr.newContent(
portal_type='Internal Invoice Transaction Line',
source=getAccountByTitle('Goods Sales'),
destination=getAccountByTitle('Goods Purchase'),
quantity=-100,
)
tr.start()
tr.stop()
tr.deliver()
tr = accounting_module.newContent(
portal_type='Internal Invoice Transaction',
title='Internal Transaction 2',
source_section=getOrganisationByTitle('Client 1'),
destination_section=getOrganisationByTitle('My Organisation'),
created_by_builder=1,
start_date=DateTime(2005, 6, 2),
stop_date=DateTime(2005, 6, 2),
resource=euro_resource,
)
tr.newContent(
portal_type='Internal Invoice Transaction Line',
source=getAccountByTitle('Goods Sales'),
destination=getAccountByTitle('Receivable'),
quantity=100,
)
tr.newContent(
portal_type='Internal Invoice Transaction Line',
source=getAccountByTitle('Goods Sales'),
destination=getAccountByTitle('Goods Purchase'),
quantity=-100,
)
tr.start()
tr.stop()
tr.deliver()
accounting_module.setProperty('current_content_script',
current_script_data_id)
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>month_count=1, add_draft_transactions=1, transaction_state=\'validated\', add_related_payments=0, keep_grouping_reference=0, set_ledger=0, both_sections=0</string> </value>
<value> <string>month_count=1, add_draft_transactions=1, transaction_state=\'validated\', add_related_payments=0, keep_grouping_reference=0, set_ledger=0, both_sections=0, internal_transactions=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -49,14 +49,14 @@ class OOoDocumentExtensibleTraversableMixin(BaseExtensibleTraversableMixin):
web_cache_kw = {'name': name,
'format': EMBEDDED_FORMAT}
try:
self._convert(format='html')
view = _ViewEmulator().__of__(self)
# call caching policy manager.
_setCacheHeaders(view, web_cache_kw)
# If we have a conditional get, set status 304 and return
# no content
if _checkConditionalGET(view, web_cache_kw):
return ''
# call caching policy manager.
_setCacheHeaders(view, web_cache_kw)
self._convert(format='html')
mime, data = self.getConversion(format=EMBEDDED_FORMAT, filename=name)
document = OFSFile(name, name, data, content_type=mime).__of__(self.aq_parent)
except (NotConvertedError, ConversionError, KeyError):
......
......@@ -71,6 +71,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
'erp5_dms',
'erp5_accounting',
'erp5_crm',
'erp5_graph_editor',
'erp5_simplified_invoicing',
'erp5_trade_knowledge_pad',
'erp5_crm_knowledge_pad',
......
......@@ -6,6 +6,7 @@ bt5_installation_list = ('erp5_dhtml_style',
'erp5_dms',
'erp5_accounting',
'erp5_crm',
'erp5_graph_editor',
'erp5_simplified_invoicing',
'erp5_trade_knowledge_pad',
'erp5_crm_knowledge_pad',
......
......@@ -74,6 +74,11 @@ class TestERP5Form(ERP5TypeTestCase):
self.assertTrue(self.form.formUnProxify())
self.assertTrue(self.form.formShowRelatedProxyFields())
def test_zmi_form_order_disabled_fields(self):
self.assertIn('my_string_field', self.form.formOrder())
self.form.my_string_field.values['enabled'] = False
self.assertIn('my_string_field', self.form.formOrder())
def test_publish_set_content_type(self):
resp = self.publish(self.form.getPath())
self.assertIn(b"test string field", resp.getBody())
......
......@@ -851,6 +851,62 @@ class TestRestrictedPythonSecurity(ERP5TypeTestCase):
return ip_interface(u'2a01:cb14:818:0:7312:e251:f251:ffbe').with_prefixlen
''')
def testPytzNonExistentTimeError(self):
"""
Test if we can import NonExistentTimeError from the
pytz package. This is important to catch exceptions
which can be raised by pandas tz_localize, see:
https://pandas.pydata.org/pandas-docs/version/2.0.3/reference/api/pandas.Series.tz_localize.html
Test data/structure taken from
https://github.com/pandas-dev/pandas/blob/c1f673b71d2a4a7d11cb05d4803f279914c543d4/pandas/tests/scalar/timestamp/test_timezones.py#L124-L141
"""
self.createAndRunScript(
'''
import pandas as pd
import pytz
ts = pd.Timestamp("2015-03-08 02:00")
try:
ts.tz_localize("US/Eastern")
except pytz.NonExistentTimeError:
return "not existent time error"
''',
expected="not existent time error"
)
def testPytzExceptions(self):
"""
Test that all pytz exceptions can be used in restricted python.
All of them are very simple classes that can't harm the system.
"""
self.createAndRunScript(
'''
import pytz
c = 0
for e in 'UnknownTimeZoneError InvalidTimeError AmbiguousTimeError NonExistentTimeError'.split():
getattr(pytz, e)
c += 1
return c
''',
expected=4,
)
def testPytzProhibitedObjects(self):
"""
Test that prohibited objects of the pytz module can't be
used within restricted python.
"""
self.assertRaises(
ZopeGuardsUnauthorized,
self.createAndRunScript,
'''
import pytz
pytz.timezone
'''
)
def add_tests(suite, module):
if hasattr(module, 'test_suite'):
......
##############################################################################
#
# Copyright (c) 2002-2023 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
class TestSQLVar(ERP5TypeTestCase):
def test_sqlvar(self):
"""
Make sure that sqlvar patch does not break sqlvar type="nb".
"""
sqlmethod = self.portal.newContent(portal_type='SQL Method',
temp_object=True,
connection_id='erp5_sql_connection',
arguments_src='value',
src='<dtml-sqlvar value type="string">')
self.assertEqual(sqlmethod(value='', src__=1), "''")
self.assertEqual(sqlmethod(value=None, src__=1), 'null')
sqlmethod.edit(src='<dtml-sqlvar value type="string" optional>')
self.assertEqual(sqlmethod(value='', src__=1), "''")
self.assertEqual(sqlmethod(value=None, src__=1), 'null')
sqlmethod.edit(src='<dtml-sqlvar value type="nb">')
self.assertRaises(ValueError, sqlmethod, value='', src__=1)
self.assertEqual(sqlmethod(value=None, src__=1), 'null')
sqlmethod.edit(src='<dtml-sqlvar value type="nb" optional>')
self.assertEqual(sqlmethod(value='', src__=1), 'null')
self.assertEqual(sqlmethod(value=None, src__=1), 'null')
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSQLVar</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSQLVar</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -7,8 +7,8 @@ test.erp5.testAutoLogout
test.erp5.testBase
test.erp5.testBusinessTemplate
test.erp5.testCache
test.erp5.testCachedSkinsTool
test.erp5.testCacheTool
test.erp5.testCachedSkinsTool
test.erp5.testConstraint
test.erp5.testContributionRegistryTool
test.erp5.testCookieCrumbler
......@@ -45,6 +45,7 @@ test.erp5.testPropertyRecordable
test.erp5.testProxyField
test.erp5.testQueryModule
test.erp5.testRestrictedPythonSecurity
test.erp5.testSQLVar
test.erp5.testSelectionTool
test.erp5.testSequence
test.erp5.testSessionTool
......
......@@ -1535,6 +1535,19 @@ class TestERP5Credential(ERP5TypeTestCase):
self.assertEqual(cr.getDefaultAddressCity(), None)
self.assertEqual(cr.getDefaultAddressRegion(), None)
def test_Ticket_getWorkflowStateTranslatedTitle(self):
self.assertEqual(
self.portal.credential_recovery_module.newContent(
portal_type='Credential Recovery').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
self.assertEqual(
self.portal.credential_request_module.newContent(
portal_type='Credential Request').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
self.assertEqual(
self.portal.credential_update_module.newContent(
portal_type='Credential Update').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
def test_suite():
......
......@@ -4,6 +4,6 @@ portal = context.getPortalObject()
workflow_tool = portal.portal_workflow
for workflow in workflow_tool.getWorkflowValueListFor(context):
# Exclude interaction workflows and edit_workflow
if workflow.state_var != 'state':
return getattr(context, 'getTranslated%sTitle' % UpperCase(workflow.state_var))()
if workflow.getPortalType() != 'Interaction Workflow' \
and workflow.getId() != 'edit_workflow':
return getattr(context, 'getTranslated%sTitle' % UpperCase(workflow.getStateVariable()))()
......@@ -344,6 +344,24 @@ class TestCRM(BaseTestCRM):
self.portal.portal_workflow.doActionFor(so, 'expire_action')
self.assertEqual('expired', so.getSimulationState())
def test_Ticket_getWorkflowStateTranslatedTitle(self):
self.assertEqual(
self.portal.campaign_module.newContent(
portal_type='Campaign').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
self.assertEqual(
self.portal.meeting_module.newContent(
portal_type='Meeting').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
self.assertEqual(
self.portal.support_request_module.newContent(
portal_type='Support Request').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
self.assertEqual(
self.portal.sale_opportunity_module.newContent(
portal_type='Sale Opportunity').Ticket_getWorkflowStateTranslatedTitle(),
'Draft')
@expectedFailure
def test_Event_AcknowledgeAndCreateEvent(self):
"""
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -42,7 +42,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -79,7 +79,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -50,7 +50,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_notification_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -47,7 +47,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_notification_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'Test event',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'Test event',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -54,7 +54,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'Test event',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'send',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -93,7 +93,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'Test event',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Sent',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_create_event_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'field_my_start_date': '2010-01-01T00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_ui_test_customer_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -28,7 +28,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_create_event_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......@@ -51,7 +51,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_title': 'erp5_crm_ui_test_notification_title',
'field_your_portal_type': 'Letter',
'field_your_resource': '',
'field_your_start_date': '2010-01-01T00:00:00',
'field_your_start_date': '2010-01-01T00:00',
'field_your_notification_message': '',
'field_your_event_workflow_action': 'draft',
'field_your_source': 'erp5_crm_ui_test_agent_title',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -27,7 +27,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': 'erp5_crm_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......@@ -49,7 +49,7 @@
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_ui_test_notification_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_start_date': '2010-01-01T00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_ui_test_agent',
......
......@@ -130,7 +130,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.getTemplateField().get_value("renderjs_extra") + [(\'password\', context.getTypeBasedMethod(\'getContentPassword\')())]</string> </value>
<value> <string>python: dict(dict(field.getTemplateField().get_value(\'renderjs_extra\')), content_type=\'application/pdf\', editor=\'pdf\', password=context.getTypeBasedMethod(\'getContentPassword\')())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>pdf.sandbox.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>pdf.sandbox.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
......
......@@ -18,7 +18,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>cmaps</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>compatibility.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>compatibility.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>debugger.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>debugger.js</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -18,7 +18,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>images</string> </value>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
......
<svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.375 7.625V11.875C5.375 12.0408 5.44085 12.1997 5.55806 12.3169C5.67527 12.4342 5.83424 12.5 6 12.5C6.16576 12.5 6.32473 12.4342 6.44194 12.3169C6.55915 12.1997 6.625 12.0408 6.625 11.875V7.625L7.125 7.125H11.375C11.5408 7.125 11.6997 7.05915 11.8169 6.94194C11.9342 6.82473 12 6.66576 12 6.5C12 6.33424 11.9342 6.17527 11.8169 6.05806C11.6997 5.94085 11.5408 5.875 11.375 5.875H7.125L6.625 5.375V1.125C6.625 0.95924 6.55915 0.800269 6.44194 0.683058C6.32473 0.565848 6.16576 0.5 6 0.5C5.83424 0.5 5.67527 0.565848 5.55806 0.683058C5.44085 0.800269 5.375 0.95924 5.375 1.125V5.375L4.875 5.875H0.625C0.45924 5.875 0.300269 5.94085 0.183058 6.05806C0.065848 6.17527 0 6.33424 0 6.5C0 6.66576 0.065848 6.82473 0.183058 6.94194C0.300269 7.05915 0.45924 7.125 0.625 7.125H4.762L5.375 7.625Z" fill="black"/>
</svg>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>altText_add.svg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/svg+xml</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
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