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
9f2e9559
Commit
9f2e9559
authored
Jan 19, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: experiment new trade condition
parent
a3056e04
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
313 additions
and
5 deletions
+313
-5
master/bt5/slapos_accounting/PathTemplateItem/sale_trade_condition_module/couscous_trade_condition.xml
.../sale_trade_condition_module/couscous_trade_condition.xml
+306
-0
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
...pos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
+4
-4
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.xml
...os_accounting/InstanceTree_requestUpdateOpenSaleOrder.xml
+1
-1
master/bt5/slapos_accounting/bt/template_keep_last_workflow_history_only_path_list
...ing/bt/template_keep_last_workflow_history_only_path_list
+1
-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/sale_trade_condition_module/couscous_trade_condition.xml
0 → 100644
View file @
9f2e9559
This diff is collapsed.
Click to expand it.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
View file @
9f2e9559
...
@@ -22,11 +22,10 @@ def storeWorkflowComment(document, comment):
...
@@ -22,11 +22,10 @@ def storeWorkflowComment(document, comment):
def
newOpenOrder
():
def
newOpenOrder
():
new_open_sale_order
=
portal
.
open_sale_order_module
.
newContent
(
new_open_sale_order
=
portal
.
open_sale_order_module
.
newContent
(
portal_type
=
"Open Sale Order"
,
portal_type
=
"Open Sale Order"
,
specialise
=
"sale_trade_condition_module/slapos_subscription_trade_condition"
,
# XXX HARDCODED
specialise
=
specialise
,
effective_date
=
DateTime
(),
effective_date
=
DateTime
(),
activate_kw
=
activate_kw
,
activate_kw
=
activate_kw
,
#source=open_sale_order_template.getSource(),
#source_section=open_sale_order_template.getSourceSection(),
destination
=
person
.
getRelativeUrl
(),
destination
=
person
.
getRelativeUrl
(),
destination_decision
=
person
.
getRelativeUrl
(),
destination_decision
=
person
.
getRelativeUrl
(),
title
=
"%s SlapOS Subscription"
%
person
.
getTitle
()
title
=
"%s SlapOS Subscription"
%
person
.
getTitle
()
...
@@ -125,13 +124,14 @@ if instance_tree.getCausalityState() == 'diverged':
...
@@ -125,13 +124,14 @@ if instance_tree.getCausalityState() == 'diverged':
if
open_order_line
is
not
None
:
if
open_order_line
is
not
None
:
open_order
=
open_order_line
.
getParentValue
()
open_order
=
open_order_line
.
getParentValue
()
open_order
.
SaleOrder_applySaleTradeCondition
(
batch_mode
=
1
)
# Check compatibility with previous template
# Check compatibility with previous template
assert
open_order
.
getSourceSection
()
==
'organisation_module/slapos'
assert
open_order
.
getSourceSection
()
==
'organisation_module/slapos'
assert
open_order
.
getDestinationSection
()
==
'organisation_module/slapos'
assert
open_order
.
getDestinationSection
()
==
'organisation_module/slapos'
assert
open_order
.
getSource
()
==
'organisation_module/slapos'
assert
open_order
.
getSource
()
==
'organisation_module/slapos'
assert
open_order
.
getPriceCurrency
()
==
'currency_module/EUR'
assert
open_order
.
getPriceCurrency
()
==
'currency_module/EUR'
assert
open_order
.
getSpecialise
()
==
'sale_trade_condition_module/slapos_subscription_trade_condition'
assert
open_order
.
getSpecialise
()
==
specialise
assert
open_order_line
.
getResource
()
==
'service_module/slapos_instance_subscription'
assert
open_order_line
.
getResource
()
==
'service_module/slapos_instance_subscription'
assert
open_order_line
.
getQuantityUnit
()
==
'unit/piece'
assert
open_order_line
.
getQuantityUnit
()
==
'unit/piece'
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.xml
View file @
9f2e9559
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
<value>
<string>
specialise="sale_trade_condition_module/couscous_trade_condition",
REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_accounting/bt/template_keep_last_workflow_history_only_path_list
View file @
9f2e9559
currency_module/CNY
currency_module/CNY
currency_module/EUR
currency_module/EUR
sale_trade_condition_module/couscous_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
...
...
master/bt5/slapos_accounting/bt/template_path_list
View file @
9f2e9559
...
@@ -72,6 +72,7 @@ portal_solvers/Automatic Quantity Adopt Solver/**
...
@@ -72,6 +72,7 @@ portal_solvers/Automatic Quantity Adopt Solver/**
sale_packing_list_module/slapos_accounting_instance_delivery_line_template
sale_packing_list_module/slapos_accounting_instance_delivery_line_template
sale_packing_list_module/slapos_accounting_instance_delivery_line_template/**
sale_packing_list_module/slapos_accounting_instance_delivery_line_template/**
sale_packing_list_module/slapos_accounting_instance_delivery_template
sale_packing_list_module/slapos_accounting_instance_delivery_template
sale_trade_condition_module/couscous_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
...
...
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