Hide production tab on services

issue9232
review299441002
This commit is contained in:
Sergi Almacellas Abellana
2020-04-20 14:00:59 +02:00
parent 3c04d15de5
commit 0f30e6a5a9
+7 -7
View File
@@ -16,6 +16,13 @@ class Template(metaclass=PoolMeta):
},
depends=['type'])
@classmethod
def view_attributes(cls):
return super().view_attributes() + [
('//page[@id="production"]', 'states', {
'invisible': ~Eval('producible'),
})]
class Product(metaclass=PoolMeta):
__name__ = 'product.product'
@@ -63,13 +70,6 @@ class Product(metaclass=PoolMeta):
default.setdefault('boms', None)
return super(Product, cls).copy(products, default=default)
@classmethod
def view_attributes(cls):
return super(Product, cls).view_attributes() + [
('//page[@id="production"]', 'states', {
'invisible': ~Eval('producible'),
})]
class ProductBom(sequence_ordered(), ModelSQL, ModelView):
'Product - BOM'