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
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
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Trade Condition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
specialise/sale_trade_condition_module/slapos_subscription_trade_condition
</string>
<string>
source_section/organisation_module/slapos
</string>
<string>
destination_section/organisation_module/slapos
</string>
<string>
source/organisation_module/slapos
</string>
<string>
price_currency/currency_module/EUR
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
couscous_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
couscous_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Trade Condition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Couscous trade condition
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.40299.33951.46830
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1642600179.81
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1642601630.08
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
View file @
9f2e9559
...
...
@@ -22,11 +22,10 @@ def storeWorkflowComment(document, comment):
def
newOpenOrder
():
new_open_sale_order
=
portal
.
open_sale_order_module
.
newContent
(
portal_type
=
"Open Sale Order"
,
specialise
=
"sale_trade_condition_module/slapos_subscription_trade_condition"
,
# XXX HARDCODED
specialise
=
specialise
,
effective_date
=
DateTime
(),
activate_kw
=
activate_kw
,
#source=open_sale_order_template.getSource(),
#source_section=open_sale_order_template.getSourceSection(),
destination
=
person
.
getRelativeUrl
(),
destination_decision
=
person
.
getRelativeUrl
(),
title
=
"%s SlapOS Subscription"
%
person
.
getTitle
()
...
...
@@ -125,13 +124,14 @@ if instance_tree.getCausalityState() == 'diverged':
if
open_order_line
is
not
None
:
open_order
=
open_order_line
.
getParentValue
()
open_order
.
SaleOrder_applySaleTradeCondition
(
batch_mode
=
1
)
# Check compatibility with previous template
assert
open_order
.
getSourceSection
()
==
'organisation_module/slapos'
assert
open_order
.
getDestinationSection
()
==
'organisation_module/slapos'
assert
open_order
.
getSource
()
==
'organisation_module/slapos'
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
.
getQuantityUnit
()
==
'unit/piece'
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.xml
View file @
9f2e9559
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<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>
<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/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_subscription_trade_condition
...
...
master/bt5/slapos_accounting/bt/template_path_list
View file @
9f2e9559
...
...
@@ -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_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_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