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
Jérome Perrin
slapos.core
Commits
6a99e848
Commit
6a99e848
authored
Dec 14, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat the lines.
parent
bf503746
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
9 deletions
+26
-9
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml
...s/slapos_accounting/Person_getOpenSaleOrderDifference.xml
+4
-1
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml
...ns/slapos_accounting/Person_storeOpenSaleOrderJournal.xml
+17
-5
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml
...al_skins/slapos_accounting/Person_updateOpenSaleOrder.xml
+4
-2
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml
View file @
6a99e848
...
@@ -81,7 +81,10 @@ now = DateTime()\n
...
@@ -81,7 +81,10 @@ now = DateTime()\n
\n
\n
add_kw_kw = {}\n
add_kw_kw = {}\n
for (add_kw, explanation) in add_kw_list:\n
for (add_kw, explanation) in add_kw_list:\n
existing = portal.portal_catalog.countResults(portal_type=\'Open Sale Order Line\', default_aggregate_uid=portal.restrictedTraverse(add_kw[\'aggregate\']).getUid())[0][0] >
0\n
existing = portal.portal_catalog.countResults(\n
portal_type=\'Open Sale Order Line\',\n
default_aggregate_uid=portal.restrictedTraverse(add_kw[\'aggregate\']).getUid()\n
)[0][0] >
0\n
if add_kw[\'aggregate\'] not in hosting_subscription_mapping and not existing:\n
if add_kw[\'aggregate\'] not in hosting_subscription_mapping and not existing:\n
add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n
add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n
add_kw_kw[add_kw[\'aggregate\']][\'explanation\'] = [\'Added because of %s \' % explanation]\n
add_kw_kw[add_kw[\'aggregate\']][\'explanation\'] = [\'Added because of %s \' % explanation]\n
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml
View file @
6a99e848
...
@@ -57,11 +57,15 @@ add_kw_list = []\n
...
@@ -57,11 +57,15 @@ add_kw_list = []\n
start_date_tuple_list = []\n
start_date_tuple_list = []\n
\n
\n
def getWorkflowDate(document, action):\n
def getWorkflowDate(document, action):\n
workflow_item_list = portal.portal_workflow.getInfoFor(ob=document, name=\'history\', wf_id=\'instance_slap_interface_workflow\')\n
workflow_item_list = portal.portal_workflow.getInfoFor(\n
ob=document,\n
name=\'history\',\n
wf_id=\'instance_slap_interface_workflow\')\n
for item in workflow_item_list:\n
for item in workflow_item_list:\n
if item.get(\'action\') == action:\n
if item.get(\'action\') == action:\n
return item.get(\'time\')\n
return item.get(\'time\')\n
raise ValueError(\'Document %s has no action %s\' % (document.getPath(), action))\n
raise ValueError(\'Document %s has no action %s\' % (document.getPath(),\n
action))\n
\n
\n
for hosting_subscription in portal.portal_catalog(\n
for hosting_subscription in portal.portal_catalog(\n
portal_type=\'Hosting Subscription\',\n
portal_type=\'Hosting Subscription\',\n
...
@@ -74,15 +78,23 @@ for hosting_subscription in portal.portal_catalog(\n
...
@@ -74,15 +78,23 @@ for hosting_subscription in portal.portal_catalog(\n
hosting_subscription = hosting_subscription.getObject()\n
hosting_subscription = hosting_subscription.getObject()\n
add_kw_list.append((add_kw, hosting_subscription.getPath()))\n
add_kw_list.append((add_kw, hosting_subscription.getPath()))\n
if hosting_subscription.getSlapState() == \'destroy_requested\':\n
if hosting_subscription.getSlapState() == \'destroy_requested\':\n
remove_hosting_list.append((hosting_subscription.getRelativeUrl(), hosting_subscription.getPath()))\n
remove_hosting_list.append((hosting_subscription.getRelativeUrl(),\n
hosting_subscription.getPath()))\n
try:\n
try:\n
start_date = getWorkflowDate(hosting_subscription, \'request_instance\')\n
start_date = getWorkflowDate(hosting_subscription, \'request_instance\')\n
except ValueError:\n
except ValueError:\n
start_date = hosting_subscription.getCreationDate()\n
start_date = hosting_subscription.getCreationDate()\n
start_date_tuple_list.append((hosting_subscription.getRelativeUrl(), start_date, hosting_subscription.getPath()))\n
start_date_tuple_list.append((hosting_subscription.getRelativeUrl(),\n
start_date,\n
hosting_subscription.getPath()))\n
\n
\n
\n
\n
result = context.Person_updateOpenSaleOrder(src__=src__, remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list, start_date_tuple_list=start_date_tuple_list, stop_date=stop_date)\n
result = context.Person_updateOpenSaleOrder(\n
src__=src__,\n
remove_hosting_list=remove_hosting_list,\n
add_kw_list=add_kw_list,\n
start_date_tuple_list=start_date_tuple_list,\n
stop_date=stop_date)\n
from pprint import pformat\n
from pprint import pformat\n
return pformat(result)\n
return pformat(result)\n
</string>
</value>
</string>
</value>
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml
View file @
6a99e848
...
@@ -66,8 +66,10 @@ def storeWorkflowComment(document, comment):\n
...
@@ -66,8 +66,10 @@ def storeWorkflowComment(document, comment):\n
portal.portal_workflow.doActionFor(document, \'edit_action\', comment=comment)\n
portal.portal_workflow.doActionFor(document, \'edit_action\', comment=comment)\n
\n
\n
add_kw_kw, modify_kw_kw, remove_id_list = context.Person_getOpenSaleOrderDifference(\n
add_kw_kw, modify_kw_kw, remove_id_list = context.Person_getOpenSaleOrderDifference(\n
remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list,\n
remove_hosting_list=remove_hosting_list,\n
stop_date=stop_date, start_date_tuple_list=start_date_tuple_list)\n
add_kw_list=add_kw_list,\n
stop_date=stop_date,\n
start_date_tuple_list=start_date_tuple_list)\n
\n
\n
if src__== 1:\n
if src__== 1:\n
return add_kw_kw, modify_kw_kw, remove_id_list\n
return add_kw_kw, modify_kw_kw, remove_id_list\n
...
...
master/bt5/slapos_accounting/bt/revision
View file @
6a99e848
217
218
\ 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