Commit 1eac5658 authored by Guillaume Michon's avatar Guillaume Michon

Use generic list of item types and provide title accessors


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee854207
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
# #
############################################################################## ##############################################################################
from Products.ERP5.ERP5Globals import *
class ItemAggregation: class ItemAggregation:
""" """
Properties of an object wich aggregates items Properties of an object wich aggregates items
...@@ -36,29 +39,56 @@ class ItemAggregation: ...@@ -36,29 +39,56 @@ class ItemAggregation:
'description' : 'list of ids of items', 'description' : 'list of ids of items',
'type' : 'lines', 'type' : 'lines',
'acquisition_base_category' : ('aggregate',), 'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : ('Piece Tissu',), 'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId', 'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'item_title',
'description' : 'list of titles of items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'produced_item_id', { 'id' : 'produced_item_id',
'description' : 'list of ids of produced items', 'description' : 'list of ids of produced items',
'type' : 'lines', 'type' : 'lines',
'acquisition_base_category' : ('aggregate',), 'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : ('Piece Tissu',), 'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId', 'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'produced_item_title',
'description' : 'list of ids of produced items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
{ 'id' : 'consumed_item_id', { 'id' : 'consumed_item_id',
'description' : 'list of ids of consumed items', 'description' : 'list of ids of consumed items',
'type' : 'lines', 'type' : 'lines',
'acquisition_base_category' : ('aggregate',), 'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : ('Piece Tissu',), 'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1, 'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getId', 'acquisition_accessor_id' : 'getId',
'acquisition_depends' : None, 'acquisition_depends' : None,
'mode' : 'w' }, 'mode' : 'w' },
{ 'id' : 'consumed_item_title',
'description' : 'list of ids of consumed items',
'type' : 'lines',
'acquisition_base_category' : ('aggregate',),
'acquisition_portal_type' : item_type_list,
'acquisition_copy_value' : 1,
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
) )
_categories = ('aggregate',) _categories = ('aggregate',)
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