Commit 6d036610 authored by Aurel's avatar Aurel

set uid on tmp line as the one of movement, and thus make possible

join between stock and movement on inventory line


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17054 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee350f95
...@@ -137,7 +137,6 @@ class Inventory(Delivery): ...@@ -137,7 +137,6 @@ class Inventory(Delivery):
# Browse all movements on inventory and create diff line when necessary # Browse all movements on inventory and create diff line when necessary
not_used_inventory_dict = {} not_used_inventory_dict = {}
inventory_uid = self.getUid()
inventory_id = self.getId() inventory_id = self.getId()
for movement in self.getMovementList(): for movement in self.getMovementList():
if movement.getResourceValue() is not None and \ if movement.getResourceValue() is not None and \
...@@ -172,7 +171,7 @@ class Inventory(Delivery): ...@@ -172,7 +171,7 @@ class Inventory(Delivery):
# Create tmp movement with only diff between inventory # Create tmp movement with only diff between inventory
# and previous stock values # and previous stock values
if diff_quantity != 0: if diff_quantity != 0:
kwd = {'uid': inventory_uid, kwd = {'uid': movement.getUid(),
'start_date': start_date} 'start_date': start_date}
if variation_text is not None: if variation_text is not None:
variation_list = variation_text.split('\n') variation_list = variation_text.split('\n')
...@@ -196,6 +195,7 @@ class Inventory(Delivery): ...@@ -196,6 +195,7 @@ class Inventory(Delivery):
# Now create line to remove some subvariation text not present # Now create line to remove some subvariation text not present
# in new inventory # in new inventory
inventory_uid = self.getUid()
for resource_and_variation_key in not_used_inventory_dict.keys(): for resource_and_variation_key in not_used_inventory_dict.keys():
inventory_by_subvariation_dict = \ inventory_by_subvariation_dict = \
not_used_inventory_dict[resource_and_variation_key] not_used_inventory_dict[resource_and_variation_key]
......
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