Remove active in salable/purchase fields

This commit is contained in:
resteve 2013-04-29 14:49:14 +02:00
parent 75b7deba55
commit 205524cae5

View file

@ -42,9 +42,7 @@ class ProductOneClickView(ModelView):
fields.Many2One('product.uom.category', 'Default UOM Category', fields.Many2One('product.uom.category', 'Default UOM Category',
on_change_with=['default_uom']), on_change_with=['default_uom']),
'on_change_with_default_uom_category') 'on_change_with_default_uom_category')
salable = fields.Boolean('Salable', states={ salable = fields.Boolean('Salable')
'readonly':~Eval('active', True),
}, depends=['active'])
sale_uom = fields.Many2One('product.uom', 'Sale UOM', sale_uom = fields.Many2One('product.uom', 'Sale UOM',
states={ states={
'invisible':~Eval('salable', False), 'invisible':~Eval('salable', False),
@ -55,9 +53,7 @@ class ProductOneClickView(ModelView):
#~ ], #~ ],
on_change_with=['default_uom', 'sale_uom', 'salable'], on_change_with=['default_uom', 'sale_uom', 'salable'],
depends=['salable', 'default_uom_category']) depends=['salable', 'default_uom_category'])
purchasable = fields.Boolean('Purchasable', states={ purchasable = fields.Boolean('Purchasable')
'readonly':~Eval('active', True),
}, depends=['active'])
purchase_uom = fields.Many2One('product.uom', 'Purchase UOM', purchase_uom = fields.Many2One('product.uom', 'Purchase UOM',
states={ states={
'invisible':~Eval('purchasable'), 'invisible':~Eval('purchasable'),