Commit 2303b4c3 authored by Yusei Tahara's avatar Yusei Tahara

if property_id parameter is passed, return only one rounding model

which target that property.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34268 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 717d7dd6
......@@ -93,6 +93,11 @@ class RoundingTool(BaseTool):
portal_type='Rounding Model',
validation_state='validated',
**kw)
if property_id is not None:
for rounding_model in result:
if property_id in rounding_model.getRoundedPropertyIdList():
return [rounding_model]
return result
security.declarePublic('getRoundingProxy')
......
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