DeliveryLine_asCellRange.py 907 Bytes
Newer Older
Jean-Paul Smets's avatar
Jean-Paul Smets committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
## Script (Python) "DeliveryLine_asCellRange"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
line_ids = context.order_line_matrix_item_list(base_category_list = ('tax_category', 'coloris', 'variante'), base=1)
column_ids = context.order_line_matrix_item_list(base_category_list = ('salary_range','taille',), base=1)
tab_ids = context.order_line_matrix_item_list(base_category_list = ('salary_range','tax_category', 'taille','coloris','variante'),
                                                       base=1, include=0)

line_ids = map(lambda x: x[0], line_ids)
column_ids = map(lambda x: x[0], column_ids)
tab_ids = map(lambda x: x[0], tab_ids)


if len(tab_ids) is 0:
  return [line_ids, column_ids]
elif tab_ids[0] is None:
  return [line_ids, column_ids]
else:
  return [line_ids, column_ids, tab_ids]