[Erp5-report] r37299 jerome - in /erp5/trunk/bt5/erp5_budget: SkinTemplateItem/portal_skins...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 27 17:47:11 CEST 2010


Author: jerome
Date: Tue Jul 27 17:47:09 2010
New Revision: 37299

URL: http://svn.erp5.org?rev=37299&view=rev
Log:
apply a different style if the budget cell is a summary cell

Added:
    erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryCellIndexDict.xml
Modified:
    erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryDimensionKeyDict.xml
    erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_viewFieldLibrary/matrixbox_quantity.xml
    erp5/trunk/bt5/erp5_budget/bt/revision

Added: erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryCellIndexDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryCellIndexDict.xml?rev=37299&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryCellIndexDict.xml (added)
+++ erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryCellIndexDict.xml [utf8] Tue Jul 27 17:47:09 2010
@@ -0,0 +1,154 @@
+<?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>

Modified: erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryDimensionKeyDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryDimensionKeyDict.xml?rev=37299&r1=37298&r2=37299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryDimensionKeyDict.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_getSummaryDimensionKeyDict.xml [utf8] Tue Jul 27 17:47:09 2010
@@ -100,15 +100,6 @@ for bc in non_strict_base_category_set.k
     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>

Modified: erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_viewFieldLibrary/matrixbox_quantity.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_viewFieldLibrary/matrixbox_quantity.xml?rev=37299&r1=37298&r2=37299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_viewFieldLibrary/matrixbox_quantity.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/BudgetLine_viewFieldLibrary/matrixbox_quantity.xml [utf8] Tue Jul 27 17:47:09 2010
@@ -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>
@@ -65,6 +65,12 @@
                     </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>
                 </item>
@@ -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>
@@ -154,6 +160,22 @@
       <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"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
             <value> <string>python: here.getQuantityPrecisionFromResource(here.getResource())</string> </value>
         </item>
       </dictionary>

Modified: erp5/trunk/bt5/erp5_budget/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_budget/bt/revision?rev=37299&r1=37298&r2=37299&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_budget/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_budget/bt/revision [utf8] Tue Jul 27 17:47:09 2010
@@ -1 +1 @@
-319
\ No newline at end of file
+320
\ No newline at end of file




More information about the Erp5-report mailing list