[Erp5-report] r31752 jerome - in /erp5/trunk/products: ERP5/bootstrap/erp5_core/SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jan 14 15:54:46 CET 2010
Author: jerome
Date: Thu Jan 14 15:54:44 2010
New Revision: 31752
URL: http://svn.erp5.org?rev=31752&view=rev
Log:
MatrixBox must call the as cell range script on the context returned by "Getter
method", and must pass the base_id
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
erp5/trunk/products/ERP5Form/MatrixBox.py
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml?rev=31752&r1=31751&r2=31752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] Thu Jan 14 15:54:44 2010
@@ -148,7 +148,8 @@
columns = []\n
tabs = []\n
if as_cell_range_script_id:\n
- cell_range = getattr(context, as_cell_range_script_id)(matrixbox=True)\n
+ cell_range = getattr(matrix_context,\n
+ as_cell_range_script_id)(matrixbox=True, base_id=cell_base_id)\n
if len(cell_range) == 1:\n
lines, = cell_range\n
elif len(cell_range) == 2:\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=31752&r1=31751&r2=31752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Thu Jan 14 15:54:44 2010
@@ -1,1 +1,1 @@
-1433
+1434
Modified: erp5/trunk/products/ERP5Form/MatrixBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/MatrixBox.py?rev=31752&r1=31751&r2=31752&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/MatrixBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/MatrixBox.py [utf8] Thu Jan 14 15:54:44 2010
@@ -201,13 +201,19 @@
form = field.aq_parent
field_title = field.get_value('title')
cell_base_id = field.get_value('cell_base_id')
+ context = here
+ getter_method_id = field.get_value('getter_method')
+ if getter_method_id not in (None,''):
+ context = getattr(here,getter_method_id)()
+ if context is None:
+ return ''
as_cell_range_script_id = field.get_value('as_cell_range_script_id')
if as_cell_range_script_id:
lines = []
columns = []
tabs = []
- dimension_list = guarded_getattr(here,
- as_cell_range_script_id)(matrixbox=True)
+ dimension_list = guarded_getattr(context,
+ as_cell_range_script_id)(matrixbox=True, base_id=cell_base_id)
len_dimension_list = len(dimension_list)
if len_dimension_list:
if len_dimension_list == 1:
@@ -225,12 +231,6 @@
columns = field.get_value('columns')
tabs = field.get_value('tabs')
field_errors = REQUEST.get('field_errors', {})
- context = here
- getter_method_id = field.get_value('getter_method')
- if getter_method_id not in (None,''):
- context = getattr(here,getter_method_id)()
- if context is None:
- return ''
cell_getter_method_id = field.get_value('cell_getter_method')
if cell_getter_method_id not in (None, ''):
cell_getter_method = getattr(here, cell_getter_method_id)
@@ -445,12 +445,18 @@
here = getattr(form, 'aq_parent', REQUEST)
cell_base_id = field.get_value('cell_base_id')
as_cell_range_script_id = field.get_value('as_cell_range_script_id')
+ context = here
+ getter_method_id = field.get_value('getter_method')
+ if getter_method_id not in (None,''):
+ context = getattr(here,getter_method_id)()
+ if context is None:
+ return {}
if as_cell_range_script_id:
lines = []
columns = []
tabs = []
- dimension_list = guarded_getattr(here,
- as_cell_range_script_id)(matrixbox=True)
+ dimension_list = guarded_getattr(context,
+ as_cell_range_script_id)(matrixbox=True, base_id=cell_base_id)
len_dimension_list = len(dimension_list)
if len_dimension_list:
if len_dimension_list == 1:
@@ -469,12 +475,7 @@
tabs = field.get_value('tabs')
editable_attributes = field.get_value('editable_attributes')
- getter_method_id = field.get_value('getter_method')
error_list = []
- context = here
- if getter_method_id not in (None,''):
- context = getattr(here,getter_method_id)()
- if context is None: return {}
cell_getter_method_id = field.get_value('cell_getter_method')
if cell_getter_method_id not in (None, ''):
cell_getter_method = getattr(here, cell_getter_method_id)
More information about the Erp5-report
mailing list