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
Léo-Paul Géneau
slapos.core
Commits
72dae5ec
Commit
72dae5ec
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split the alarm.
Also provide test skeleton.
parent
4caa52f2
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
276 additions
and
14 deletions
+276
-14
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_deliver_confirmed_aggregated_sale_packing_list.xml
...slapos_deliver_confirmed_aggregated_sale_packing_list.xml
+3
-3
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_stop_confirmed_aggregated_sale_invoice_transaction.xml
...os_stop_confirmed_aggregated_sale_invoice_transaction.xml
+97
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_deliverConfirmedAggregatedSalePackingList.xml
...nting/Alarm_deliverConfirmedAggregatedSalePackingList.xml
+3
-3
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.xml
...g/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.xml
+79
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_deliverConfirmedAggregatedSalePackingList.xml
...ng/Delivery_deliverConfirmedAggregatedSalePackingList.xml
+2
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_stopConfirmedAggregatedSaleInvoiceTransaction.xml
...elivery_stopConfirmedAggregatedSaleInvoiceTransaction.xml
+77
-0
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
..._accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
+8
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/slapos_accounting/bt/template_path_list
master/bt5/slapos_accounting/bt/template_path_list
+2
-1
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
...os_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
+3
-3
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_deliver_confirmed_aggregated_
delivery
.xml
→
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_deliver_confirmed_aggregated_
sale_packing_list
.xml
View file @
72dae5ec
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_deliverConfirmedAggregated
Delivery
</string>
</value>
<value>
<string>
Alarm_deliverConfirmedAggregated
SalePackingList
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -22,7 +22,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_deliver_confirmed_aggregated_
delivery
</string>
</value>
<value>
<string>
slapos_deliver_confirmed_aggregated_
sale_packing_list
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
...
...
@@ -89,7 +89,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Deliver confirmed aggregated
deliveries
</string>
</value>
<value>
<string>
Deliver confirmed aggregated
Sale Packing List
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_accounting/PathTemplateItem/portal_alarms/slapos_stop_confirmed_aggregated_sale_invoice_transaction.xml
0 → 100644
View file @
72dae5ec
<?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_stopConfirmedAggregatedSaleInvoiceTransaction
</string>
</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_stop_confirmed_aggregated_sale_invoice_transaction
</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>
1
</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=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
3660.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>
Stop confirmed aggregated Sale Invoice Transaction
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_deliverConfirmedAggregated
Delivery
.xml
→
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_deliverConfirmedAggregated
SalePackingList
.xml
View file @
72dae5ec
...
...
@@ -55,11 +55,11 @@ from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
portal.portal_catalog.searchAndActivate(\n
portal_type=
[\'Sale Invoice Transaction\', \'Sale Packing List\']
,\n
portal_type=
\'Sale Packing List\'
,\n
simulation_state=\'confirmed\',\n
causality_state=\'solved\',\n
specialise_uid=portal.restrictedTraverse(portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid(),\n
method_id=\'Delivery_deliverConfirmedAggregated
Delivery
\',\n
method_id=\'Delivery_deliverConfirmedAggregated
SalePackingList
\',\n
activate_kw={\'tag\': tag}\n
)\n
context.activate(after_tag=tag).getId()\n
...
...
@@ -71,7 +71,7 @@ context.activate(after_tag=tag).getId()\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_deliverConfirmedAggregated
Delivery
</string>
</value>
<value>
<string>
Alarm_deliverConfirmedAggregated
SalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Alarm_stopConfirmedAggregatedSaleInvoiceTransaction.xml
0 → 100644
View file @
72dae5ec
<?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 DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'confirmed\',\n
causality_state=\'solved\',\n
specialise_uid=portal.restrictedTraverse(portal.portal_preferences.getPreferredAggregatedSaleTradeCondition()).getUid(),\n
method_id=\'Delivery_stopConfirmedAggregatedSaleInvoiceTransaction\',\n
activate_kw={\'tag\': tag}\n
)\n
context.activate(after_tag=tag).getId()\n
</string>
</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_stopConfirmedAggregatedSaleInvoiceTransaction
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_deliverConfirmedAggregated
Delivery
.xml
→
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_deliverConfirmedAggregated
SalePackingList
.xml
View file @
72dae5ec
...
...
@@ -51,7 +51,7 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
if context.getPortalType()
not in (\'Sale Packing List\', \'Sale Invoice Transaction\')
\\\n
if context.getPortalType()
!= \'Sale Packing List\'
\\\n
and context.getSpecialise() != portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
raise TypeError(\'Incorrect delivery.\')\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
...
...
@@ -71,7 +71,7 @@ if context.getSimulationState() == \'confirmed\' and len(context.checkConsistenc
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Delivery_deliverConfirmedAggregated
Delivery
</string>
</value>
<value>
<string>
Delivery_deliverConfirmedAggregated
SalePackingList
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Delivery_stopConfirmedAggregatedSaleInvoiceTransaction.xml
0 → 100644
View file @
72dae5ec
<?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>
portal = context.getPortalObject()\n
if context.getPortalType() != \'Sale Invoice Transaction\' \\\n
and context.getSpecialise() != portal.portal_preferences.getPreferredAggregatedSaleTradeCondition():\n
raise TypeError(\'Incorrect delivery.\')\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
if context.getSimulationState() == \'confirmed\' and len(context.checkConsistency()) == 0 and context.getCausalityState() == \'solved\':\n
comment = \'Delivered by alarm as all actions in confirmed state are ready.\'\n
if isTransitionPossible(context, \'start\'):\n
context.start(comment=comment)\n
if isTransitionPossible(context, \'stop\'):\n
context.stop(comment=comment)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Delivery_stopConfirmedAggregatedSaleInvoiceTransaction
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
View file @
72dae5ec
...
...
@@ -1425,3 +1425,11 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
def
test_Delivery_manageBuildingCalculatingDelivery_diverged
(
self
):
self
.
_test_Delivery_manageBuildingCalculatingDelivery
(
'diverged'
,
True
)
class
TestSlapOSDeliverConfirmedAggregatedSalePackingListAlarm
(
testSlapOSMixin
):
def
test
(
self
):
raise
NotImplementedError
class
TestSlapOSStopConfirmedAggregatedSaleInvoiceTransactionAlarm
(
testSlapOSMixin
):
def
test
(
self
):
raise
NotImplementedError
master/bt5/slapos_accounting/bt/revision
View file @
72dae5ec
169
\ No newline at end of file
170
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_path_list
View file @
72dae5ec
...
...
@@ -24,11 +24,12 @@ open_sale_order_module/slapos_accounting_open_sale_order_template
open_sale_order_module/template_open_sale_order
organisation_module/slapos
organisation_module/slapos/bank_account
portal_alarms/slapos_deliver_confirmed_aggregated_
delivery
portal_alarms/slapos_deliver_confirmed_aggregated_
sale_packing_list
portal_alarms/slapos_instance_invoicing
portal_alarms/slapos_manage_building_calculating_delivery
portal_alarms/slapos_remove_bogus_delivery_link
portal_alarms/slapos_request_update_hosting_subscription_open_sale_order
portal_alarms/slapos_stop_confirmed_aggregated_sale_invoice_transaction
portal_alarms/slapos_trigger_aggregated_delivery_order_builder
portal_alarms/slapos_trigger_build
portal_alarms/slapos_trigger_payment_transaction_order_builder
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSERP5DefaultScenario.py
View file @
72dae5ec
...
...
@@ -609,7 +609,7 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
self
.
tic
()
# deliver aggregated deliveries
self
.
stepCallSlaposDeliverConfirmedAggregated
Delivery
Alarm
()
self
.
stepCallSlaposDeliverConfirmedAggregated
SalePackingList
Alarm
()
self
.
tic
()
# stabilise aggregated deliveries and expand them
...
...
@@ -636,8 +636,8 @@ class TestSlapOSDefaultScenario(TestSlapOSSecurityMixin):
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
#
deliver
the invoices and solve them again
self
.
stepCallSlapos
DeliverConfirmedAggregatedDelivery
Alarm
()
#
stop
the invoices and solve them again
self
.
stepCallSlapos
StopConfirmedAggregatedSaleInvoiceTransaction
Alarm
()
self
.
tic
()
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
...
...
master/bt5/slapos_erp5/bt/revision
View file @
72dae5ec
109
\ No newline at end of file
110
\ 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