Commit 8027376e authored by Fabien Morin's avatar Fabien Morin

- use ApparelColourRange instead of VariationRange (revert of r29344) because...

- use ApparelColourRange instead of VariationRange (revert of r29344) because ApparelColourRange defined a default value (color) usefull for this class.
- also partially revert r29343 in the same way
- use _list for variation_base_category and optional_variation_base_category fields

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29434 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b529ad8
......@@ -61,5 +61,4 @@ class ApparelAssortment(Resource, XMLMatrix):
, PropertySheet.Comment
, PropertySheet.ApparelCollection
, PropertySheet.ApparelSize
, PropertySheet.VariationRange
)
......@@ -55,5 +55,5 @@ class ApparelColourRange(Resource):
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.ApparelCollection
, PropertySheet.VariationRange
, PropertySheet.ApparelColourRange
)
......@@ -27,6 +27,10 @@
<list/>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
<value>
......@@ -63,6 +67,12 @@
<key> <string>filter_content_types</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>hidden_content_type_list</string> </key>
<value>
......@@ -77,6 +87,10 @@
<key> <string>init_script</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
......
......@@ -49,6 +49,14 @@ class ApparelAssortment:
'acquisition_accessor_id' : 'getTitle',
'acquisition_depends' : None,
'mode' : 'w' },
# Override default value
{ 'id' : 'variation_base_category',
'description' : 'A list of base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'tokens',
'default' : ['colour','size'],
'mode' : 'r' },
)
#_categories = ( 'eip', 'collection', 'destination', 'taille', 'nomenclature_douane', 'specialise' )
......
##############################################################################
#
# Copyright (c) 2002 Coramy SAS and Contributors. All Rights Reserved.
# Thierry Faucher <Thierry_Faucher@coramy.com>
# Copyright (c) 2004 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class ApparelColourRange:
"""
ApparelColourRange properties and categories
"""
_properties = (
# Override default value
{ 'id' : 'variation_base_category',
'description' : 'A list of base categories which define possible discrete variations. '\
'Variation ranges are stored as category membership. '\
'(prev. variation_category_list).',
'type' : 'tokens',
'default' : ['colour'],
'mode' : 'r' },
)
_categories = ( )
......@@ -96,14 +96,14 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_preferred_apparel_cloth_variation_base_category</string>
<string>my_preferred_apparel_cloth_optional_variation_base_category</string>
<string>my_preferred_apparel_cloth_variation_base_category_list</string>
<string>my_preferred_apparel_cloth_optional_variation_base_category_list</string>
<string>my_preferred_apparel_cloth_individual_variation_base_category</string>
<string>my_preferred_apparel_component_variation_base_category</string>
<string>my_preferred_apparel_component_optional_variation_base_category</string>
<string>my_preferred_apparel_component_variation_base_category_list</string>
<string>my_preferred_apparel_component_optional_variation_base_category_list</string>
<string>my_preferred_apparel_component_individual_variation_base_category</string>
<string>my_preferred_apparel_shape_variation_base_category</string>
<string>my_preferred_apparel_shape_optional_variation_base_category</string>
<string>my_preferred_apparel_shape_variation_base_category_list</string>
<string>my_preferred_apparel_shape_optional_variation_base_category_list</string>
<string>my_preferred_apparel_shape_individual_variation_base_category</string>
</list>
</value>
......@@ -112,11 +112,11 @@
<key> <string>right</string> </key>
<value>
<list>
<string>my_preferred_apparel_model_variation_base_category</string>
<string>my_preferred_apparel_model_optional_variation_base_category</string>
<string>my_preferred_apparel_model_variation_base_category_list</string>
<string>my_preferred_apparel_model_optional_variation_base_category_lits</string>
<string>my_preferred_apparel_model_individual_variation_base_category</string>
<string>my_preferred_apparel_fabric_variation_base_category</string>
<string>my_preferred_apparel_fabric_optional_variation_base_category</string>
<string>my_preferred_apparel_fabric_variation_base_category_list</string>
<string>my_preferred_apparel_fabric_optional_variation_base_category_list</string>
<string>my_preferred_apparel_fabric_individual_variation_base_category</string>
</list>
</value>
......
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelClothIndividualVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_cloth_optional_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_cloth_optional_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelClothOptionalVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_cloth_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_cloth_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelClothVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelComponentIndividualVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_component_optional_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_component_optional_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelComponentOptionalVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_component_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_component_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelComponentVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelFabricIndividualVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_fabric_optional_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_fabric_optional_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelFabricOptionalVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_fabric_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_fabric_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelFabricVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelModelIndividualVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_model_optional_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_model_optional_variation_base_category_lits</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelModelOptionalVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_model_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_model_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelModelVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelShapeIndividualVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_shape_optional_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_shape_optional_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelShapeOptionalVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -20,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_apparel_shape_variation_base_category</string> </value>
<value> <string>my_preferred_apparel_shape_variation_base_category_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -58,9 +58,7 @@
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
......@@ -113,20 +111,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPreferredApparelShapeVariationBaseCategoryList() or preferences.getPreferredProductVariationBaseCategoryList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
76
\ No newline at end of file
80
\ No newline at end of file
......@@ -15,3 +15,4 @@ ApparelModelColourVariation
ApparelComponentVariation
ApparelSize
ApparelPreference
ApparelColourRange
\ No newline at end of file
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