Commit 416c6212 authored by Jérome Perrin's avatar Jérome Perrin
Browse files

*: fix trade phase duplication in erp5_simulation_test and erp5_configurator_standard_categories

We had trade phase duplication:
 - `trade_phase/default/*` were provided by erp5_simulation_test
 - `trade_phase/trade/*` are provided by erp5_configurator_standard_categories

so the former was only for testing and the later were actually used in
instance configured by configurator.

But in some paths from configurator_standard_*template, which are also
used on configurated instances, were using trade_phase/default (the one
from test). Some rules were referencing these categories, but apparenlty
not using them.

To fix this confusion, use trade_phase/trade/* everywhere, and install
erp5_configurator_standard_categories where needed in tests.
parent d4a9d1c3
......@@ -96,9 +96,6 @@ class TestConversionInSimulation(AccountingTestCase):
_(category_tool.incoterm, [self.cpt_incoterm])
_(category_tool.quantity_unit,
[self.unit_piece_quantity_unit, self.mass_quantity_unit])
_(category_tool.trade_phase, ['default'])
_(category_tool.trade_phase.default,
['accounting', 'delivery', 'invoicing', 'discount', 'tax', 'payment'])
_(category_tool.product_line, ['apparel'])
def _solveDivergence(self, obj, prop, decision, group='line'):
......@@ -201,13 +198,13 @@ class TestConversionInSimulation(AccountingTestCase):
)
trade_phase = self.getCategoryTool().trade_phase
kw = dict(portal_type='Trade Model Path',
trade_date='trade_phase/default/order')
trade_date='trade_phase/trade/order')
business_process.newContent(
reference='default_path',
trade_phase_value_list=[x for x in trade_phase.default.objectValues()
trade_phase_value_list=[x for x in trade_phase.trade.objectValues()
if x.getId() != 'accounting'],
**kw)
kw.update(trade_phase='default/accounting',
kw.update(trade_phase='trade/accounting',
resource_value=resource,
membership_criterion_base_category_list=(
'destination_region',
......
......@@ -24,7 +24,7 @@
<tuple>
<string>base_application/base_amount/loyalty_program/collect_point</string>
<string>resource/service_module/test_loyalty_collect_point</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>use/loyalty_program/collect_point</string>
</tuple>
</value>
......
......@@ -23,7 +23,7 @@
<value>
<tuple>
<string>resource/service_module/test_loyalty_discount</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>base_application/base_amount/loyalty_program/discount</string>
</tuple>
</value>
......
......@@ -23,7 +23,7 @@
<value>
<tuple>
<string>resource/service_module/test_loyalty_using_point</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>base_application/base_amount/loyalty_program/using_point</string>
</tuple>
</value>
......
......@@ -64,7 +64,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
</tuple>
</value>
</item>
......
......@@ -24,7 +24,7 @@
<tuple>
<string>base_application/base_amount/loyalty_program/collect_point</string>
<string>resource/service_module/test_loyalty_collect_point</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>use/loyalty_program/collect_point</string>
</tuple>
</value>
......
......@@ -23,7 +23,7 @@
<value>
<tuple>
<string>resource/service_module/test_loyalty_coupon</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>base_application/base_amount/loyalty_program/coupon</string>
</tuple>
</value>
......
......@@ -23,7 +23,7 @@
<value>
<tuple>
<string>resource/service_module/test_loyalty_discount</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>base_application/base_amount/loyalty_program/discount</string>
</tuple>
</value>
......
......@@ -23,7 +23,7 @@
<value>
<tuple>
<string>resource/service_module/test_loyalty_using_point</string>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
<string>base_application/base_amount/loyalty_program/using_point</string>
</tuple>
</value>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/accounting</string>
<string>trade_phase/trade/accounting</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/payment</string>
<string>trade_phase/trade/payment</string>
</tuple>
</value>
</item>
......
......@@ -64,7 +64,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/invoicing</string>
<string>trade_phase/trade/invoicing</string>
</tuple>
</value>
</item>
......
......@@ -64,7 +64,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/accounting</string>
<string>trade_phase/trade/accounting</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/delivery</string>
<string>trade_phase/trade/delivery</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/delivery</string>
<string>trade_phase/trade/delivery</string>
</tuple>
</value>
</item>
......
......@@ -40,7 +40,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/order</string>
<string>trade_phase/trade/order</string>
</tuple>
</value>
</item>
......
......@@ -79,7 +79,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/delivery</string>
<string>trade_phase/trade/delivery</string>
</tuple>
</value>
</item>
......
......@@ -79,7 +79,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/order</string>
<string>trade_phase/trade/order</string>
</tuple>
</value>
</item>
......
......@@ -79,7 +79,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>trade_phase/default/delivery</string>
<string>trade_phase/trade/delivery</string>
</tuple>
</value>
</item>
......
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