Commit ded3ba87 authored by Arnaud Fontaine's avatar Arnaud Fontaine

CodingStyleTest: Prepare migration of Invoicing Unit Tests to ZODB Components.

efd71291 added on erp5_invoicing a test dependency on erp5_advanced_invoicing.
However, testRule for example uses erp5_invoicing but not erp5_advanced_invoicing
so this would not work.

Moreover, erp5_{simplified,advanced}_invoicing enhance erp5_invoicing by providing
a container for Invoice Line so to match real world use cases it is better to
have two CodingStyle tests: one checking erp5_invoicing+erp5_simplified_invoicing
and the other one erp5_invoicing+erp5_advanced_invoicing.

Also, fix CodingStyle issues on erp5_advanced_invoicing.
parent 75309541
"""This script is called on the Invoice after the delivery builder has created """This script is called on the Invoice after the delivery builder has created
the new Invoice. the new Invoice.
""" """
from Products.ERP5Type.Message import translateString
if related_simulation_movement_path_list is None: if related_simulation_movement_path_list is None:
raise RuntimeError, 'related_simulation_movement_path_list is missing. Update ERP5 Product.' raise RuntimeError, 'related_simulation_movement_path_list is missing. Update ERP5 Product.'
......
erp5_advanced_invoicing
\ No newline at end of file
...@@ -180,6 +180,9 @@ ignored_skin_id_set = { ...@@ -180,6 +180,9 @@ ignored_skin_id_set = {
'PdmZuite_reset', 'PdmZuite_reset',
'PdmZuite_CommonTemplateForRenderjsUi', 'PdmZuite_CommonTemplateForRenderjsUi',
'PdmZuite_checkStockBrowserForRenderjsUi', 'PdmZuite_checkStockBrowserForRenderjsUi',
'AdvancedInvoiceTransaction_postTransactionLineGeneration',
'InvoiceTransaction_jumpToOrder',
'InvoiceTransaction_jumpToPackingList',
} }
# Generic method to check consistency of a skin item # Generic method to check consistency of a skin item
......
...@@ -99,10 +99,17 @@ def test_suite(): ...@@ -99,10 +99,17 @@ def test_suite():
}, },
) )
tested_business_template_list = [tested_business_template]
# erp5_invoicing doesn't define a container for Invoice Line: defined in
# erp5_simplified_invoicing (SIT/PIT) and erp5_advanced_invoicing (SI/PI)
if tested_business_template in ('erp5_simplified_invoicing',
'erp5_advanced_invoicing'):
tested_business_template_list.append('erp5_invoicing')
testXHTML.addTestMethodDynamically( testXHTML.addTestMethodDynamically(
testclass, testclass,
testXHTML.validator, testXHTML.validator,
(tested_business_template,), tested_business_template_list,
expected_failure_list=( expected_failure_list=(
# this view needs VCS preference set (this test suite does not support # this view needs VCS preference set (this test suite does not support
# setting preferences, but this might be a way to fix this). # setting preferences, but this might be a way to fix this).
......
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