Commit 7d2f1455 authored by Łukasz Nowak's avatar Łukasz Nowak

Support early delete Hosting Subscriptions.

parent 4bce0322
......@@ -152,7 +152,12 @@ if previous_open_sale_order is not None:\n
continue\n
if remove_hosting in hosting_subscription_mapping:\n
line = previous_open_sale_order[hosting_subscription_mapping.get(remove_hosting)]\n
if line.getStartDate() is not None and line.getStopDate() is not None and line.getStartDate() < line.getStopDate():\n
order_line_cancelled = False\n
order_line = line.getAggregateValue(portal_type=\'Hosting Subscription\').getAggregateRelatedValue(portal_type=\'Sale Order Line\')\n
if order_line is not None:\n
if order_line.getSimulationState() == \'cancelled\':\n
order_line_cancelled = True\n
if order_line_cancelled or (line.getStartDate() is not None and line.getStopDate() is not None and line.getStartDate() < line.getStopDate()):\n
remove_id_list.add(line.getId())\n
return add_kw_kw, modify_kw_kw, hs_modify_kw_kw, list(remove_id_list)\n
......
670
\ No newline at end of file
671
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment