Commit 9a22261b authored by Jérome Perrin's avatar Jérome Perrin

fix nameerror in getQuantityPrecisionFromResource



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10549 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 894f23d9
...@@ -2413,17 +2413,17 @@ class Base( CopyContainer, ...@@ -2413,17 +2413,17 @@ class Base( CopyContainer,
Provides a quick access to precision without accessing the resource Provides a quick access to precision without accessing the resource
value in ZODB value in ZODB
""" """
def cashed_getQuantityPrecisionFromResource(resource): def cached_getQuantityPrecisionFromResource(resource):
resource_value = self.portal_categories.resolveCategory(resource) resource_value = self.portal_categories.resolveCategory(resource)
if resource_value is not None: if resource_value is not None:
return resource_value.getQuantityPrecision() return resource_value.getQuantityPrecision()
else: return 0
return 0
cashed_getQuantityPrecisionFromResource = CachingMethod(cashed_getQuantityPrecisionFromResource, cached_getQuantityPrecisionFromResource = CachingMethod(
id='Base_getQuantityPrecisionFromResource') cached_getQuantityPrecisionFromResource,
id='Base_getQuantityPrecisionFromResource')
return cashed_getResourceQuantityPrecision(resource) return cached_getResourceQuantityPrecision(resource)
# Documentation Helpers # Documentation Helpers
......
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