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
Xiaowu Zhang
slapos.core
Commits
0bae9056
Commit
0bae9056
authored
Mar 29, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid needless and undesired modification of HS periodicity.
parent
352c3e6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Person_getOpenOrderDifference.xml
...portal_skins/vifib_slap/Person_getOpenOrderDifference.xml
+13
-12
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/Person_getOpenOrderDifference.xml
View file @
0bae9056
...
...
@@ -93,27 +93,28 @@ for start_date_tuple in start_date_tuple_list:\n
start_date = getClosestDate(target_date=start_date_tuple[1], precision=\'day\')\n
while start_date.day() >= 29:\n
start_date = addToDate(start_date, to_add={\'day\': -1})\n
start_date_modified = False\n
if start_date_tuple[0] in hosting_subscription_mapping:\n
line_id = hosting_subscription_mapping[start_date_tuple[0]]\n
line = previous_open_sale_order[line_id]\n
if line.getStartDate() is None:\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')] = {\'start_date\': start_date}\n
modify_kw_kw[line.getAggregate(portal_type=\'Hosting Subscription\')][\'explanation\'] = [\'Set start date because of %s\' % explanation]\n
else:\n
# reset start_date to possibly already set up on Open Order Line\n
start_date = line.getStartDate()\n
start_date_modified = True\n
elif start_date_tuple[0] in add_kw_kw:\n
add_kw_kw[start_date_tuple[0]][\'start_date\'] = start_date\n
add_kw_kw[start_date_tuple[0]][\'explanation\'].append(\'Added start date beacuse of %s\' % explanation)\n
hs = portal.restrictedTraverse(start_date_tuple[0])\n
if hs.getPeriodicityMonthDayList() != [start_date.day()]:\n
hs_modify_kw_kw.setdefault(start_date_tuple[0], {})\n
hs_modify_kw_kw[start_date_tuple[0]] = dict(\n
periodicity_month_day_list = [start_date.day()],\n
periodicity_hour_list=[0],\n
periodicity_minute_list=[0]\n
)\n
hs_modify_kw_kw[start_date_tuple[0]][\'explanation\'] = \'Set up because of %s\' % explanation\n
start_date_modified = True\n
if start_date_modified:\n
hs = portal.restrictedTraverse(start_date_tuple[0])\n
if hs.getPeriodicityMonthDayList() != [start_date.day()]:\n
hs_modify_kw_kw.setdefault(start_date_tuple[0], {})\n
hs_modify_kw_kw[start_date_tuple[0]] = dict(\n
periodicity_month_day_list = [start_date.day()],\n
periodicity_hour_list=[0],\n
periodicity_minute_list=[0]\n
)\n
hs_modify_kw_kw[start_date_tuple[0]][\'explanation\'] = \'Set up because of %s\' % explanation\n
\n
if previous_open_sale_order is not None:\n
for line in previous_open_sale_order.contentValues(portal_type=\'Open Sale Order Line\'):\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
0bae9056
686
\ No newline at end of file
687
\ 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