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

apply a different style if the budget cell is a summary cell

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37299 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b57a128
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</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>_body</string> </key>
<value> <string>try:\n
return container.REQUEST[script.id]\n
except KeyError:\n
pass\n
\n
dependant_dimensions_dict = context.BudgetLine_getSummaryDimensionKeyDict()\n
\n
summary_key_dict = dict()\n
\n
from Products.ERP5Type.Utils import cartesianProduct\n
# also add all cell coordinates in the dictionnary\n
for cell_key in cartesianProduct(context.getCellRange()):\n
for key in cell_key:\n
if key in dependant_dimensions_dict:\n
summary_key_dict[tuple(cell_key)] = 1\n
break\n
\n
container.REQUEST.set(script.id, summary_key_dict)\n
return summary_key_dict\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getitem_</string>
<string>_getattr_</string>
<string>container</string>
<string>script</string>
<string>KeyError</string>
<string>context</string>
<string>dependant_dimensions_dict</string>
<string>dict</string>
<string>summary_key_dict</string>
<string>Products.ERP5Type.Utils</string>
<string>cartesianProduct</string>
<string>_getiter_</string>
<string>cell_key</string>
<string>key</string>
<string>_write_</string>
<string>tuple</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BudgetLine_getSummaryCellIndexDict</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -100,15 +100,6 @@ for bc in non_strict_base_category_set.keys():\n
if dependant_vc_list:\n
dependant_dimensions_dict[vc] = dependant_vc_list\n
\n
\n
from Products.ERP5Type.Utils import cartesianProduct\n
# also add all cell coordinates in the dictionnary\n
for cell_key in cartesianProduct(context.getCellRange()):\n
for key in cell_key:\n
if key in dependant_dimensions_dict:\n
dependant_dimensions_dict[tuple(cell_key)] = [] # TODO ?\n
break\n
\n
return dependant_dimensions_dict\n
</string> </value>
</item>
......@@ -165,11 +156,6 @@ return dependant_dimensions_dict\n
<string>$append0</string>
<string>other_vc</string>
<string>dependant_vc_list</string>
<string>Products.ERP5Type.Utils</string>
<string>cartesianProduct</string>
<string>cell_key</string>
<string>key</string>
<string>tuple</string>
</tuple>
</value>
</item>
......
......@@ -13,10 +13,10 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>default</string>
<string>extra</string>
<string>precision</string>
<string>title</string>
</list>
</value>
</item>
......@@ -64,6 +64,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -75,7 +81,7 @@
<item>
<key> <string>precision</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
......@@ -144,6 +150,22 @@
</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: test(field.get_value("editable") and tuple(cell_index) in context.BudgetLine_getSummaryCellIndexDict(), \'style="background-color:#DDD"\', \'\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
......
319
\ No newline at end of file
320
\ No newline at end of file
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