Commit 94da1e25 authored by Fabien Morin's avatar Fabien Morin

fix some mistakes :

- slices where not defined on resource
- since r28012 base_category are sorted, so we need to use the new order to create cells
- somes Tic where missing after crate movements on model lines


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28015 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d8c2a45f
...@@ -189,7 +189,12 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -189,7 +189,12 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
variation_base_category_list=['tax_category', 'salary_range'], variation_base_category_list=['tax_category', 'salary_range'],
use='payroll/tax') use='payroll/tax')
node.setVariationCategoryList(['tax_category/employee_share', node.setVariationCategoryList(['tax_category/employee_share',
'tax_category/employer_share']) 'tax_category/employer_share',
'salary_range/france/slice_0_to_200',
'salary_range/france/slice_200_to_400',
'salary_range/france/slice_400_to_5000',
'salary_range/france/slice_600_to_800',
])
sequence.edit(urssaf_service = node) sequence.edit(urssaf_service = node)
def stepCreateLabourService(self, sequence=None, **kw): def stepCreateLabourService(self, sequence=None, **kw):
...@@ -384,43 +389,43 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -384,43 +389,43 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
def stepUrssafModelLineWithSlicesCreateMovements(self, sequence=None, **kw): def stepUrssafModelLineWithSlicesCreateMovements(self, sequence=None, **kw):
model_line = sequence.get('urssaf_model_line_with_slices') model_line = sequence.get('urssaf_model_line_with_slices')
cell1 = model_line.newCell('tax_category/employee_share', cell1 = model_line.newCell('salary_range/france/slice_0_to_200',
'salary_range/france/slice_0_to_200', 'tax_category/employee_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell1.edit(price=0.1, tax_category='employee_share', cell1.edit(price=0.1, tax_category='employee_share',
salary_range='france/slice_0_to_200') salary_range='france/slice_0_to_200')
cell2 = model_line.newCell('tax_category/employer_share', cell2 = model_line.newCell('salary_range/france/slice_0_to_200',
'salary_range/france/slice_0_to_200', 'tax_category/employer_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell2.edit(price=0.2, tax_category='employer_share', cell2.edit(price=0.2, tax_category='employer_share',
salary_range='france/slice_0_to_200') salary_range='france/slice_0_to_200')
cell3 = model_line.newCell('tax_category/employee_share', cell3 = model_line.newCell('salary_range/france/slice_200_to_400',
'salary_range/france/slice_200_to_400', 'tax_category/employee_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell3.edit(price=0.3, tax_category='employee_share', cell3.edit(price=0.3, tax_category='employee_share',
salary_range='france/slice_200_to_400') salary_range='france/slice_200_to_400')
cell4 = model_line.newCell('tax_category/employer_share', cell4 = model_line.newCell('salary_range/france/slice_200_to_400',
'salary_range/france/slice_200_to_400', 'tax_category/employer_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell4.edit(price=0.4, tax_category='employer_share', cell4.edit(price=0.4, tax_category='employer_share',
salary_range='france/slice_200_to_400') salary_range='france/slice_200_to_400')
cell5 = model_line.newCell('tax_category/employee_share', cell5 = model_line.newCell('salary_range/france/slice_400_to_5000',
'salary_range/france/slice_400_to_5000', 'tax_category/employee_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell5.edit(price=0.5, tax_category='employee_share', cell5.edit(price=0.5, tax_category='employee_share',
salary_range='france/slice_400_to_5000') salary_range='france/slice_400_to_5000')
cell6 = model_line.newCell('tax_category/employer_share', cell6 = model_line.newCell('salary_range/france/slice_400_to_5000',
'salary_range/france/slice_400_to_5000', 'tax_category/employer_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
...@@ -430,29 +435,29 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -430,29 +435,29 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
def stepUrssafModelLineWithComplexSlicesCreateMovements(self, def stepUrssafModelLineWithComplexSlicesCreateMovements(self,
sequence=None, **kw): sequence=None, **kw):
model_line = sequence.get('urssaf_model_line_with_slices') model_line = sequence.get('urssaf_model_line_with_slices')
cell1 = model_line.newCell('tax_category/employee_share', cell1 = model_line.newCell('salary_range/france/slice_200_to_400',
'salary_range/france/slice_200_to_400', 'tax_category/employee_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell1.edit(price=0.1, tax_category='employee_share', cell1.edit(price=0.1, tax_category='employee_share',
salary_range='france/slice_200_to_400') salary_range='france/slice_200_to_400')
cell2 = model_line.newCell('tax_category/employer_share', cell2 = model_line.newCell('salary_range/france/slice_200_to_400',
'salary_range/france/slice_200_to_400', 'tax_category/employer_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell2.edit(price=0.2, tax_category='employer_share', cell2.edit(price=0.2, tax_category='employer_share',
salary_range='france/slice_200_to_400') salary_range='france/slice_200_to_400')
cell3 = model_line.newCell('tax_category/employee_share', cell3 = model_line.newCell('salary_range/france/slice_600_to_800',
'salary_range/france/slice_600_to_800', 'tax_category/employee_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
cell3.edit(price=0.3, tax_category='employee_share', cell3.edit(price=0.3, tax_category='employee_share',
salary_range='france/slice_600_to_800') salary_range='france/slice_600_to_800')
cell4 = model_line.newCell('tax_category/employer_share', cell4 = model_line.newCell('salary_range/france/slice_600_to_800',
'salary_range/france/slice_600_to_800', 'tax_category/employer_share',
portal_type='Pay Sheet Model Cell', portal_type='Pay Sheet Model Cell',
base_id='movement', base_id='movement',
mapped_value_property_list=('quantity', 'price')) mapped_value_property_list=('quantity', 'price'))
...@@ -3354,6 +3359,7 @@ class TestPayroll(TestPayrollMixin): ...@@ -3354,6 +3359,7 @@ class TestPayroll(TestPayrollMixin):
ModelCreateUrssafModelLineWithSlices ModelCreateUrssafModelLineWithSlices
Tic Tic
UrssafModelLineWithSlicesCreateMovements UrssafModelLineWithSlicesCreateMovements
Tic
PaysheetApplyTransformation PaysheetApplyTransformation
Tic Tic
CheckPaysheetLineAreCreatedAfterUpdateWithLinesWithSameResource CheckPaysheetLineAreCreatedAfterUpdateWithLinesWithSameResource
...@@ -3370,6 +3376,7 @@ class TestPayroll(TestPayrollMixin): ...@@ -3370,6 +3376,7 @@ class TestPayroll(TestPayrollMixin):
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.COMMON_BASIC_DOCUMENT_CREATION_SEQUENCE_STRING + """ sequence_string = self.COMMON_BASIC_DOCUMENT_CREATION_SEQUENCE_STRING + """
SetProperiesOnModelLines SetProperiesOnModelLines
Tic
PaysheetApplyTransformation PaysheetApplyTransformation
Tic Tic
CheckPaysheetLineAreCreated CheckPaysheetLineAreCreated
......
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