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:
else:
if matrixbox == 1:
# XXX matrixbox is right_display (not as listfield) => invert display and value in item
cell_range.append(map(lambda x: (x[1],x[0]),
context.getVariationCategoryItemList(base_category_list=\
(base_category,) ) ) )
if context.getVariationCategoryList(base_category_list=(base_category,)):
cell_range.append(map(lambda x: (x[1],x[0]),
context.getVariationCategoryItemList(base_category_list=\
(base_category,) ) ) )
else:
cell_range.append(context.getVariationCategoryList(base_category_list=\
(base_category,)))
......
......@@ -10,12 +10,10 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>as_cell_range_script_id</string>
<string>cell_base_id</string>
<string>cell_portal_type</string>
<string>columns</string>
<string>editable_attributes</string>
<string>lines</string>
<string>tabs</string>
<string>title</string>
</list>
</value>
......@@ -58,12 +56,6 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -72,18 +64,6 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</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>
<key> <string>target</string> </key>
<value> <string></string> </value>
......@@ -95,6 +75,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>as_cell_range_script_id</string> </key>
<value> <string>PaySheetLine_asCellRange</string> </value>
</item>
<item>
<key> <string>cell_base_id</string> </key>
<value> <string>movement</string> </value>
......@@ -103,17 +87,6 @@
<key> <string>cell_portal_type</string> </key>
<value> <string>Pay Sheet Cell</string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>None</string>
<string>None</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>editable_attributes</string> </key>
<value>
......@@ -145,28 +118,6 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewPayrollFieldLibrary</string> </value>
</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>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -181,56 +132,4 @@
</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 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>
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