Add 'type' in on_change_with_warehouse depends

This commit is contained in:
Guillem Barba 2015-01-22 18:50:19 +01:00
parent 073509f9bd
commit 5c640fceda
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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):