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
Thomas Gambier
slapos.core
Commits
ae759e3a
Commit
ae759e3a
authored
Mar 14, 2019
by
Rafael Monnerat
Committed by
Alain Takoudjou
Mar 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: Ensure the 3 preferences are set
If they are not, it mess up the simulation.
parent
39f3220d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
...ting/OrderBuilder_generateSlapOSAggregatedMovementList.py
+10
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
View file @
ae759e3a
...
...
@@ -19,7 +19,7 @@ consumption_specialise_uid_list = [q.getUid() for q in portal.portal_catalog(
select_dict
=
{
'default_aggregate_portal_type'
:
None
}
select_kw
.
update
(
limit
=
10
,
# just take a bit
limit
=
10
0
,
# just take a bit
portal_type
=
'Sale Packing List Line'
,
simulation_state
=
'delivered'
,
parent_specialise_uid
=
specialise_uid_list
+
consumption_specialise_uid_list
,
...
...
@@ -36,6 +36,15 @@ specialise = portal.portal_preferences.getPreferredAggregatedSaleTradeCondition(
subscription_request_specialise
=
portal
.
portal_preferences
.
getPreferredAggregatedSubscriptionSaleTradeCondition
()
consumption_specialise
=
portal
.
portal_preferences
.
getPreferredAggregatedConsumptionSaleTradeCondition
()
if
specialise
is
None
:
raise
ValueError
(
"Preferred Aggregated Sale Trade Condition is not Defined, please check your preferences."
)
if
subscription_request_specialise
is
None
:
raise
ValueError
(
"Preferred Aggregated Subscription Sale Trade Condition is not Defined, please check your preferences."
)
if
consumption_specialise
is
None
:
raise
ValueError
(
"Preferred Aggregated Consumption Sale Trade Condition is not Defined, please check your preferences."
)
temp_movement_list
=
[]
for
movement
in
movement_list
:
if
movement
.
getGroupingReference
()
is
not
None
:
...
...
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