Commit 60203770 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_base: no need to change quantity if already zero

parent daa11512
...@@ -497,6 +497,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -497,6 +497,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
) )
#previous_movement_list= [] #previous_movement_list= []
for brain in previous_movement_list: for brain in previous_movement_list:
if brain.getQuantity() != 0:
previous_movement = brain.getObject() previous_movement = brain.getObject()
previous_movement.setQuantity(0) previous_movement.setQuantity(0)
previous_movement.setPrice(0) previous_movement.setPrice(0)
......
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple>
<string>W:521, 35: Unused variable \'portal_type\' (unused-variable)</string> <string>W:522, 35: Unused variable \'portal_type\' (unused-variable)</string>
<string>W:664, 18: Unused variable \'total_inventory\' (unused-variable)</string> <string>W:665, 18: Unused variable \'total_inventory\' (unused-variable)</string>
<string>W:421, 4: Unused variable \'original_min_stock_value\' (unused-variable)</string> <string>W:421, 4: Unused variable \'original_min_stock_value\' (unused-variable)</string>
<string>W:422, 4: Unused variable \'original_factor\' (unused-variable)</string> <string>W:422, 4: Unused variable \'original_factor\' (unused-variable)</string>
<string>W:521, 14: Unused variable \'inventory\' (unused-variable)</string> <string>W:522, 14: Unused variable \'inventory\' (unused-variable)</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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