From 5c640fceda24daf7a284b3d1abd7def75a45ecc4 Mon Sep 17 00:00:00 2001 From: Guillem Barba Date: Thu, 22 Jan 2015 18:50:19 +0100 Subject: [PATCH] Add 'type' in on_change_with_warehouse depends --- CHANGELOG | 2 ++ location.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 60b56f7..fdfbb04 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Add 'type' in on_change_with_warehouse depends + Version 3.4.0 - 2014-11-05 Version 3.2.0 - 2014-06-04 diff --git a/location.py b/location.py index 7eed177..de0f48e 100644 --- a/location.py +++ b/location.py @@ -24,7 +24,7 @@ class Location(ModelSQL, ModelView): 'The Storage location must be unique.'), ] - @fields.depends('parent') + @fields.depends('type', 'parent') def on_change_with_warehouse(self, name=None): if (not self.id or self.type not in ('storage', 'view') or not self.parent):