Commit 4ef7d621 authored by Alexandre Boeglin's avatar Alexandre Boeglin

use getQuantity() instead of accessing quantity directly (returns the default

property value instead of raising AttributeError)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b91a0fa3
......@@ -112,8 +112,8 @@ class PackingList(Delivery):
'has_cell_content': 0,
}
container_mvt_list = self.portal_catalog(**query_kw)
packed_quantity = sum([x.quantity for x in container_mvt_list \
if x.quantity is not None])
packed_quantity = sum([x.getQuantity() for x in container_mvt_list \
if x.getQuantity() is not None])
if quantity != packed_quantity:
return 0
......
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