Commit ceef1fbd authored by Jean-Paul Smets's avatar Jean-Paul Smets

filter variation dimensions (no None)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@114 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 537e82c1
......@@ -278,15 +278,11 @@ Une ligne tarifaire."""
for k in cell_range_key_list:
#LOG('new cell',0,str(k))
c = self.newCell(*k, **kwd)
filtered_range_key_list = []
for k_item in k :
if k_item is not None :
filtered_range_key_list.append(k_item)
c.edit( domain_base_category_list = self.getVariationBaseCategoryList(),
mapped_value_property_list = ('target_quantity', 'quantity', 'price',),
predicate_operator = 'SUPERSET_OF',
predicate_value = filtered_range_key_list,
variation_category_list = filtered_range_key_list
predicate_value = filter(lambda k_item: k_item is not None, k),
variation_category_list = filter(lambda k_item: k_item is not None, k)
)
else:
# If only one cell, delete it
......
......@@ -193,8 +193,8 @@ Une ligne tarifaire."""
c.edit( domain_base_category_list = self.getVariationBaseCategoryList(),
mapped_value_property_list = ('inventory', 'price',),
predicate_operator = 'SUPERSET_OF',
predicate_value = k,
variation_category_list = k
predicate_value = filter(lambda k_item: k_item is not None, k),
variation_category_list = filter(lambda k_item: k_item is not None, k)
)
c.flushActivity(invoke=1)
else:
......
......@@ -153,8 +153,8 @@ Une ligne tarifaire."""
c.edit( domain_base_category_list = self.getVariationBaseCategoryList(),
mapped_value_property_list = ('target_quantity', 'price',),
predicate_operator = 'SUPERSET_OF',
predicate_value = k,
variation_category_list = k
predicate_value = filter(lambda k_item: k_item is not None, k),
variation_category_list = filter(lambda k_item: k_item is not None, k)
)
LOG('After edit cells in OrderLine',0,'')
else:
......
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