Mercurial > hgweb > health
changeset 3570:f09b60b3525b
health/health_gyneco: view_attributes() extends list instead of just set it
| author | Mario Puntin <mario@silix.com.ar> |
|---|---|
| date | Wed, 08 Apr 2020 09:22:36 -0300 |
| parents | 18af72df5cbe |
| children | a552ba49d982 |
| files | tryton/health/health.py tryton/health_gyneco/health_gyneco.py |
| diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health/health.py +++ b/tryton/health/health.py @@ -892,7 +892,8 @@ def view_attributes(cls): # Hide the group holding all the demographics when the party is not # a person - return [('//group[@id="person_details"]', 'states', { + return super(Party, cls).view_attributes() + [ + ('//group[@id="person_details"]', 'states', { 'invisible': ~Eval('is_person'), })]
--- a/tryton/health_gyneco/health_gyneco.py +++ b/tryton/health_gyneco/health_gyneco.py @@ -671,13 +671,14 @@ counter=counter+1 return stillbirths - @classmethod def view_attributes(cls): - return [('//page[@id="page_gyneco_obs"]', 'states', { + return super(GnuHealthPatient, cls).view_attributes() + [ + ('//page[@id="page_gyneco_obs"]', 'states', { 'invisible': Equal(Eval('biological_sex'), 'm'), })] + class PatientMenstrualHistory(ModelSQL, ModelView): 'Menstrual History' __name__ = 'gnuhealth.patient.menstrual_history'
