Commit 6489e380 authored by Tatuya Kamada's avatar Tatuya Kamada

Pass activate_kw to updateCellList.

Now we can do like this.

updateCellList(portal,
               supply_line,
               'Internal Supply Cell',
               'SupplyLine_asCellRange',
               table,
               activate_kw=activate_kw)

Then reindex activites take into account the activate_kw.
parent ebdd06fe
...@@ -467,7 +467,8 @@ def to_utf8(text): ...@@ -467,7 +467,8 @@ def to_utf8(text):
text = text.encode('utf-8') text = text.encode('utf-8')
return text return text
def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list): def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list,
activate_kw=None):
"""A matrixbox-like helper function to create cells at once. """A matrixbox-like helper function to create cells at once.
dicts in cell_dict_list can have following keys: dicts in cell_dict_list can have following keys:
...@@ -615,7 +616,7 @@ def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list): ...@@ -615,7 +616,7 @@ def updateCellList(portal, line, cell_type, cell_range_method, cell_dict_list):
category_list = getSortedCategoryList(line, base_id, category_list) category_list = getSortedCategoryList(line, base_id, category_list)
cell = line.newCell(portal_type=cell_type, cell = line.newCell(portal_type=cell_type,
base_id=base_id, base_id=base_id,
*category_list) *category_list, activate_kw=activate_kw)
cell.edit(**mapped_value_dict) cell.edit(**mapped_value_dict)
cell.setMappedValuePropertyList(mapped_value_dict.keys()) cell.setMappedValuePropertyList(mapped_value_dict.keys())
......
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