Commit d95acf16 authored by Jérome Perrin's avatar Jérome Perrin Committed by Eteri

fixup! accounting: translate GAP category in account view

* There was another level of cache in Account_hashGapItemList
* Category title was used in AccountModule_getAvailableGapList
parent 7e67f17a
......@@ -7,7 +7,7 @@ results = []
countries = context.portal_categories.gap.objectValues()
for country in countries :
for gap in country.objectValues() :
title = gap.getParentValue().getTitle() + '/'+ gap.getTitle()
title = gap.getParentValue().getTranslatedTitle() + '/'+ gap.getTranslatedTitle()
path = gap.getRelativeUrl()
if not include_gap_in_path :
path = path.replace('gap/', '')
......
Base_translateString = context.Base_translateString
portal = context.getPortalObject()
Base_translateString = portal.Base_translateString
split_depth = 2
def getSubFieldDict():
......@@ -34,8 +35,9 @@ def getSubFieldDict():
return sub_field_dict
from Products.ERP5Type.Cache import CachingMethod
getSubFieldDictCache = CachingMethod(getSubFieldDictCache,
id='Account_getSubFieldDict')
getSubFieldDictCache = CachingMethod(
getSubFieldDictCache,
id='Account_getSubFieldDict.%s' % portal.Localizer.get_selected_language())
# Those cached dictionnaries are later modified, we just reset the 'value'
# key to return clean dictionnaries.
sub_field_dict = getSubFieldDictCache()
......
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