Use fields.depends decorator

issue3487
review2301002
This commit is contained in:
Cédric Krier committed 2014-01-26 14:29:44 +01:00
1 parent 0348676a28
commit 83b26fac40
1 file changed
+2 -2
+2 -2
View File
@@ -24,8 +24,7 @@ class OrderPoint(ModelSQL, ModelView):
('purchasable', 'in', If(Equal(Eval('type'), 'purchase'),
[True], [True, False])),
],
depends=['type'],
on_change=['product'])
depends=['type'])
warehouse_location = fields.Many2One('stock.location',
'Warehouse Location', select=True,
domain=[('type', '=', 'warehouse')],
@@ -99,6 +98,7 @@ class OrderPoint(ModelSQL, ModelView):
def default_type():
return "purchase"
@fields.depends('product')
def on_change_product(self):
res = {
'unit': None,