Commit 830aee3e authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: add comment if price not found

parent 99ab8293
...@@ -37,6 +37,7 @@ def newOpenOrder(start_date, service, ...@@ -37,6 +37,7 @@ def newOpenOrder(start_date, service,
module = portal.open_sale_order_module module = portal.open_sale_order_module
open_sale_order = module.newContent( open_sale_order = module.newContent(
portal_type=order_portal_type,
temp_object=temp_order, temp_object=temp_order,
specialise=specialise, specialise=specialise,
effective_date=DateTime(), effective_date=DateTime(),
...@@ -51,7 +52,6 @@ def newOpenOrder(start_date, service, ...@@ -51,7 +52,6 @@ def newOpenOrder(start_date, service,
title="%s SlapOS Subscription" % person.getTitle(), title="%s SlapOS Subscription" % person.getTitle(),
ledger_value=portal.portal_categories.ledger.automated, ledger_value=portal.portal_categories.ledger.automated,
destination_project_value=instance_tree.getFollowUpValue(), destination_project_value=instance_tree.getFollowUpValue(),
activate_kw=activate_kw
) )
resource_vcl = [ resource_vcl = [
...@@ -188,6 +188,7 @@ if instance_tree.getCausalityState() == 'diverged': ...@@ -188,6 +188,7 @@ if instance_tree.getCausalityState() == 'diverged':
if order_cell.getPrice() is None: if order_cell.getPrice() is None:
# No price found, do not create anything for now # No price found, do not create anything for now
# XXX add comment on Instance Tree # XXX add comment on Instance Tree
storeWorkflowComment(instance_tree, "No price found")
return return
open_sale_order, open_order_line, open_order_cell = newOpenOrder( open_sale_order, open_order_line, open_order_cell = newOpenOrder(
start_date, service, start_date, service,
...@@ -205,7 +206,7 @@ if instance_tree.getCausalityState() == 'diverged': ...@@ -205,7 +206,7 @@ if instance_tree.getCausalityState() == 'diverged':
assert open_order_line.getBaseContributionList()[1] == 'base_amount/invoicing/taxable' assert open_order_line.getBaseContributionList()[1] == 'base_amount/invoicing/taxable'
assert open_order_line.getUse() == 'trade/sale' assert open_order_line.getUse() == 'trade/sale'
#assert open_order_line.getPrice() == 1, open_order_line.getPrice() #assert open_order_line.getPrice() == 1, open_order_line.getPrice()
#assert open_order_line.getQuantity() == 1 assert open_order_line.getQuantity() == 1
open_sale_order.OpenSaleOrder_updatePeriod() open_sale_order.OpenSaleOrder_updatePeriod()
......
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