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
7b578fd1
Commit
7b578fd1
authored
Sep 20, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: drop audit from Subscription Request
parent
5177d1aa
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 addition
and
131 deletions
+1
-131
master/bt5/slapos_subscription_request/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+0
-1
master/bt5/slapos_subscription_request/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.py
...ion_request/SubscriptionRequest_checkRelatedAccounting.py
+0
-65
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.xml
...on_request/SubscriptionRequest_checkRelatedAccounting.xml
+0
-62
master/bt5/slapos_subscription_request/bt/template_portal_type_property_sheet_list
...ption_request/bt/template_portal_type_property_sheet_list
+0
-1
master/bt5/slapos_subscription_request/bt/template_portal_type_workflow_chain_list
...ption_request/bt/template_portal_type_workflow_chain_list
+0
-1
No files found.
master/bt5/slapos_subscription_request/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
7b578fd1
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
<item>
Price
</item>
<item>
Price
</item>
<item>
Reference
</item>
<item>
Reference
</item>
<item>
SlapOSVirtualMasterSourceProjectConstraint
</item>
<item>
SlapOSVirtualMasterSourceProjectConstraint
</item>
<item>
SlaposSubscriptionRequestAuditConstraint
</item>
<item>
Task
</item>
<item>
Task
</item>
<item>
Url
</item>
<item>
Url
</item>
<item>
VariationRange
</item>
<item>
VariationRange
</item>
...
...
master/bt5/slapos_subscription_request/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
7b578fd1
...
@@ -9,6 +9,6 @@
...
@@ -9,6 +9,6 @@
</chain>
</chain>
<chain>
<chain>
<type>
Subscription Request
</type>
<type>
Subscription Request
</type>
<workflow>
audit_validation_workflow,
edit_workflow, subscription_request_workflow
</workflow>
<workflow>
edit_workflow, subscription_request_workflow
</workflow>
</chain>
</chain>
</workflow_chain>
</workflow_chain>
\ No newline at end of file
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.py
deleted
100644 → 0
View file @
5177d1aa
subscription_request
=
context
portal
=
context
.
getPortalObject
()
translate
=
portal
.
Base_translateString
status_list
=
[]
def
addToStatusList
(
status_text
,
mapping
):
status_list
.
append
(
translate
(
status_text
,
mapping
=
mapping
))
if
not
context
.
getSimulationState
()
in
(
"ordered"
,
"confirmed"
,
"started"
,
"stopped"
,
"delivered"
):
return
[]
subscription_trade_condition
=
portal
.
sale_trade_condition_module
.
slapos_aggregated_subscription_trade_condition
#refund_service = portal.service_module.slapos_reservation_refund
sale_packing_list_list
=
portal
.
portal_catalog
(
portal_type
=
"Sale Packing List"
,
strict_causality_uid
=
subscription_request
.
getUid
(),
strict_destination_uid
=
subscription_request
.
getDestinationSectionUid
(),
strict_destination_section_uid
=
subscription_request
.
getDestinationSectionUid
(),
strict_specialise_uid
=
subscription_trade_condition
.
getUid
(),
simulation_state
=
"delivered"
,
)
if
sale_packing_list_list
:
sale_invoice_list
=
portal
.
portal_catalog
(
portal_type
=
"Sale Invoice Transaction"
,
strict_causality_uid
=
[
x
.
getUid
()
for
x
in
sale_packing_list_list
],
)
trade_condition
=
subscription_request
.
getSpecialiseValue
().
getSpecialiseValue
()
subscription_currency
=
trade_condition
.
getPriceCurrency
()
subscription_source_section
=
trade_condition
.
getSourceSection
()
for
sale_invoice
in
sale_invoice_list
:
sale_invoice
=
sale_invoice
.
getObject
()
if
sale_invoice
.
getPriceCurrency
()
!=
subscription_currency
:
addToStatusList
(
"${invoice_relative_url} Sale Invoice currency ${invoice_currency} do not match subscription currency ${subscription_currency}"
,
{
"invoice_relative_url"
:
sale_invoice
.
getRelativeUrl
(),
"invoice_currency"
:
sale_invoice
.
getPriceCurrency
(),
"subscription_currency"
:
subscription_currency
,
}
)
if
sale_invoice
.
getSourceSection
()
!=
subscription_source_section
:
addToStatusList
(
"${invoice_relative_url} Sale Invoice Source ${invoice_source_section} do not match subscription source section ${subscription_source_section}"
,
{
"invoice_relative_url"
:
sale_invoice
.
getRelativeUrl
(),
"invoice_source_section"
:
sale_invoice
.
getSourceSection
(),
"subscription_source_section"
:
subscription_source_section
,
}
)
if
sale_invoice
.
getSimulationState
()
not
in
(
"stopped"
,
"delivered"
,
"cancelled"
):
addToStatusList
(
"${invoice_relative_url} Sale Invoice in unexpected simulation state: ${invoice_simulation_state}"
,
{
"invoice_relative_url"
:
sale_invoice
.
absolute_url
(),
"invoice_simulation_state"
:
sale_invoice
.
getSimulationState
(),
}
)
return
status_list
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_checkRelatedAccounting.xml
deleted
100644 → 0
View file @
5177d1aa
<?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>
fixit=0
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SubscriptionRequest_checkRelatedAccounting
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/bt/template_portal_type_property_sheet_list
View file @
7b578fd1
...
@@ -13,7 +13,6 @@ Subscription Request | Person
...
@@ -13,7 +13,6 @@ Subscription Request | Person
Subscription Request | Price
Subscription Request | Price
Subscription Request | Reference
Subscription Request | Reference
Subscription Request | SlapOSVirtualMasterSourceProjectConstraint
Subscription Request | SlapOSVirtualMasterSourceProjectConstraint
Subscription Request | SlaposSubscriptionRequestAuditConstraint
Subscription Request | Task
Subscription Request | Task
Subscription Request | Url
Subscription Request | Url
Subscription Request | VariationRange
Subscription Request | VariationRange
\ No newline at end of file
master/bt5/slapos_subscription_request/bt/template_portal_type_workflow_chain_list
View file @
7b578fd1
Email | -coordinate_interaction_workflow
Email | -coordinate_interaction_workflow
Subscription Condition | commerce_validation_workflow
Subscription Condition | commerce_validation_workflow
Subscription Condition | edit_workflow
Subscription Condition | edit_workflow
Subscription Request | audit_validation_workflow
Subscription Request | edit_workflow
Subscription Request | edit_workflow
Subscription Request | subscription_request_workflow
Subscription Request | subscription_request_workflow
\ 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