Commit 8048d29f authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: Improve alarm's id and title

parent a9f646ee
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>remove_outdated_active_process</string> </value>
<value> <string>remove_outdated_document_scanner_active_processes</string> </value>
</item>
<item>
<key> <string>periodicity_day_frequency</string> </key>
......@@ -87,7 +87,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Remove Outdated Active Process</string> </value>
<value> <string>Remove Outdated Document Scanner Active Processes</string> </value>
</item>
</dictionary>
</pickle>
......
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate(
......@@ -5,6 +7,7 @@ portal.portal_catalog.searchAndActivate(
method_id='ActiveProcess_removeItselfFromActivityTool',
reference=context.Base_getDocumentScannerDefaultReference(),
# Active Process don't have creation date set
modification_date=(DateTime()-4).earliestTime(),
comparison_operator="<"
modification_date=SimpleQuery(
modification_date=(DateTime()-4).earliestTime(),
comparison_operator="<")
)
portal_alarms/remove_outdated_active_process
portal_alarms/remove_outdated_document_scanner_active_processes
web_page_module/rjs_gadget_document_scanner_css
web_page_module/rjs_gadget_document_scanner_html
web_page_module/rjs_gadget_document_scanner_js
\ No newline at end of file
......@@ -73,6 +73,6 @@ class DocumentScanner(ERP5TypeTestCase):
req("update catalog set modification_date='{date}' where uid={uid}".format(
date=(DateTime()-6).toZone('UTC'),
uid=active_process.getUid()))
self.portal.portal_alarms.remove_outdated_active_process.activeSense()
self.portal.portal_alarms.remove_outdated_document_scanner_active_processes.activeSense()
self.tic()
self.assertNotIn(active_process.getId(), list(self.portal.portal_activities.objectIds()))
\ 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