diff --git a/bt5/erp5_real_time_inventory_accounting/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting/AccountingTransaction_selectInventoryAssetPriceMovement.py b/bt5/erp5_real_time_inventory_accounting/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting/AccountingTransaction_selectInventoryAssetPriceMovement.py index e56538a8147ce0f4e0fa62ef4bcee7fa32ca0f12..b8718b69b05cfba8ac0ca1458429709f1946cd7d 100644 --- a/bt5/erp5_real_time_inventory_accounting/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting/AccountingTransaction_selectInventoryAssetPriceMovement.py +++ b/bt5/erp5_real_time_inventory_accounting/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting/AccountingTransaction_selectInventoryAssetPriceMovement.py @@ -1,6 +1,6 @@ kw['parent_specialise_reference'] = ['default_inventory_accounting_transaction_rule'] kw['grand_grand_parent_specialise_reference'] = ['default_delivering_rule', 'default_delivery_rule'] -kw['explanation_portal_type'] = ['Sale Packing List', 'Purchase Packing List', 'Internal Packing List'] +kw['explanation_portal_type'] = ['Sale Packing List', 'Purchase Packing List', 'Internal Packing List', 'Production Packing List'] kw['portal_type'] = 'Simulation Movement' kw['delivery_uid'] = None kw['left_join_list'] = ['delivery_uid'] diff --git a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_credit_path.xml b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_credit_path.xml index e0ec552702242468046b3a069d109d1955d1ca7b..b99477f71b49021f60e979611157ca8948dc2e0c 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_credit_path.xml +++ b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_credit_path.xml @@ -114,7 +114,7 @@ </item> <item> <key> <string>test_tales_expression</string> </key> - <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> + <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Production Packing List Line\', \'Production Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_debit_path.xml b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_debit_path.xml index 71f317ff1d43190c5d3ae6f35f1dd4d6296ea0b1..7d313ca3ead5dc3f1770638e9d4b4668ecb52db5 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_debit_path.xml +++ b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_in_debit_path.xml @@ -110,7 +110,7 @@ </item> <item> <key> <string>test_tales_expression</string> </key> - <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> + <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Production Packing List Line\', \'Production Packing List Cell\', \'Purchase Packing List Line\', \'Purchase Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_credit_path.xml b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_credit_path.xml index dc7f7a8ad0fd0e0a1790428197fdff4ee4553c54..ec11d4a1cf979cca6739e77a56c17194d8a0b6aa 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_credit_path.xml +++ b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_credit_path.xml @@ -114,7 +114,7 @@ </item> <item> <key> <string>test_tales_expression</string> </key> - <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> + <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Production Packing List Line\', \'Production Packing List Cell\', \'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_debit_path.xml b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_debit_path.xml index 06079a08fadd9e55b0769cc8842745d9d9729d5e..79c0193c6bc55d0cbfc476f24f012f9bbb547cc5 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_debit_path.xml +++ b/bt5/erp5_real_time_inventory_accounting_test/PathTemplateItem/business_process_module/bpm_hoge/inventory_accounting_stock_ledger_out_debit_path.xml @@ -110,7 +110,7 @@ </item> <item> <key> <string>test_tales_expression</string> </key> - <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> + <value> <string>python: context.getDeliveryValue() is not None and context.getDeliveryValue().getPortalType() in (\'Production Packing List Line\', \'Production Packing List Cell\', \'Sale Packing List Line\', \'Sale Packing List Cell\', \'Internal Packing List Line\', \'Internal Packing List Cell\')</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_real_time_inventory_accounting_test/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml b/bt5/erp5_real_time_inventory_accounting_test/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..72c89b7c03b5f54156d1b232ee003510f5d60ba5 --- /dev/null +++ b/bt5/erp5_real_time_inventory_accounting_test/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml @@ -0,0 +1,6 @@ +<registered_skin_selection> + <skin_folder_selection> + <skin_folder>erp5_real_time_inventory_accounting_test</skin_folder> + <skin_selection>View</skin_selection> + </skin_folder_selection> +</registered_skin_selection> \ No newline at end of file diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test.xml b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test.xml index c6a72eb259403467c7aae6ac06eadac5eb0bd0f2..a91e94c1dd52abe23c7973cdd86e2ce28fe2cf38 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test.xml +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test.xml @@ -6,12 +6,33 @@ </pickle> <pickle> <dictionary> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>business_template_skin_layer_priority</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>float</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> <item> <key> <string>_objects</string> </key> <value> <tuple/> </value> </item> + <item> + <key> <string>business_template_skin_layer_priority</string> </key> + <value> <float>99.0</float> </value> + </item> <item> <key> <string>id</string> </key> <value> <string>erp5_real_time_inventory_accounting_test</string> </value> diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.py b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.py new file mode 100644 index 0000000000000000000000000000000000000000..117c474afd85162bd858bcfb73fb1dd3711af266 --- /dev/null +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.py @@ -0,0 +1 @@ +return 'default_delivery_rule' diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.xml b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b817e4e7d6991f7c8ef12d6ef24d3e622145c7f --- /dev/null +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/ProductionPackingList_getRuleReference.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionPackingList_getRuleReference</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination.py b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination.py index c4f1081d5eda110e8332e69b66d690a3dec7e338..9a4b3e0c1644414b6cbf57b163c6b59434b250ae 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination.py +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInCreditDestination.py @@ -3,7 +3,7 @@ assert delivery_portal_type # XXX debug if delivery_portal_type.startswith('Purchase Packing List'): if movement.getDestination() == 'organisation_module/supplier': return ['source/account_module/stock_parts_port'] -elif delivery_portal_type.startswith('Internal Packing List'): +elif delivery_portal_type.startswith('Internal Packing List') or delivery_portal_type.startswith('Production Packing List'): if movement.getDestination() == 'organisation_module/park': return ['source/account_module/stock_car_park'] else: diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination.py b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination.py index b5c6a628544142257cf00b4b178e007ac85fcead..cfa833c5f389ac2c21c0e24bd4ecb164c5d4baf7 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination.py +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerInDebitDestination.py @@ -3,7 +3,7 @@ assert delivery_portal_type # XXX debug if delivery_portal_type.startswith('Purchase Packing List'): if movement.getDestination() == 'organisation_module/supplier': return ['source/account_module/variation_parts'] -elif delivery_portal_type.startswith('Internal Packing List'): +elif delivery_portal_type.startswith('Internal Packing List') or delivery_portal_type.startswith('Production Packing List'): return ['source/account_module/variation_cars'] else: raise NotImplementedError diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource.py b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource.py index daa2b680fab2fa14abf384d72378dffcfa454147..2c345a508a8e77f62f0cb957a3f63b3eb1003310 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource.py +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutCreditSource.py @@ -3,7 +3,7 @@ assert delivery_portal_type # XXX debug if delivery_portal_type.startswith('Sale Packing List'): if movement.getSource() == 'organisation_module/hoge': return ['source/account_module/variation_cars'] -elif delivery_portal_type.startswith('Internal Packing List'): +elif delivery_portal_type.startswith('Internal Packing List') or delivery_portal_type.startswith('Production Packing List'): return ['source/account_module/variation_cars'] else: raise NotImplementedError diff --git a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource.py b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource.py index 4f232223867f5488f1d18efd0f3708c2b9cbd104..ebb33ddaafa8916f18cfabd6cf5170a1d96c75be 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource.py +++ b/bt5/erp5_real_time_inventory_accounting_test/SkinTemplateItem/portal_skins/erp5_real_time_inventory_accounting_test/TradeModelPath_getInventoryAccountingStockLedgerOutDebitSource.py @@ -3,7 +3,7 @@ assert delivery_portal_type # XXX debug if delivery_portal_type.startswith('Sale Packing List'): if movement.getSource() == 'organisation_module/hoge': return ['source/account_module/stock_car_park'] -elif delivery_portal_type.startswith('Internal Packing List'): +elif delivery_portal_type.startswith('Internal Packing List') or delivery_portal_type.startswith('Production Packing List'): if movement.getSource() == 'organisation_module/workshop': return ['source/account_module/stock_car_workshop'] else: diff --git a/bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py b/bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py index 2e53546aa3cee091b9a1753d65b338fee58ffad6..8ecfd8a543faac601c0b15ee3f510da325bb23ce 100644 --- a/bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py +++ b/bt5/erp5_real_time_inventory_accounting_test/TestTemplateItem/portal_components/test.erp5.testRealTimeInventoryAccounting.py @@ -44,6 +44,9 @@ class TestRealTimeInventoryAccountingMixin: def stepSelectInternalPackingList1(self, sequence=None, sequence_list=None): sequence.edit(current_internal_packing_list=sequence['internal_packing_list_1']) + def stepSelectProductionPackingList1(self, sequence=None, sequence_list=None): + sequence.edit(current_production_packing_list=sequence['production_packing_list_1']) + def _transitAndCheck(self, document, workflow_method_id, expected_state): from Products.DCWorkflow.DCWorkflow import ValidationFailed try: @@ -99,6 +102,18 @@ class TestRealTimeInventoryAccountingMixin: packing_list = sequence['current_internal_packing_list'] self._transitAndCheck(packing_list, 'stop_action', 'stopped') + def stepConfirmProductionPackingList(self, sequence=None, sequence_list=None): + packing_list = sequence['current_production_packing_list'] + self._transitAndCheck(packing_list, 'confirm_action', 'confirmed') + + def stepStartProductionPackingList(self, sequence=None, sequence_list=None): + packing_list = sequence['current_production_packing_list'] + self._transitAndCheck(packing_list, 'start_action', 'started') + + def stepStopProductionPackingList(self, sequence=None, sequence_list=None): + packing_list = sequence['current_production_packing_list'] + self._transitAndCheck(packing_list, 'stop_action', 'stopped') + def _checkAndGetCausalityRelated(self, document, causality_related_portal_type, @@ -119,6 +134,10 @@ class TestRealTimeInventoryAccountingMixin: packing_list = sequence['current_internal_packing_list'] self._checkAndGetCausalityRelated(packing_list, 'Accounting Transaction', 0) + def stepCheckAccountingTransactionNotGeneratedFromProductionPackingList(self, sequence=None, sequence_list=None): + packing_list = sequence['current_production_packing_list'] + self._checkAndGetCausalityRelated(packing_list, 'Accounting Transaction', 0) + def stepCheckThreeAccountingTransactionGeneratedFromSalePackingList(self, sequence=None, sequence_list=None): packing_list = sequence['current_sale_packing_list'] accounting_transaction_list = self._checkAndGetCausalityRelated(packing_list, 'Accounting Transaction', 3) @@ -134,6 +153,11 @@ class TestRealTimeInventoryAccountingMixin: accounting_transaction_list = self._checkAndGetCausalityRelated(packing_list, 'Accounting Transaction', 2) sequence.edit(current_accounting_transaction_list=accounting_transaction_list) + def stepCheckTwoAccountingTransactionGeneratedFromProductionPackingList(self, sequence=None, sequence_list=None): + packing_list = sequence['current_production_packing_list'] + accounting_transaction_list = self._checkAndGetCausalityRelated(packing_list, 'Accounting Transaction', 2) + sequence.edit(current_accounting_transaction_list=accounting_transaction_list) + def _checkDelivery(self, delivery, delivery_property_dict=None, @@ -959,6 +983,136 @@ class TestRealTimeInventoryAccounting(ERP5TypeTestCase, TestRealTimeInventoryAcc sequence_list.addSequenceString(sequence_str) sequence_list.play(self, quiet=0) + def stepTestProductionPackingList_create(self, sequence=None, sequence_list=None): + production_packing_list = self.portal.production_packing_list_module.newContent( + portal_type='Production Packing List', + specialise_value=self.portal.business_process_module.bpm_hoge, + title='Transfert Workshop to Park', + start_date=DateTime('2018/03/02 00:00:00 GMT+9'), + stop_date=DateTime('2018/03/03 00:00:00 GMT+9'), + source_value=self.portal.organisation_module.workshop, + source_section_value=self.portal.organisation_module.hoge, + destination_value=self.portal.organisation_module.park, + destination_section_value=self.portal.organisation_module.hoge, + price_currency_value=self.portal.currency_module.DOL) + + production_packing_list.newContent( + portal_type='Production Packing List Line', + int_index=1, + resource_value=self.portal.product_module.big_b_car, + price=4242, + quantity=1, + quantity_unit_value=self.portal.portal_categories.quantity_unit.unit.piece, + use_value=self.portal.portal_categories.use.trade.purchase) + + sequence.edit(production_packing_list_1=production_packing_list) + + def stepTestProductionPackingList_checkAllAccountingTransaction(self, sequence=None, sequence_list=None): + accounting_transaction_list = sequence['current_accounting_transaction_list'] + for accounting_transaction in accounting_transaction_list: + self.assertEquals(accounting_transaction.getSimulationState(), 'draft') + if accounting_transaction.getLedgerValue() == self.portal.portal_categories.ledger.stock.entree: + self._checkDelivery( + accounting_transaction, + delivery_property_dict=dict( + source_section_value=self.portal.organisation_module.hoge, + resource_value=self.portal.currency_module.DOL, + # start_date=stop_date=IPL.stop_date + start_date=DateTime('2018/03/03 00:00:00 GMT+9'), + stop_date=DateTime('2018/03/03 00:00:00 GMT+9')), + movement_property_dict_tuple=( + dict(portal_type='Accounting Transaction Line', + source_value=self.portal.account_module.stock_car_park, + # sum(IPLL.price) + quantity=-4242), + dict(portal_type='Accounting Transaction Line', + source_value=self.portal.account_module.variation_cars, + # sum(IPLL.price) + quantity=4242))) + + # ledger/stock/sortie + else: + self._checkDelivery( + accounting_transaction, + delivery_property_dict=dict( + source_section_value=self.portal.organisation_module.hoge, + resource_value=self.portal.currency_module.DOL, + ledger_value=self.portal.portal_categories.ledger.stock.sortie, + # start_date=stop_date=IPL.start_date + start_date=DateTime('2018/03/02 00:00:00 GMT+9'), + stop_date=DateTime('2018/03/02 00:00:00 GMT+9')), + movement_property_dict_tuple=( + dict(portal_type='Accounting Transaction Line', + source_value=self.portal.account_module.variation_cars, + # sum(IPLL.price) + quantity=-4242), + dict(portal_type='Accounting Transaction Line', + source_value=self.portal.account_module.stock_car_workshop, + # sum(IPLL.price) + quantity=4242))) + + def testProductionPackingList(self): + sequence_list = SequenceList() + sequence_str = """ + TestProductionPackingList_create + Tic + SelectProductionPackingList1 + ConfirmProductionPackingList + Tic + StartProductionPackingList + Tic + StopProductionPackingList + Tic + CallBuilder + Tic + CheckTwoAccountingTransactionGeneratedFromProductionPackingList + TestProductionPackingList_checkAllAccountingTransaction + """ + sequence_list.addSequenceString(sequence_str) + sequence_list.play(self, quiet=0) + + def stepTestProductionPackingListNoPriceAndNoSupply_create(self, sequence=None, sequence_list=None): + production_packing_list = self.portal.production_packing_list_module.newContent( + portal_type='Production Packing List', + specialise_value=self.portal.business_process_module.bpm_hoge, + title='Transfer Workshop to Park (No Supply/Price)', + start_date=DateTime('2018/03/02 00:00:00 GMT+9'), + stop_date=DateTime('2018/03/02 00:00:00 GMT+9'), + source_value=self.portal.organisation_module.workshop, + source_section_value=self.portal.organisation_module.hoge, + destination_value=self.portal.organisation_module.park, + destination_section_value=self.portal.organisation_module.hoge, + price_currency_value=self.portal.currency_module.DOL) + + production_packing_list.newContent( + portal_type='Production Packing List Line', + int_index=1, + resource_value=self.portal.product_module.car_no_supply, + quantity=1, + quantity_unit_value=self.portal.portal_categories.quantity_unit.unit.piece, + use_value=self.portal.portal_categories.use.trade.purchase) + + sequence.edit(production_packing_list_1=production_packing_list) + + def testProductionPackingListNoPriceAndNoSupply(self): + sequence_list = SequenceList() + sequence_str = """ + TestProductionPackingListNoPriceAndNoSupply_create + Tic + SelectProductionPackingList1 + ConfirmProductionPackingList + Tic + StartProductionPackingList + Tic + StopProductionPackingList + Tic + CallBuilder + Tic + CheckAccountingTransactionNotGeneratedFromProductionPackingList + """ + sequence_list.addSequenceString(sequence_str) + sequence_list.play(self, quiet=0) + import unittest def test_suite(): suite = unittest.TestSuite() diff --git a/bt5/erp5_real_time_inventory_accounting_test/bt/template_registered_skin_selection_list b/bt5/erp5_real_time_inventory_accounting_test/bt/template_registered_skin_selection_list new file mode 100644 index 0000000000000000000000000000000000000000..bbdc59978de65f42eb5c8776cfa6510a48bbc5c7 --- /dev/null +++ b/bt5/erp5_real_time_inventory_accounting_test/bt/template_registered_skin_selection_list @@ -0,0 +1 @@ +erp5_real_time_inventory_accounting_test | View \ No newline at end of file