Commit 1ece128d authored by Julien Muchembled's avatar Julien Muchembled

Bugfixes/updates in payroll and new amount generator

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@39110 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a121ee63
......@@ -103,7 +103,6 @@
<string>my_title</string>
<string>my_reference</string>
<string>my_resource_title</string>
<string>my_calculation_script_id</string>
<string>my_price</string>
<string>my_quantity</string>
<string>my_trade_phase</string>
......@@ -118,7 +117,6 @@
<string>my_variation_category_list</string>
<string>my_base_contribution_list</string>
<string>my_base_application_list</string>
<string>my_create_line</string>
</list>
</value>
</item>
......
......@@ -14,12 +14,9 @@
<value>
<list>
<string>description</string>
<string>title</string>
<string>css_class</string>
<string>input_style</string>
<string>default</string>
<string>display_width</string>
<string>precision</string>
<string>title</string>
</list>
</value>
</item>
......@@ -62,15 +59,13 @@
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -84,13 +79,17 @@
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -98,25 +97,25 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>figure</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The Base used to calculate the tax.</string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_float_field</string> </value>
<value> <string>my_amount_generator_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1 234.5</string> </value>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
......@@ -133,22 +132,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell is not None and cell.getProperty(\'quantity\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
......@@ -164,7 +147,7 @@
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_calculation_script_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The script used to calculated the withhold amount for this line instead of the default script</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Model Line Calculation Script</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_create_line</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Usefull for intermediated lines. By default, Pay Sheet Lines are created (checked).</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Create Line</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/isCreateLine</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -90,7 +90,6 @@
<list>
<string>listbox_int_index</string>
<string>listbox_float_index</string>
<string>listbox_create_line</string>
</list>
</value>
</item>
......@@ -104,7 +103,6 @@
<string>my_source_section_title</string>
<string>my_price_currency</string>
<string>my_specialise_title_list</string>
<string>my_calculation_script_id</string>
</list>
</value>
</item>
......
......@@ -84,38 +84,10 @@
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Payslip Order</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Service</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>create_line</string>
<string>Create Line</string>
</tuple>
<tuple>
<string>trade_phase_title</string>
<string>Trade Phase</string>
</tuple>
<tuple>
<string>calculation_script_id</string>
<string>Calculation Script</string>
</tuple>
<tuple>
<string>base_contribution_list</string>
<string>Base Contribution</string>
......@@ -155,10 +127,6 @@
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>create_line</string>
<string>Create Line</string>
</tuple>
</list>
</value>
</item>
......@@ -174,10 +142,6 @@
<string>int_index</string>
<string>int_index</string>
</tuple>
<tuple>
<string>create_line</string>
<string>Create Line</string>
</tuple>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_create_line</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Usefull for intermediated lines. By default, Pay Sheet Lines are created (checked).</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Create Line</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>cell/isCreateLine</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_calculation_script_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The script used to calculate the withhold amount for each line.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculation Script</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -91,7 +91,6 @@
<value>
<list>
<string>my_specialise_title_list</string>
<string>my_calculation_script_id</string>
<string>my_float_index</string>
<string>my_int_index</string>
</list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_calculation_script_id</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>The script used to calculate the withhold amount for each line.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Calculation Script</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -74,7 +74,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_amount_generator_quantity</string> </value>
<value> <string>my_amount_generator_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -28,11 +28,8 @@
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.TradeModelCell import TradeModelCell
import zope.interface
class PaySheetModelCell(TradeModelCell):
......@@ -51,4 +48,4 @@ class PaySheetModelCell(TradeModelCell):
if not result:
if not self.hasCellContent(base_id='variation'):
result = self.getVariationRangeBaseCategoryList() # The current resource variation
return list(result) + ['trade_phase', 'base_contribution', 'quantity_unit']
return result + ['trade_phase', 'quantity_unit']
......@@ -152,7 +152,8 @@ class PaySheetTransaction(Invoice):
def updateAggregatedAmountList(self, *args, **kw):
amount_dict = dict(((x.getReference(),
tuple(x.getVariationCategoryList())), x)
for x in self.getAggregatedAmountList(*args, **kw))
for x in self.getAggregatedAmountList(*args, **kw)
if x.getResource())
movement_to_delete_list = []
for movement in self.getMovementList():
if movement.getBaseApplication():
......
......@@ -28,15 +28,11 @@
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.TradeModelLine import TradeModelLine
from Products.ERP5.Document.MappedValue import MappedValue
import zope.interface
class TradeModelCell(TradeModelLine, MappedValue):
class TradeModelCell(TradeModelLine):
"""Trade Model Line
"""
meta_type = 'ERP5 Trade Model Cell'
......
......@@ -182,7 +182,7 @@
<string>listbox_modification_date</string>
<string>listbox_creation_date</string>
<string>listbox_owner_title</string>
<string>my_view_mode_amount_generator_quantity</string>
<string>my_amount_generator_quantity</string>
</list>
</value>
</item>
......
......@@ -16,7 +16,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_view_mode_amount_generator_quantity</string> </value>
<value> <string>my_amount_generator_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -209,7 +209,7 @@ class AmountGeneratorMixin:
return
# Try to collect cells and aggregate their mapped properties
# using resource + variation as aggregation key or base_application
# for intermediate lines
# for intermediate lines.
amount_generator_cell_list = [self] + self.contentValues(
portal_type=amount_generator_cell_type_list)
cell_aggregate = {} # aggregates final line information
......@@ -249,6 +249,16 @@ class AmountGeneratorMixin:
base_amount.setAmountGeneratorLine(self)
for property_dict in cell_aggregate.itervalues():
# Ignore line (i.e. self) if cells produce unrelated amounts.
# With Transformed Resource (Transformation), line is considered in
# order to gather common properties and cells are used to describe
# varianted properties: only 1 amount is produced.
# In cases like trade, payroll or assorted resources,
# we want to ignore the line if they are cells.
# See also implementations of 'getCellAggregateKey'
causality_value = property_dict['causality_value_list'][-1]
if causality_value is self and len(cell_aggregate) > 1:
continue
base_application_set = property_dict['base_application_set']
# property_dict may include
# resource - VAT service or a Component in MRP
......@@ -274,16 +284,15 @@ class AmountGeneratorMixin:
if quantity_key in property_dict:
try:
quantity *= property_dict.pop(quantity_key)
except ValueError: # None or ''
except TypeError: # None or ''
pass
break
if not quantity:
continue
# Create an Amount object
amount = newTempAmount(portal,
# we only want the id to be unique
property_dict['causality_value_list'][0]
.getRelativeUrl().replace('/', '_'))
# we only want the id to be unique so we pick a random causality
causality_value.getRelativeUrl().replace('/', '_'))
amount._setCategoryList(property_dict.pop('category_list', ()))
amount._edit(
quantity=quantity,
......
......@@ -34,7 +34,7 @@ from Products.ERP5Type.tests.utils import reindex
from DateTime import DateTime
import transaction
class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
class TestPayrollMixin(TestTradeModelLineMixin):
BUSINESS_PATH_CREATION_SEQUENCE_STRING = """
CreateBusinessProcess
CreateBusinessLink
......@@ -159,6 +159,17 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
def getBusinessTemplateList(self):
return TestTradeModelLineMixin.getBusinessTemplateList(self) + ('erp5_payroll', )
def stepCreatePriceCurrency(self, sequence):
sequence.edit(price_currency = self.createResource('Currency',
title='Currency', base_unit_quantity=self.base_unit_quantity))
def stepCreateBusinessProcess(self, sequence):
sequence.edit(business_process=self.createBusinessProcess(title=self.id()))
def stepCreateBusinessLink(self, sequence):
business_process = sequence.get('business_process')
sequence.edit(business_link=self.createBusinessLink(business_process))
def createService(self):
module = self.portal.getDefaultModule(portal_type='Service')
return module.newContent(portal_type='Service')
......@@ -1078,14 +1089,10 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
model_line = self.createModelLine(model)
model_line.edit(title='intermediate line',
int_index = 10,
trade_phase='payroll/france/urssaf',
resource_value=sequence.get('urssaf_service'),
reference='intermediate_line',
variation_category_list=['contribution_share/employee',
'contribution_share/employer'],
price=0.2,
base_contribution_list=['base_amount/payroll/base/income_tax'],
base_application_list=['base_amount/payroll/base/contribution'],
create_line=False,)
base_application_list=['base_amount/payroll/base/contribution'])
sequence.edit(intermediate_model_line = model_line)
def stepModelCreateAppliedOnTaxModelLine(self, sequence=None, **kw):
......@@ -1105,20 +1112,6 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
base_application_list=['base_amount/payroll/base/income_tax'])
sequence.edit(model_line_applied_on_tax = model_line)
def stepIntermediateModelLineCreateMovements(self, sequence=None,
**kw):
model_line = sequence.get('intermediate_model_line')
cell1 = model_line.newCell('contribution_share/employee',
portal_type='Pay Sheet Model Cell',
base_id='movement',
mapped_value_property_list=('quantity', 'price'))
cell1.edit(price=0.2, quantity=None, contribution_share='employee')
cell2 = model_line.newCell('contribution_share/employer',
portal_type='Pay Sheet Model Cell',
base_id='movement',
mapped_value_property_list=('quantity', 'price'))
cell2.edit(price=0.2, quantity=None, contribution_share='employer')
def stepAppliedOnTaxModelLineCreateMovements(self, sequence=None, **kw):
model_line = sequence.get('model_line_applied_on_tax')
cell1 = model_line.newCell('contribution_share/employee',
......@@ -2071,7 +2064,6 @@ class TestPayroll(TestPayrollMixin):
Tic
ModelCreateIntermediateModelLine
ModelCreateAppliedOnTaxModelLine
IntermediateModelLineCreateMovements
AppliedOnTaxModelLineCreateMovements
CreateBasicPaysheet
PaysheetCreateLabourPaySheetLine
......
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