Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
d977773e
Commit
d977773e
authored
Sep 03, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
An alarm to check Item tracking consistency
parent
dfee5e3b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
272 additions
and
1 deletion
+272
-1
bt5/erp5_administration/PathTemplateItem/portal_alarms/check_item_tracking.xml
...on/PathTemplateItem/portal_alarms/check_item_tracking.xml
+113
-0
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Alarm_checkItemTracking.xml
...tal_skins/erp5_administration/Alarm_checkItemTracking.xml
+76
-0
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Item_checkTrackingList.xml
...rtal_skins/erp5_administration/Item_checkTrackingList.xml
+81
-0
bt5/erp5_administration/bt/revision
bt5/erp5_administration/bt/revision
+1
-1
bt5/erp5_administration/bt/template_path_list
bt5/erp5_administration/bt/template_path_list
+1
-0
No files found.
bt5/erp5_administration/PathTemplateItem/portal_alarms/check_item_tracking.xml
0 → 100644
View file @
d977773e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_checkItemTracking
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
check_item_tracking
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple>
<int>
0
</int>
</tuple>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1325379660.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_week_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_week_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Check Item Tracking
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Alarm_checkItemTracking.xml
0 → 100644
View file @
d977773e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
_body
</string>
</key>
<value>
<string>
"""Check the tracking history of all items.\n
"""\n
\n
active_process = context.newActiveProcess().getRelativeUrl()\n
\n
context.getPortalObject().portal_catalog.searchAndActivate(\n
method_id=\'Item_checkTrackingList\',\n
method_kw=dict(fixit=fixit, active_process=active_process),\n
activate_kw=dict(tag=tag, priority=5),\n
portal_type=context.getPortalItemTypeList() or [\'Nothing\'])\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag, fixit=0, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_checkItemTracking
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Item_checkTrackingList.xml
0 → 100644
View file @
d977773e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
_body
</string>
</key>
<value>
<string>
from Products.CMFActivity.ActiveResult import ActiveResult\n
portal = context.getPortalObject()\n
\n
tracking_list = list(reversed(portal.portal_simulation.getCurrentTrackingList(aggregate_uid=context.getUid())))\n
\n
for previous_brain, next_brain in zip(tracking_list, tracking_list[1:]):\n
previous_delivery = portal.portal_catalog.getObject(previous_brain.delivery_uid)\n
next_delivery = portal.portal_catalog.getObject(next_brain.delivery_uid)\n
\n
if previous_delivery.getDestination() != next_delivery.getSource():\n
portal.restrictedTraverse(active_process).postResult(\n
ActiveResult(summary=script.getId(),\n
detail=\'%s has tracking error\' % context.getRelativeUrl(),\n
result=\'\',\n
severity=100))\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
active_process, fixit=0, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Item_checkTrackingList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_administration/bt/revision
View file @
d977773e
149
\ No newline at end of file
154
\ No newline at end of file
bt5/erp5_administration/bt/template_path_list
View file @
d977773e
...
...
@@ -2,5 +2,6 @@ portal_alarms/check_catalog
portal_alarms/check_consistency
portal_alarms/check_conversion_tool_availability
portal_alarms/check_folder_handler
portal_alarms/check_item_tracking
portal_alarms/check_localizer
portal_alarms/check_stock
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment