Commit 7fc44859 authored by Jérome Perrin's avatar Jérome Perrin

ratio defined on quantity unit must be returned to keep compatibility with

quantities defined on quantity unit


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31974 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 17e06b4a
......@@ -989,15 +989,13 @@ class Resource(XMLMatrix, Variated):
portal = self.getPortalObject()
quantity_unit_uid = quantity_unit_value.getUid()
ratio = None
deprecated_quantity = quantity_unit_value.getProperty('quantity')
if deprecated_quantity is not None:
warn('quantity field of quantity_unit categories is deprecated.' \
' Please use Quantity Unit Conversion Definitions instead and' \
' reset the value of this field.', DeprecationWarning)
ratio = float(deprecated_quantity)
return float(deprecated_quantity)
query = self.ResourceModule_zGetQuantityUnitDefinitionRatio(
quantity_unit_uid=quantity_unit_uid,
......
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