[FIX] stock: calling 'get()' on None

This commit tests that values is not falsy before accessing a key

closes odoo/odoo#34343

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
William Henrotin
2019-06-25 08:00:30 +00:00
parent 5fd75da0e9
commit 1c542adf86
+1 -1
View File
@@ -679,7 +679,7 @@ class Warehouse(models.Model):
route_rule_values.update(values or {})
rules_list.append(route_rule_values)
first_rule = False
if values.get('propagate_cancel') and rules_list:
if values and values.get('propagate_cancel') and rules_list:
# In case of rules chain with cancel propagation set, we need to stop
# the cancellation for the last step in order to avoid cancelling
# any other move after the chain.