diff --git a/bt5/erp5_mrp/TestTemplateItem/portal_components/test.erp5.testMRP.py b/bt5/erp5_mrp/TestTemplateItem/portal_components/test.erp5.testMRP.py index 4afa4d63395eae2b615f8fa16e3942ca08a860b4..d6e08d8a7d2c493c460c1799bb51c61a80f0e0b0 100644 --- a/bt5/erp5_mrp/TestTemplateItem/portal_components/test.erp5.testMRP.py +++ b/bt5/erp5_mrp/TestTemplateItem/portal_components/test.erp5.testMRP.py @@ -28,7 +28,7 @@ import unittest from DateTime import DateTime -from Products.ERP5.tests.testBPMCore import TestBPMMixin +from erp5.component.test.testBPMCore import TestBPMMixin class TestMRPMixin(TestBPMMixin): diff --git a/bt5/erp5_payroll/TestTemplateItem/portal_components/test.erp5.testPayroll.py b/bt5/erp5_payroll/TestTemplateItem/portal_components/test.erp5.testPayroll.py index 9259408e5193c368173adcd91eb6b361d9222e1e..e14eb50c5a6c3e9b064382ac3880274034281ba5 100644 --- a/bt5/erp5_payroll/TestTemplateItem/portal_components/test.erp5.testPayroll.py +++ b/bt5/erp5_payroll/TestTemplateItem/portal_components/test.erp5.testPayroll.py @@ -27,7 +27,7 @@ # ############################################################################## from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5ReportTestCase -from Products.ERP5.tests.testTradeModelLine import TestTradeModelLineMixin +from erp5.component.test.testTradeModelLine import TestTradeModelLineMixin from AccessControl.SecurityManagement import newSecurityManager from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.utils import reindex diff --git a/product/ERP5/tests/testBPMCore.py b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.py similarity index 99% rename from product/ERP5/tests/testBPMCore.py rename to bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.py index eb1e731969ef95a761d790985060da974651c3c7..40bca7c19885ff615b316598e4bee9f174c58d82 100644 --- a/product/ERP5/tests/testBPMCore.py +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.py @@ -166,7 +166,7 @@ class TestBPMMixin(ERP5TypeTestCase): return business_link def createTradeModelPath(self, business_process=None, - criterion_property_dict={}, **kw): + criterion_property_dict=None, **kw): if business_process is None: business_process = self.createBusinessProcess() if kw.get('reference') and not kw.get('id'): @@ -175,8 +175,8 @@ class TestBPMMixin(ERP5TypeTestCase): portal_type=self.trade_model_path_portal_type, **kw) if criterion_property_dict: trade_model_path._setCriterionPropertyList(tuple(criterion_property_dict)) - for property, identity in criterion_property_dict.iteritems(): - trade_model_path.setCriterion(property, identity) + for property_, identity in criterion_property_dict.iteritems(): + trade_model_path.setCriterion(property_, identity) reference = kw.get('reference', None) if reference is not None: setattr(self, reference, trade_model_path) @@ -605,6 +605,7 @@ class TestBPMImplementation(TestBPMDummyDeliveryMovementMixin): checkExpectedDates(self.delivery_simulation_movement.getParentValue(), base_date, base_date + 2) + # pylint: disable=anomalous-backslash-in-string """ XXX More complex scenarios must be tested, like when several path are possible like this : diff --git a/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.xml b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.xml new file mode 100644 index 0000000000000000000000000000000000000000..816a7a92f41e5d88bc1c2311e888001ccc50982a --- /dev/null +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testBPMCore.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testBPMCore</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testBPMCore</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testBPMCore</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/tests/testComplexTradeModelLineUseCase.py b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.py similarity index 99% rename from product/ERP5/tests/testComplexTradeModelLineUseCase.py rename to bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.py index 9fd369edb5f566a32bb3597895b7b4dcb4f4fe65..78ac6942dc5aaf8a492caa5c8ab53d395b281c7b 100644 --- a/product/ERP5/tests/testComplexTradeModelLineUseCase.py +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.py @@ -28,7 +28,7 @@ ############################################################################## import unittest -from Products.ERP5.tests.testTradeModelLine import TestTradeModelLineMixin +from erp5.component.test.testTradeModelLine import TestTradeModelLineMixin class TestComplexTradeModelLineUseCase(TestTradeModelLineMixin): diff --git a/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.xml b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.xml new file mode 100644 index 0000000000000000000000000000000000000000..c95ffbb48ee82ad447b9c12f336da6252b0b9371 --- /dev/null +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testComplexTradeModelLineUseCase.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testComplexTradeModelLineUseCase</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testComplexTradeModelLineUseCase</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testComplexTradeModelLineUseCase</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/tests/testTradeCondition.py b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.py similarity index 98% rename from product/ERP5/tests/testTradeCondition.py rename to bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.py index 07e1e967bb730a40ff1a2bf6e975a16f7d16507d..f97bb1b9af743fe70bb39a681687d9ca6ceb670c 100644 --- a/product/ERP5/tests/testTradeCondition.py +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.py @@ -252,7 +252,7 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): # Order ---> TC (123) # # price should be 123 - supply_line = self.trade_condition.newContent( + self.trade_condition.newContent( portal_type=self.supply_line_type, resource_value=self.resource, base_price=123) @@ -347,10 +347,10 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): source_section_value=self.vendor, destination_section_value=self.client) other_supply.validate() - other_supply_line = other_supply.newContent( + other_supply.newContent( portal_type=self.supply_line_type, base_price=1) - supply_line = self.trade_condition.newContent( + self.trade_condition.newContent( portal_type=self.supply_line_type, resource_value=self.resource, base_price=2) @@ -426,10 +426,10 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): source_section_value=self.vendor, destination_section_value=self.client) other_supply.validate() - other_supply_line = other_supply.newContent( + other_supply.newContent( portal_type=self.supply_line_type, base_price=1) - supply_line = self.trade_condition.newContent( + self.trade_condition.newContent( portal_type=self.supply_line_type, resource_value=self.resource, base_price=2) @@ -458,11 +458,11 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): source_section_value=self.vendor, destination_section_value=self.client) other_supply.validate() - other_supply_line = other_supply.newContent( + other_supply.newContent( portal_type=self.supply_line_type, base_price=1) self.trade_condition.setReference(self.id()) - supply_line = self.trade_condition.newContent( + self.trade_condition.newContent( portal_type=self.supply_line_type, resource_value=self.resource, base_price=2) @@ -482,7 +482,7 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): def test_supply_line_in_other_trade_condition_does_not_apply(self): """Supply lines from trade condition not related to an order does not apply. """ - supply_line = self.trade_condition.newContent( + self.trade_condition.newContent( portal_type=self.supply_line_type, resource_value=self.resource, base_price=2) @@ -502,14 +502,14 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): def test_supply_line_section(self): # if a supply lines defines a section, it has priority over supply lines # not defining sections - other_entity = self.portal.organisation_module.newContent( + self.portal.organisation_module.newContent( portal_type='Organisation', title='Other') supply = self.portal.getDefaultModule(self.supply_type ).newContent(portal_type=self.supply_type, resource_value=self.resource,) supply.validate() - supply_line = supply.newContent( + supply.newContent( portal_type=self.supply_line_type, base_price=1) @@ -519,7 +519,7 @@ class TestTradeConditionSupplyLine(TradeConditionTestCase): destination_section_value=self.client, source_section_value=self.vendor) other_supply.validate() - other_supply_line = other_supply.newContent( + other_supply.newContent( portal_type=self.supply_line_type, base_price=2) diff --git a/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.xml b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b2c9c075f246f79e770e229380708af18fec8c8 --- /dev/null +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeCondition.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testTradeCondition</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testTradeCondition</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testTradeCondition</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/tests/testTradeModelLine.py b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.py similarity index 98% rename from product/ERP5/tests/testTradeModelLine.py rename to bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.py index 0d1cb3b3416d7ac9f83eae2936d8dc31e21817e1..7ec216dc74fde2449162060f28d595ed40acb91e 100644 --- a/product/ERP5/tests/testTradeModelLine.py +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.py @@ -33,7 +33,7 @@ import random import unittest from unittest import expectedFailure -from Products.ERP5.tests.testBPMCore import TestBPMMixin +from erp5.component.test.testBPMCore import TestBPMMixin from Products.ERP5Type.Base import Base from Products.ERP5Type.Utils import simple_decorator from DateTime import DateTime @@ -413,11 +413,11 @@ class TestTradeModelLine(TestTradeModelLineMixin): def checkTradeModelRuleSimulationExpand(self, delivery): expected_result_dict = self[delivery.getPath()] - price_currency = self['price_currency'] for line in delivery.getMovementList(): - simulation_movement_list, = \ - self.getTradeModelSimulationMovementList(line) + simulation_movement_list_list = self.getTradeModelSimulationMovementList(line) + self.assertEqual(len(simulation_movement_list_list), 1) + simulation_movement_list = simulation_movement_list_list[0] result_dict = {sm.getResourceValue().getUse(): sm for sm in simulation_movement_list} self.assertEqual(len(simulation_movement_list), @@ -662,7 +662,7 @@ class TestTradeModelLine(TestTradeModelLineMixin): self.test_01_OrderWithSimpleTaxedAndDiscountedLines('packing_list') for line in packing_list.getMovementList(): - line.setQuantity(line.getQuantity() * + line.setQuantity(line.getQuantity() * self.modified_packing_list_line_quantity_ratio) self.tic() self.checkCausalityState(packing_list, 'diverged') @@ -1179,10 +1179,10 @@ return lambda *args, **kw: 1""") base_contribution_list = 'base_amount/tax', bounded_fee kw = {'portal_type': self.order_line_portal_type, 'base_contribution_list': base_contribution_list} - order_line_1 = order.newContent(price=1000, quantity=1, - resource_value=resource_A, **kw) - order_line_2 = order.newContent(price=500, quantity=1, - resource_value=resource_B, **kw) + order.newContent(price=1000, quantity=1, + resource_value=resource_A, **kw) + order.newContent(price=500, quantity=1, + resource_value=resource_B, **kw) amount_list = order.getGeneratedAmountList() self.assertEqual([75], [x.getTotalPrice() for x in amount_list]) @@ -1206,12 +1206,12 @@ return lambda *args, **kw: 1""") base_application=fixed_quantity, price=1) # for delivery level - discount = self.createTradeModelLine(trade_condition, - reference='DISCOUNT_B', - resource_value=tax, - base_application=fixed_quantity, - target_delivery=True, - quantity=10, price=-1) + self.createTradeModelLine(trade_condition, + reference='DISCOUNT_B', + resource_value=tax, + base_application=fixed_quantity, + target_delivery=True, + quantity=10, price=-1) self.commit()# flush transactional cache diff --git a/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.xml b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.xml new file mode 100644 index 0000000000000000000000000000000000000000..2a35033bce6db5a0ab75531d2ab82df8033eb594 --- /dev/null +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLine.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testTradeModelLine</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testTradeModelLine</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testTradeModelLine</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/tests/testTradeModelLinePurchase.py b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.py similarity index 97% rename from product/ERP5/tests/testTradeModelLinePurchase.py rename to bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.py index 2d4d15ce37df46d943a2a4302b083feb9e6d7aff..be593c70a2b5042438832751820cb128268a245c 100644 --- a/product/ERP5/tests/testTradeModelLinePurchase.py +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.py @@ -28,7 +28,7 @@ ############################################################################## import unittest -from Products.ERP5.tests.testTradeModelLine import TestTradeModelLine +from erp5.component.test.testTradeModelLine import TestTradeModelLine class TestTradeModelLinePurchase(TestTradeModelLine): invoice_portal_type = 'Purchase Invoice Transaction' diff --git a/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.xml b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.xml new file mode 100644 index 0000000000000000000000000000000000000000..19fdbc63c641a17fd1299e6f8667aad9c40ac148 --- /dev/null +++ b/bt5/erp5_simplified_invoicing/TestTemplateItem/portal_components/test.erp5.testTradeModelLinePurchase.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testTradeModelLinePurchase</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testTradeModelLinePurchase</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testTradeModelLinePurchase</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_simplified_invoicing/bt/template_test_id_list b/bt5/erp5_simplified_invoicing/bt/template_test_id_list index 573c735921f5753273cd411d983147e539412000..036277c77be27e2c28da38e9f0d852f4199b0f18 100644 --- a/bt5/erp5_simplified_invoicing/bt/template_test_id_list +++ b/bt5/erp5_simplified_invoicing/bt/template_test_id_list @@ -1,2 +1,7 @@ +test.erp5.testBPMCore +test.erp5.testComplexTradeModelLineUseCase test.erp5.testDeliveryBuilderToSupportMultipleLines -test.erp5.testInvoice \ No newline at end of file +test.erp5.testInvoice +test.erp5.testTradeCondition +test.erp5.testTradeModelLine +test.erp5.testTradeModelLinePurchase \ No newline at end of file diff --git a/bt5/erp5_simplified_invoicing/bt/test_dependency_list b/bt5/erp5_simplified_invoicing/bt/test_dependency_list index 2588c76e0a193595771da431c53aa63b6df33d75..452e07f9c3b45db2b9d31d2048a71f03d9f10fb1 100644 --- a/bt5/erp5_simplified_invoicing/bt/test_dependency_list +++ b/bt5/erp5_simplified_invoicing/bt/test_dependency_list @@ -10,4 +10,6 @@ erp5_simulation_test erp5_administration erp5_dummy_movement erp5_configurator_standard_accounting_template -erp5_configurator_standard_invoicing_template \ No newline at end of file +erp5_configurator_standard_invoicing_template +erp5_configurator_standard_trade_template +erp5_item \ No newline at end of file