Commit f1864c6c authored by Romain Courteaud's avatar Romain Courteaud

TO SQUASH slapos_*: rename couscous trade condition

parent 27056273
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>couscous_trade_condition</string> </value> <value> <string>default_subscription_trade_condition</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>couscous_trade_condition</string> </value> <value> <string>default_subscription_trade_condition</string> </value>
</item> </item>
<item> <item>
<key> <string>language</string> </key> <key> <string>language</string> </key>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Couscous trade condition</string> </value> <value> <string>Default subscription trade condition</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>997.40299.33951.46830</string> </value> <value> <string>999.4006.48979.14984</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1642600179.81</float> <float>1648026796.66</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -75,6 +75,10 @@ ...@@ -75,6 +75,10 @@
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Sale Supply Line</string> </value> <value> <string>Sale Supply Line</string> </value>
</item> </item>
<item>
<key> <string>priced_quantity</string> </key>
<value> <float>1.0</float> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Instance Subscription price</string> </value> <value> <string>Instance Subscription price</string> </value>
......
...@@ -2,7 +2,7 @@ portal = context.getPortalObject() ...@@ -2,7 +2,7 @@ portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
method_id='InstanceTree_requestUpdateOpenSaleOrder', method_id='InstanceTree_requestUpdateOpenSaleOrder',
method_kw=dict(specialise="sale_trade_condition_module/couscous_trade_condition", ), method_kw=dict(specialise="sale_trade_condition_module/default_subscription_trade_condition", ),
portal_type="Instance Tree", portal_type="Instance Tree",
causality_state="diverged", causality_state="diverged",
activate_kw={'tag': tag, 'priority': 2}, activate_kw={'tag': tag, 'priority': 2},
......
...@@ -131,14 +131,14 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -131,14 +131,14 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.assertRaises( self.assertRaises(
Unauthorized, Unauthorized,
subscription.InstanceTree_requestUpdateOpenSaleOrder, subscription.InstanceTree_requestUpdateOpenSaleOrder,
"sale_trade_condition_module/couscous_trade_condition", "sale_trade_condition_module/default_subscription_trade_condition",
REQUEST={}) REQUEST={})
def test_solved_InstanceTree(self): def test_solved_InstanceTree(self):
subscription = self.portal.instance_tree_module\ subscription = self.portal.instance_tree_module\
.template_instance_tree.Base_createCloneDocument(batch_mode=1) .template_instance_tree.Base_createCloneDocument(batch_mode=1)
self.portal.portal_workflow._jumpToStateFor(subscription, 'solved') self.portal.portal_workflow._jumpToStateFor(subscription, 'solved')
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
def test_empty_InstanceTree(self): def test_empty_InstanceTree(self):
...@@ -153,7 +153,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -153,7 +153,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder( subscription.InstanceTree_requestUpdateOpenSaleOrder(
specialise="sale_trade_condition_module/couscous_trade_condition" specialise="sale_trade_condition_module/default_subscription_trade_condition"
) )
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -169,7 +169,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -169,7 +169,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
sale_trade_condition = open_sale_order.getSpecialiseValue() sale_trade_condition = open_sale_order.getSpecialiseValue()
self.assertEqual( self.assertEqual(
"sale_trade_condition_module/couscous_trade_condition", "sale_trade_condition_module/default_subscription_trade_condition",
sale_trade_condition.getRelativeUrl() sale_trade_condition.getRelativeUrl()
) )
sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0] sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0]
...@@ -231,7 +231,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -231,7 +231,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder( subscription.InstanceTree_requestUpdateOpenSaleOrder(
specialise="sale_trade_condition_module/couscous_trade_condition" specialise="sale_trade_condition_module/default_subscription_trade_condition"
) )
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -250,7 +250,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -250,7 +250,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
sale_trade_condition = open_sale_order.getSpecialiseValue() sale_trade_condition = open_sale_order.getSpecialiseValue()
self.assertEqual( self.assertEqual(
"sale_trade_condition_module/couscous_trade_condition", "sale_trade_condition_module/default_subscription_trade_condition",
sale_trade_condition.getRelativeUrl() sale_trade_condition.getRelativeUrl()
) )
sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0] sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0]
...@@ -300,7 +300,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -300,7 +300,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder( subscription.InstanceTree_requestUpdateOpenSaleOrder(
specialise="sale_trade_condition_module/couscous_trade_condition" specialise="sale_trade_condition_module/default_subscription_trade_condition"
) )
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -384,7 +384,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -384,7 +384,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
subscription.fixConsistency() subscription.fixConsistency()
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -417,7 +417,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -417,7 +417,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
}] }]
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
open_sale_order_list = self.portal.portal_catalog( open_sale_order_list = self.portal.portal_catalog(
...@@ -431,7 +431,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -431,7 +431,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
sale_trade_condition = open_sale_order.getSpecialiseValue() sale_trade_condition = open_sale_order.getSpecialiseValue()
self.assertEqual( self.assertEqual(
"sale_trade_condition_module/couscous_trade_condition", "sale_trade_condition_module/default_subscription_trade_condition",
sale_trade_condition.getRelativeUrl() sale_trade_condition.getRelativeUrl()
) )
sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0] sale_supply_line = sale_trade_condition.contentValues(portql_type="Sale Supply Line")[0]
...@@ -482,7 +482,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -482,7 +482,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.tic() self.tic()
subscription2.InstanceTree_requestUpdateOpenSaleOrder( subscription2.InstanceTree_requestUpdateOpenSaleOrder(
specialise="sale_trade_condition_module/couscous_trade_condition" specialise="sale_trade_condition_module/default_subscription_trade_condition"
) )
self.tic() self.tic()
...@@ -505,7 +505,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -505,7 +505,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
sale_trade_condition2 = open_sale_order.getSpecialiseValue() sale_trade_condition2 = open_sale_order.getSpecialiseValue()
self.assertEqual( self.assertEqual(
"sale_trade_condition_module/couscous_trade_condition", "sale_trade_condition_module/default_subscription_trade_condition",
sale_trade_condition2.getRelativeUrl() sale_trade_condition2.getRelativeUrl()
) )
...@@ -570,7 +570,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -570,7 +570,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.portal.portal_workflow._jumpToStateFor(subscription, 'validated') self.portal.portal_workflow._jumpToStateFor(subscription, 'validated')
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
request_time = DateTime('2112/01/01') request_time = DateTime('2112/01/01')
...@@ -584,7 +584,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -584,7 +584,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
}) })
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -619,7 +619,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -619,7 +619,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.assertEqual(subscription.getCausalityState(), 'diverged') self.assertEqual(subscription.getCausalityState(), 'diverged')
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -629,7 +629,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -629,7 +629,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.assertEqual(subscription.getSlapState(), 'draft') self.assertEqual(subscription.getSlapState(), 'draft')
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
...@@ -645,7 +645,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin): ...@@ -645,7 +645,7 @@ class TestInstanceTree_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
self.portal.portal_workflow._jumpToStateFor(subscription, 'destroy_requested') self.portal.portal_workflow._jumpToStateFor(subscription, 'destroy_requested')
self.tic() self.tic()
subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/couscous_trade_condition") subscription.InstanceTree_requestUpdateOpenSaleOrder(specialise="sale_trade_condition_module/default_subscription_trade_condition")
self.tic() self.tic()
self.assertEqual(subscription.getCausalityState(), 'solved') self.assertEqual(subscription.getCausalityState(), 'solved')
......
...@@ -430,7 +430,7 @@ class TestHostingSubscriptionSimulation(SlapOSTestCaseMixin): ...@@ -430,7 +430,7 @@ class TestHostingSubscriptionSimulation(SlapOSTestCaseMixin):
) )
self.portal.portal_workflow._jumpToStateFor(self.instance_tree, 'validated') self.portal.portal_workflow._jumpToStateFor(self.instance_tree, 'validated')
open_order = self.instance_tree.InstanceTree_requestUpdateOpenSaleOrder( open_order = self.instance_tree.InstanceTree_requestUpdateOpenSaleOrder(
specialise="sale_trade_condition_module/couscous_trade_condition" specialise="sale_trade_condition_module/default_subscription_trade_condition"
) )
self.initial_date = DateTime('2011/02/16') self.initial_date = DateTime('2011/02/16')
......
currency_module/CNY currency_module/CNY
currency_module/EUR currency_module/EUR
sale_trade_condition_module/couscous_trade_condition sale_trade_condition_module/default_subscription_trade_condition
sale_trade_condition_module/slapos_aggregated_trade_condition_v3 sale_trade_condition_module/slapos_aggregated_trade_condition_v3
sale_trade_condition_module/slapos_aggregated_trade_condition_v3/** sale_trade_condition_module/slapos_aggregated_trade_condition_v3/**
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
......
...@@ -72,8 +72,8 @@ portal_solvers/Automatic Quantity Adopt Solver/** ...@@ -72,8 +72,8 @@ portal_solvers/Automatic Quantity Adopt Solver/**
sale_packing_list_module/slapos_accounting_instance_delivery_line_template sale_packing_list_module/slapos_accounting_instance_delivery_line_template
sale_packing_list_module/slapos_accounting_instance_delivery_line_template/** sale_packing_list_module/slapos_accounting_instance_delivery_line_template/**
sale_packing_list_module/slapos_accounting_instance_delivery_template sale_packing_list_module/slapos_accounting_instance_delivery_template
sale_trade_condition_module/couscous_trade_condition sale_trade_condition_module/default_subscription_trade_condition
sale_trade_condition_module/couscous_trade_condition/** sale_trade_condition_module/default_subscription_trade_condition/**
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition sale_trade_condition_module/slapos_aggregated_consumption_trade_condition
sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/** sale_trade_condition_module/slapos_aggregated_consumption_trade_condition/**
sale_trade_condition_module/slapos_aggregated_subscription_trade_condition sale_trade_condition_module/slapos_aggregated_subscription_trade_condition
......
...@@ -713,7 +713,7 @@ return %s""" % (script_name, fake_return )) ...@@ -713,7 +713,7 @@ return %s""" % (script_name, fake_return ))
'accounting_module/template_pre_payment_subscription_sale_invoice_transaction' 'accounting_module/template_pre_payment_subscription_sale_invoice_transaction'
) )
self.portal.sale_trade_condition_module.couscous_trade_condition.edit( self.portal.sale_trade_condition_module.default_subscription_trade_condition.edit(
source_section='organisation_module/slapos', source_section='organisation_module/slapos',
source='organisation_module/slapos' source='organisation_module/slapos'
) )
...@@ -764,7 +764,7 @@ return %s""" % (script_name, fake_return )) ...@@ -764,7 +764,7 @@ return %s""" % (script_name, fake_return ))
source_value=organisation source_value=organisation
) )
self.portal.sale_trade_condition_module.couscous_trade_condition.edit( self.portal.sale_trade_condition_module.default_subscription_trade_condition.edit(
source_section_value=organisation, source_section_value=organisation,
source_value=organisation source_value=organisation
) )
...@@ -835,7 +835,7 @@ return %s""" % (script_name, fake_return )) ...@@ -835,7 +835,7 @@ return %s""" % (script_name, fake_return ))
source_value=fr_organisation source_value=fr_organisation
) )
self.portal.sale_trade_condition_module.couscous_trade_condition.edit( self.portal.sale_trade_condition_module.default_subscription_trade_condition.edit(
source_section_value=fr_organisation, source_section_value=fr_organisation,
source_value=fr_organisation source_value=fr_organisation
) )
......
...@@ -1709,7 +1709,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -1709,7 +1709,7 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
# Disable on this test the pricing on the template to not generate debt before # Disable on this test the pricing on the template to not generate debt before
# them expected # them expected
supply_line = self.portal.sale_trade_condition_module.\ supply_line = self.portal.sale_trade_condition_module.\
couscous_trade_condition.\ default_subscription_trade_condition.\
subscription_price_eur subscription_price_eur
previous_price = supply_line.getBasePrice() previous_price = supply_line.getBasePrice()
......
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