Commit a41f71c3 authored by Jérome Perrin's avatar Jérome Perrin

pdm: introduce a asCellRange script for Measure

This allow using measure.updateCellRange to create varianted measures
programmatically.

Remove the TALES for lines, columns and tab on the matrix box because
the default behavior is to call this updateCellRange script

/reviewed-on !974
parent 31047f8a
cell_range = []
for i in range(len(context.getMeasureVariationBaseCategoryList())):
if matrixbox:
cell_range.append(context.getVariationRangeCategoryItemList(i))
else:
cell_range.append([x[0] for x in context.getVariationRangeCategoryItemList(i)])
return cell_range
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>matrixbox=0, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Measure_asCellRange</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -118,9 +118,7 @@ ...@@ -118,9 +118,7 @@
</item> </item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
...@@ -145,7 +143,7 @@ ...@@ -145,7 +143,7 @@
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -166,15 +164,11 @@ ...@@ -166,15 +164,11 @@
</item> </item>
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>tabs</string> </key> <key> <string>tabs</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -314,19 +308,6 @@ ...@@ -314,19 +308,6 @@
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getVariationRangeCategoryItemList(1)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
...@@ -339,30 +320,4 @@ ...@@ -339,30 +320,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getVariationRangeCategoryItemList(0)</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getVariationRangeCategoryItemList(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