changeset 1515:a63a17934bfa

health : Show specialty of the hospital only if specialized institution
author Luis Falcon <falcon@gnu.org>
date Mon, 25 Aug 2014 16:45:32 +0100
parents 51348375b030
children 2bd8ee122868
files tryton/health/health.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tryton/health/health.py
+++ b/tryton/health/health.py
@@ -827,8 +827,10 @@
         domain=[('name', '=', Eval('active_id'))], depends=['specialties'], 
         help="Choose the speciality in the case of Specialized Hospitals" \
             " or where this center excels", 
-        states={'required': And(Eval('institution_type') == 'specialized', Bool(Eval('specialties'))),
-            'readonly': Not(Bool(Eval('name')))})
+        states={'required': And(Eval('institution_type') == 'specialized',
+            Bool(Eval('specialties'))),
+            'readonly': Not(Bool(Eval('name'))),
+            'invisible':Not(Eval('institution_type') == 'specialized')})
 
     # Add Specialties to the Health Institution
     operational_sectors = fields.One2Many('gnuhealth.institution.operationalsector',