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
Gabriel Monnerat
slapos.core
Commits
96a84dd0
Commit
96a84dd0
authored
Dec 29, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid software instance to access to person object.
parent
1a363169
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
22 deletions
+25
-22
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/HostingSubscription_requestRootSoftwareInstance.xml
..._slap/HostingSubscription_requestRootSoftwareInstance.xml
+24
-21
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/HostingSubscription_requestRootSoftwareInstance.xml
View file @
96a84dd0
...
@@ -86,7 +86,9 @@ if person is None:\n
...
@@ -86,7 +86,9 @@ if person is None:\n
open_sale_order_line = hosting_subscription.portal_catalog.getResultValue(\n
open_sale_order_line = hosting_subscription.portal_catalog.getResultValue(\n
portal_type=\'Open Sale Order Line\', strict_aggregate_uid=hosting_subscription.getUid())\n
portal_type=\'Open Sale Order Line\', strict_aggregate_uid=hosting_subscription.getUid())\n
open_sale_order = open_sale_order_line.getParentValue()\n
open_sale_order = open_sale_order_line.getParentValue()\n
person = open_sale_order.getDestinationSectionValue()\n
person_relative_url = open_sale_order.getDestinationSection()\n
else:\n
person_relative_url = person.getRelativeUrl()\n
\n
\n
new_one = False\n
new_one = False\n
if (request_software_instance is None):\n
if (request_software_instance is None):\n
...
@@ -110,9 +112,9 @@ if (request_software_instance is None):\n
...
@@ -110,9 +112,9 @@ if (request_software_instance is None):\n
\n
\n
sale_order = portal.getDefaultModule(portal_type=sale_order_portal_type).newContent(\n
sale_order = portal.getDefaultModule(portal_type=sale_order_portal_type).newContent(\n
portal_type=sale_order_portal_type,\n
portal_type=sale_order_portal_type,\n
destination
_value=person
,\n
destination
=person_relative_url
,\n
destination_section
_value=person
,\n
destination_section
=person_relative_url
,\n
destination_decision
_value=person
,\n
destination_decision
=person_relative_url
,\n
start_date=DateTime(),\n
start_date=DateTime(),\n
received_date=DateTime(),\n
received_date=DateTime(),\n
# XXX Hardcoded values\n
# XXX Hardcoded values\n
...
@@ -135,21 +137,22 @@ if (request_software_instance is None):\n
...
@@ -135,21 +137,22 @@ if (request_software_instance is None):\n
)\n
)\n
portal.portal_workflow.doActionFor(sale_order, "order_action")\n
portal.portal_workflow.doActionFor(sale_order, "order_action")\n
\n
\n
# Update Open Order\n
if person is not None:\n
# does this order have a client-specific Open Order\n
# Update Open Order\n
open_order = portal.portal_catalog.getResultValue(\n
# does this order have a client-specific Open Order\n
default_destination_section_uid=person.getUid(),\n
open_order = portal.portal_catalog.getResultValue(\n
portal_type="Open Sale Order",\n
default_destination_section_uid=person.getUid(),\n
validation_state="validated")\n
portal_type="Open Sale Order",\n
if open_order is None:\n
validation_state="validated")\n
person_slap_interface_state = person.getSlapState()\n
if open_order is None:\n
if person_slap_interface_state == \'open_order_created\':\n
person_slap_interface_state = person.getSlapState()\n
open_order_url = context.portal_workflow.getInfoFor(\n
if person_slap_interface_state == \'open_order_created\':\n
ob=person, name=\'open_order_url\',\n
open_order_url = context.portal_workflow.getInfoFor(\n
wf_id=\'person_slap_interface_workflow\')\n
ob=person, name=\'open_order_url\',\n
open_order = portal.restrictedTraverse(open_order_url)\n
wf_id=\'person_slap_interface_workflow\')\n
else:\n
open_order = portal.restrictedTraverse(open_order_url)\n
raise ValueError(\'Person has no open order created\')\n
else:\n
raise ValueError(\'Person has no open order created\')\n
\n
\n
now = DateTime()\n
now = DateTime()\n
start_date = getClosestDate(target_date=now, precision=\'day\', before=1)\n
start_date = getClosestDate(target_date=now, precision=\'day\', before=1)\n
...
@@ -170,8 +173,8 @@ if (request_software_instance is None):\n
...
@@ -170,8 +173,8 @@ if (request_software_instance is None):\n
specialise=sale_order.getSpecialise(portal_type="Sale Trade Condition"),\n
specialise=sale_order.getSpecialise(portal_type="Sale Trade Condition"),\n
# XXX Hardcoded values\\n\n
# XXX Hardcoded values\\n\n
resource=subscription_service_relative_url,\n
resource=subscription_service_relative_url,\n
destination
_value=person
,\n
destination
=person_relative_url
,\n
destination_section
_value=person
,\n
destination_section
=person_relative_url
,\n
source="organisation_module/vifib_internet",\n
source="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
source_section="organisation_module/vifib_internet",\n
activate_kw={\'tag\': tag},\n
activate_kw={\'tag\': tag},\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
96a84dd0
497
498
\ 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