Commit 825c5b68 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: add comment on the discount packing list

parent 69526e77
......@@ -42,13 +42,14 @@ sale_packing_list_edit_kw = dict(
if (0 < unused_day_count):#(subscription_request.getPrice() != 0) and (0 < unused_day_count):
if (0 < unused_day_count):
# If the open order starts before today,
# generate a discount to the user on his next invoice
# and reduce the stock consumption
sale_packing_list = portal.sale_packing_list_module.newContent(
portal_type="Sale Packing List",
# description='XXX unused day %s - prevision %s' % (unused_day_count, context.getQuantityPrecisionFromResource(subscription_request.getResourceValue())),
comment="%s unused days of %s" % (unused_day_count, next_period_date-start_date),
**sale_packing_list_edit_kw
)
......@@ -121,8 +122,6 @@ if (0 < unused_day_count):#(subscription_request.getPrice() != 0) and (0 < unuse
# Quantity is negative, to reduce the stock of the consumed product
quantity=-quantity,
price=open_sale_order_cell.getPrice(),
# quantity=1,
# price=price,
aggregate_value_list=aggregate_value_list,
activate_kw=activate_kw
)
......
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