Commit 405bda3b authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: improve titles

parent 485c4148
......@@ -21,7 +21,7 @@ else:
raise NotImplementedError('Unhandled open order state: %s' % open_sale_order.getValidationState())
sale_packing_list_edit_kw = dict(
title="discount for %s" % open_sale_order.getReference(),
title=title,
start_date=start_date,
# It should match the first open order invoice
stop_date=next_period_date,
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>current_date, activate_kw=None, REQUEST=None</string> </value>
<value> <string>current_date, title, activate_kw=None, REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -67,7 +67,7 @@ open_sale_order.OpenSaleOrder_archiveIfUnusedItem(check_unused_item=False)
# if we want to always activate a discount as soon as an open order is archived (outside subscription change request)
# it is needed to call OpenSaleOrderCell_createDiscountSalePackingList is an interaction workflow
# with more extra checks.
open_order_movement.OpenSaleOrderCell_createDiscountSalePackingList(current_date)#, activate_kw=activate_kw)
open_order_movement.OpenSaleOrderCell_createDiscountSalePackingList(current_date, 'transfer discount from %s to %s' % (open_sale_order.getReference(), next_open_sale_order.getReference()))#, activate_kw=activate_kw)
# Change Subscripted Item user if needed
subscribed_item = open_order_movement.getAggregateValue(portal_type=['Instance Tree', 'Compute Node', 'Project'])
......
......@@ -130,6 +130,6 @@ open_sale_order.validate()
#######################################################
# Discount
open_order_cell.OpenSaleOrderCell_createDiscountSalePackingList(current_date, activate_kw=activate_kw)
open_order_cell.OpenSaleOrderCell_createDiscountSalePackingList(current_date, "first invoice discount for %s" % open_sale_order.getReference(), activate_kw=activate_kw)
return open_sale_order
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