diff options
| author | William Henrotin <whe@odoo.com> | 2019-06-19 09:53:52 +0000 |
|---|---|---|
| committer | William Henrotin <whe@odoo.com> | 2019-06-25 08:00:30 +0000 |
| commit | 1c542adf863f6de731fda24a9ddc712337bceb61 (patch) | |
| tree | bf8c7d1d4aa9b2d8f0d5b91e6fba88e1384b36ba /addons | |
| parent | 5fd75da0e944952b2f8c9c4de19d84b3b78f6187 (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/models/stock_warehouse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py index aad9f297179..343a8840200 100644 --- a/addons/stock/models/stock_warehouse.py +++ b/addons/stock/models/stock_warehouse.py @@ -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. |
