Commit d40a93f5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use the getter method instead of accessing the attribute directly.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32706 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0643ccfc
......@@ -117,10 +117,10 @@ class DeliveryBuilder(OrderBuilder):
# Add resource query
if self.getResourcePortalType() not in ('', None):
kw['resourceType'] = self.getResourcePortalType()
if self.simulation_select_method_id in ['', None]:
if self.getSimulationSelectMethodId() in ['', None]:
movement_list = [x.getObject() for x in self.portal_catalog(**kw)]
else:
select_method = getattr(self.getPortalObject(), self.simulation_select_method_id)
select_method = getattr(self.getPortalObject(), self.getSimulationSelectMethodId())
movement_list = select_method(**kw)
# XXX Use buildSQLQuery will be better
movement_list = [x for x in movement_list if \
......@@ -134,7 +134,7 @@ class DeliveryBuilder(OrderBuilder):
if mvt_dict.has_key(movement):
raise SelectMethodError, \
"%s return %s twice (or more)" % \
(str(self.simulation_select_method_id),
(str(self.getSimulationSelectMethodId()),
str(movement.getRelativeUrl()))
else:
mvt_dict[movement] = 1
......
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