Commit 6751f26a authored by Thierry's avatar Thierry

*** empty log message ***


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@80 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae85c4c1
......@@ -37,7 +37,6 @@ def getCodeArticleClient(self) :
if resource_value is None:
return ''
<<<<<<< CodeArticleClient.py
else :
variated_reference_list = resource_value.contentValues(filter={'portal_type':'Variated Reference'})
# we search a variated_reference wich define 'code_article'
......@@ -61,31 +60,6 @@ def getCodeArticleClient(self) :
key = tuple([resource] + predicate_value)
if code_article_client.has_key(key):
return code_article_client[key] # This is an infinite cache
=======
else :
variated_reference_list = resource_value.contentValues(filter={'portal_type':'Variated Reference'})
# we search a variated_reference wich define 'code_article'
my_variated_reference = None
for variated_reference in variated_reference_list :
if len(variated_reference.getMappedValuePropertyList()) <> 0 :
if variated_reference.getMappedValuePropertyList()[0] == 'code_article' :
my_variated_reference = variated_reference
break
predicate_value = []
if my_variated_reference is not None :
base_category_list = my_variated_reference.getVariationBaseCategoryList()
if 'coloris' in base_category_list and coloris :
predicate_value.append('coloris/'+coloris)
if 'taille' in base_category_list and taille :
predicate_value.append('taille/'+taille)
if 'morphologie' in base_category_list and morphologie :
predicate_value.append('morphologie/'+morphologie)
predicate_value.sort()
key = tuple([resource] + predicate_value)
if code_article_client.has_key(key):
return code_article_client[key] # This is an infinite cache
>>>>>>> 1.2
# Build cache
if my_variated_reference is not None :
......
......@@ -55,7 +55,6 @@ def getTailleClient(self) :
return taille_client[key] # This is an infinite cache
# Build cache
<<<<<<< TailleClient.py
if correspondance_taille is not None:
mapped_value_list = correspondance_taille.objectValues()
# Fill the cache
......@@ -69,22 +68,6 @@ def getTailleClient(self) :
taille_client[new_key] = cell.getProperty(key='taille_client')
else :
return taille.split('/')[-1]
=======
if resource_value is None:
return taille.split('/')[-1]
correspondance_taille = resource_value.getSpecialiseValue(portal_type=['Correspondance Tailles'])
if correspondance_taille is None:
return taille.split('/')[-1]
# Fill the cache
for cell in correspondance_taille.objectValues():
predicate_value = list(cell.getPredicateValueList())
predicate_value.sort()
new_key = tuple([resource] + predicate_value)
taille_client[new_key] = cell.getProperty(key='taille_client')
>>>>>>> 1.4
if taille_client.has_key(key):
return taille_client[key]
......
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