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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
71b79d5e
Commit
71b79d5e
authored
Oct 25, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fetch hosting subscription directly from instance
parent
848fc3e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
21 deletions
+9
-21
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
+3
-13
master/bt5/vifib_erp5/SkinTemplateItem/portal_skins/vifib_core/ERP5Type_getSecurityCategoryFromRelatedOpenOrder.xml
...core/ERP5Type_getSecurityCategoryFromRelatedOpenOrder.xml
+5
-7
master/bt5/vifib_erp5/bt/revision
master/bt5/vifib_erp5/bt/revision
+1
-1
No files found.
master/bt5/vifib_erp5/ExtensionTemplateItem/VifibSecurity.py
View file @
71b79d5e
...
@@ -132,17 +132,7 @@ def getSoftwareInstanceSecurityCategory(self, base_category_list, user_name,
...
@@ -132,17 +132,7 @@ def getSoftwareInstanceSecurityCategory(self, base_category_list, user_name,
category_dict
.
setdefault
(
base_category
,
[]).
extend
([
'role'
,
'role/instance'
])
category_dict
.
setdefault
(
base_category
,
[]).
extend
([
'role'
,
'role/instance'
])
if
base_category
==
"aggregate"
:
if
base_category
==
"aggregate"
:
software_instance
=
software_instance_list
[
0
]
software_instance
=
software_instance_list
[
0
]
current_delivery_line
=
self
.
portal_catalog
.
unrestrictedGetResultValue
(
hosting_item
=
software_instance
.
getAggregateValue
(
portal_type
=
'Hosting Subscription'
)
portal_type
=
'Sale Packing List Line'
,
aggregate_uid
=
software_instance
.
getUid
(),
simulation_state
=
self
.
getPortalCurrentInventoryStateList
()
+
\
self
.
getPortalFutureInventoryStateList
()
+
\
self
.
getPortalReservedInventoryStateList
()
+
\
self
.
getPortalTransitInventoryStateList
(),
sort_on
=
((
'movement.start_date'
,
'DESC'
),)
)
if
current_delivery_line
is
not
None
:
hosting_item
=
current_delivery_line
.
getAggregateValue
(
portal_type
=
'Hosting Subscription'
)
if
hosting_item
is
not
None
:
if
hosting_item
is
not
None
:
category_dict
.
setdefault
(
base_category
,
[]).
append
(
hosting_item
.
getRelativeUrl
())
category_dict
.
setdefault
(
base_category
,
[]).
append
(
hosting_item
.
getRelativeUrl
())
category_list
.
append
(
category_dict
)
category_list
.
append
(
category_dict
)
...
...
master/bt5/vifib_erp5/SkinTemplateItem/portal_skins/vifib_core/ERP5Type_getSecurityCategoryFromRelatedOpenOrder.xml
View file @
71b79d5e
...
@@ -71,9 +71,7 @@ if obj.getPortalType() == \'Person\':\n
...
@@ -71,9 +71,7 @@ if obj.getPortalType() == \'Person\':\n
return [{\'aggregate\': open_sale_order.getRelativeUrl()}]\n
return [{\'aggregate\': open_sale_order.getRelativeUrl()}]\n
\n
\n
if obj.getPortalType() == \'Software Instance\':\n
if obj.getPortalType() == \'Software Instance\':\n
delivery_line = obj.getAggregateRelatedValue(portal_type=\'Sale Packing List Line\')\n
hosting_subscription = obj.getAggregateValue(portal_type=\'Hosting Subscription\')\n
if delivery_line is not None:\n
hosting_subscription = delivery_line.getAggregateValue(portal_type=\'Hosting Subscription\')\n
if hosting_subscription is not None:\n
if hosting_subscription is not None:\n
open_sale_order_line = hosting_subscription.getAggregateRelatedValue(portal_type=\'Open Sale Order Line\')\n
open_sale_order_line = hosting_subscription.getAggregateRelatedValue(portal_type=\'Open Sale Order Line\')\n
if open_sale_order_line is not None and open_sale_order_line.getParentValue().getValidationState() == \'validated\':\n
if open_sale_order_line is not None and open_sale_order_line.getParentValue().getValidationState() == \'validated\':\n
...
...
master/bt5/vifib_erp5/bt/revision
View file @
71b79d5e
517
518
\ No newline at end of file
\ 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