Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
957c12f0
Commit
957c12f0
authored
Jun 21, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_interaction_drop: expand all validated open order every day
parent
de8e95bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
23 deletions
+11
-23
master/bt5/erp5_interaction_drop/PathTemplateItem/portal_alarms/update_open_order_simulation.xml
...mplateItem/portal_alarms/update_open_order_simulation.xml
+8
-4
master/bt5/erp5_interaction_drop/SkinTemplateItem/portal_skins/erp5_interaction_drop/Alarm_updateOpenOrderSimulation.py
.../erp5_interaction_drop/Alarm_updateOpenOrderSimulation.py
+3
-19
No files found.
master/bt5/erp5_interaction_drop/PathTemplateItem/portal_alarms/update_open_order_simulation.xml
View file @
957c12f0
...
...
@@ -10,6 +10,10 @@
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_updateOpenOrderSimulation
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
...
...
@@ -26,9 +30,7 @@
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
...
...
@@ -44,7 +46,9 @@
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
3
</int>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
...
...
master/bt5/erp5_interaction_drop/SkinTemplateItem/portal_skins/erp5_interaction_drop/Alarm_updateOpenOrderSimulation.py
View file @
957c12f0
kw
=
{}
if
params
is
None
:
params
=
{}
last_active_process
=
context
.
getLastActiveProcess
()
if
not
params
.
get
(
'full'
,
False
)
and
last_active_process
is
not
None
:
# fetch only objects modified since last alarm run
kw
[
'indexation_timestamp'
]
=
'>= %s'
%
last_active_process
.
getStartDate
().
ISO
()
# register active process in order to have "windows" of last indexed objects
context
.
newActiveProcess
().
getRelativeUrl
()
portal
=
context
.
getPortalObject
()
kw
[
'portal_type'
]
=
portal
.
getPortalOpenOrderTypeList
()
kw
[
'children_portal_type'
]
=
[
i
+
" Line"
for
i
in
portal
.
getPortalOpenOrderTypeList
()]
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
'OpenOrder_updateSimulation'
,
p
acket_size
=
1
,
activate_kw
=
{
'tag'
:
tag
}
,
**
kw
p
ortal_type
=
portal
.
getPortalOpenOrderTypeList
()
,
validation_state
=
"validated"
,
activate_kw
=
{
'tag'
:
tag
}
)
# make alarm run once at time
...
...
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