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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
8c347684
Commit
8c347684
authored
Jun 06, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: add alarm slapos_update_delivery_simulation
Generate invoice from packing list
parent
a1c0b7e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
190 additions
and
0 deletions
+190
-0
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_update_delivery_simulation.xml
...eItem/portal_alarms/slapos_update_delivery_simulation.xml
+103
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/Alarm_updateSlapOSDeliverySimulation.py
...slapos_simulation/Alarm_updateSlapOSDeliverySimulation.py
+24
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/Alarm_updateSlapOSDeliverySimulation.xml
...lapos_simulation/Alarm_updateSlapOSDeliverySimulation.xml
+62
-0
master/bt5/slapos_accounting/bt/template_path_list
master/bt5/slapos_accounting/bt/template_path_list
+1
-0
No files found.
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_update_delivery_simulation.xml
0 → 100644
View file @
8c347684
<?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_updateSlapOSDeliverySimulation
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_update_delivery_simulation
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
3
</int>
</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_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<tuple>
<float>
0.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
SlapOS Updates Delivery Simulation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/Alarm_updateSlapOSDeliverySimulation.py
0 → 100644
View file @
8c347684
portal
=
context
.
getPortalObject
()
kw
=
{}
select_dict
=
{
'causality__related__uid'
:
None
}
kw
.
update
(
portal_type
=
'Sale Packing List'
,
ledger__uid
=
portal
.
portal_categories
.
ledger
.
automated
.
getUid
(),
# This is an optimisation to help mariadb selecting a better index
simulation_state
=
[
'delivered'
],
left_join_list
=
select_dict
.
keys
(),
causality__related__uid
=
None
)
portal
.
portal_catalog
.
searchAndActivate
(
method_id
=
'updateSimulation'
,
packet_size
=
1
,
# Separate calls to many transactions
method_kw
=
{
'expand_root'
:
1
},
activate_kw
=
{
'tag'
:
tag
},
**
kw
)
# register activity on alarm object waiting for own tag in order to have only one alarm
# running in same time
context
.
activate
(
after_tag
=
tag
).
getId
()
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/Alarm_updateSlapOSDeliverySimulation.xml
0 → 100644
View file @
8c347684
<?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>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_updateSlapOSDeliverySimulation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/bt/template_path_list
View file @
8c347684
...
...
@@ -25,6 +25,7 @@ portal_alarms/slapos_request_update_instance_tree_open_sale_order
portal_alarms/slapos_start_confirmed_aggregated_subscription_sale_packing_list
portal_alarms/slapos_stop_confirmed_aggregated_sale_invoice_transaction
portal_alarms/slapos_trigger_build
portal_alarms/slapos_update_delivery_simulation
portal_alarms/slapos_update_open_sale_order_period
portal_categories/trade_phase/slapos
portal_categories/trade_phase/slapos/**
...
...
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