Commit 529995c2 authored by Jérome Perrin's avatar Jérome Perrin

there's no reason for inventory line to have quantity implictly set to the sum

of item quantities. Anyway even if we want to do this, it should not be done
by overloading _edit


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27330 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b905d2c
...@@ -68,18 +68,6 @@ class InventoryLine(DeliveryLine): ...@@ -68,18 +68,6 @@ class InventoryLine(DeliveryLine):
) )
def _edit(self, REQUEST=None, force_update = 0, **kw):
DeliveryLine._edit(self, REQUEST=REQUEST, force_update = force_update, **kw)
# Calculate inventory
item_list = self.getAggregateValueList()
if item_list not in [None,[]]:
inventory = 0
for item in item_list:
if item.getQuantity() not in [None, '']:
inventory += item.getQuantity()
self.setInventory(inventory)
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalInventory') security.declareProtected(Permissions.AccessContentsInformation, 'getTotalInventory')
def getTotalInventory(self): def getTotalInventory(self):
""" """
......
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