From beae5e9a123cbe8bc257d45717f701fb226cdc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 13 Jun 2012 23:38:52 +0200 Subject: [PATCH] Add missing states on boms --- product.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index d535c9ee50..8bf70a850b 100644 --- a/product.py +++ b/product.py @@ -8,7 +8,11 @@ class Product(ModelSQL, ModelView): _name = 'product.product' boms = fields.One2Many('product.product-production.bom', 'product', - 'BOMs', order=[('sequence', 'ASC'), ('id', 'ASC')]) + 'BOMs', order=[('sequence', 'ASC'), ('id', 'ASC')], + states={ + 'invisible': Eval('type', 'service') == 'service', + }, + depends=['type']) def __init__(self): super(Product, self).__init__()