Fix set_xxx_moves when value is False

This commit is contained in:
Cédric Krier
2008-12-04 18:34:30 +01:00
parent 754b6b6a64
commit bf14912072
+16
View File
@@ -114,6 +114,10 @@ class PackingIn(OSV):
def set_incoming_moves(self, cursor, user, packing_id, name, value, arg,
context=None):
move_obj = self.pool.get('stock.move')
if not value:
return
packing = self.browse(cursor, user, packing_id, context=context)
move_ids = []
for act in value:
@@ -157,6 +161,10 @@ class PackingIn(OSV):
def set_inventory_moves(self, cursor, user, packing_id, name, value, arg,
context=None):
move_obj = self.pool.get('stock.move')
if not value:
return
packing = self.browse(cursor, user, packing_id, context=context)
move_ids = []
for act in value:
@@ -383,6 +391,10 @@ class PackingOut(OSV):
def set_outgoing_moves(self, cursor, user, packing_id, name, value, arg,
context=None):
move_obj = self.pool.get('stock.move')
if not value:
return
packing = self.browse(cursor, user, packing_id, context=context)
move_ids = []
for act in value:
@@ -426,6 +438,10 @@ class PackingOut(OSV):
def set_inventory_moves(self, cursor, user, packing_id, name, value, arg,
context=None):
move_obj = self.pool.get('stock.move')
if not value:
return
packing = self.browse(cursor, user, packing_id, context=context)
move_ids = []
for act in value: