Commit 59f66814 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_payroll: update PaySheetLine_viewCells/matrixbox

removing lines, columns and tabs but improving PaySheetLine_asCellRange
parent 5bb7b5b6
...@@ -20,9 +20,10 @@ if resource is not None: ...@@ -20,9 +20,10 @@ if resource is not None:
else: else:
if matrixbox == 1: if matrixbox == 1:
# XXX matrixbox is right_display (not as listfield) => invert display and value in item # XXX matrixbox is right_display (not as listfield) => invert display and value in item
cell_range.append(map(lambda x: (x[1],x[0]), if context.getVariationCategoryList(base_category_list=(base_category,)):
context.getVariationCategoryItemList(base_category_list=\ cell_range.append(map(lambda x: (x[1],x[0]),
(base_category,) ) ) ) context.getVariationCategoryItemList(base_category_list=\
(base_category,) ) ) )
else: else:
cell_range.append(context.getVariationCategoryList(base_category_list=\ cell_range.append(context.getVariationCategoryList(base_category_list=\
(base_category,))) (base_category,)))
......
...@@ -10,12 +10,10 @@ ...@@ -10,12 +10,10 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>as_cell_range_script_id</string>
<string>cell_base_id</string> <string>cell_base_id</string>
<string>cell_portal_type</string> <string>cell_portal_type</string>
<string>columns</string>
<string>editable_attributes</string> <string>editable_attributes</string>
<string>lines</string>
<string>tabs</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -58,12 +56,6 @@ ...@@ -58,12 +56,6 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -72,18 +64,6 @@ ...@@ -72,18 +64,6 @@
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>lines</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>tabs</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -95,6 +75,10 @@ ...@@ -95,6 +75,10 @@
<key> <string>values</string> </key> <key> <string>values</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>as_cell_range_script_id</string> </key>
<value> <string>PaySheetLine_asCellRange</string> </value>
</item>
<item> <item>
<key> <string>cell_base_id</string> </key> <key> <string>cell_base_id</string> </key>
<value> <string>movement</string> </value> <value> <string>movement</string> </value>
...@@ -103,17 +87,6 @@ ...@@ -103,17 +87,6 @@
<key> <string>cell_portal_type</string> </key> <key> <string>cell_portal_type</string> </key>
<value> <string>Pay Sheet Cell</string> </value> <value> <string>Pay Sheet Cell</string> </value>
</item> </item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>None</string>
<string>None</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>editable_attributes</string> </key> <key> <string>editable_attributes</string> </key>
<value> <value>
...@@ -145,28 +118,6 @@ ...@@ -145,28 +118,6 @@
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value> <value> <string>Base_viewPayrollFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>lines</string> </key>
<value>
<list>
<tuple>
<string>None</string>
<string>None</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>tabs</string> </key>
<value>
<list>
<tuple>
<string>None</string>
<string>Base Value</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
...@@ -181,56 +132,4 @@ ...@@ -181,56 +132,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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 encoding="cdata"><![CDATA[
python: len(here.PaySheetLine_asCellRange(matrixbox=1))>1 and here.PaySheetLine_asCellRange(matrixbox=1)[1] or []
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.PaySheetLine_asCellRange(matrixbox=1)[0]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [] # here.PaySheetLine_asCellRange(matrixbox=1)[2]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
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