Commit a483e0b4 authored by Romain Courteaud's avatar Romain Courteaud 🐙

slapos_accounting: drop compatibility with expliciate trade condition usage

parent 17885d22
...@@ -44,7 +44,6 @@ def newOpenOrder(start_date, service, ...@@ -44,7 +44,6 @@ def newOpenOrder(start_date, service,
open_sale_order = module.newContent( open_sale_order = module.newContent(
portal_type=order_portal_type, portal_type=order_portal_type,
temp_object=temp_order, temp_object=temp_order,
specialise=specialise,
effective_date=DateTime(), effective_date=DateTime(),
start_date=start_date, start_date=start_date,
# Ensure stop date value is higher than start date # Ensure stop date value is higher than start date
...@@ -109,10 +108,6 @@ def newOpenOrder(start_date, service, ...@@ -109,10 +108,6 @@ def newOpenOrder(start_date, service,
open_sale_order.SaleOrder_applySaleTradeCondition(batch_mode=1, force=1) open_sale_order.SaleOrder_applySaleTradeCondition(batch_mode=1, force=1)
# Check compatibility with previous template
if specialise is not None:
assert open_sale_order.getSpecialise() == specialise
if price is None: if price is None:
price = open_order_cell.getPrice() price = open_order_cell.getPrice()
...@@ -165,7 +160,7 @@ if instance_tree.getCausalityState() == 'diverged': ...@@ -165,7 +160,7 @@ if instance_tree.getCausalityState() == 'diverged':
# Search for matching resource # Search for matching resource
service, software_release, software_type = instance_tree.InstanceTree_getSoftwareProduct() service, software_release, software_type = instance_tree.InstanceTree_getSoftwareProduct()
if (service is None) or (service.getUse() != 'trade/sale'): if (service is None) or (service.getUse() != 'trade/sale'):
# XXX Add comment on instance tree storeWorkflowComment(instance_tree, "No software product found")
return return
#raise NotImplementedError('No Software Product defined for %s' % instance_tree.getRelativeUrl()) #raise NotImplementedError('No Software Product defined for %s' % instance_tree.getRelativeUrl())
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>specialise=None, REQUEST=None</string> </value> <value> <string>REQUEST=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
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