|
From: | Niharika |
Subject: | [Health-dev] [bug #45350] Error message : "none type" object has no attribute "id" when father/mother name is not filled in birth certificate modu |
Date: | Fri, 19 Jun 2015 06:55:28 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 |
URL: <http://savannah.gnu.org/bugs/?45350> Summary: Error message : "none type" object has no attribute "id" when father/mother name is not filled in birth certificate modu Project: GNU Health Submitted by: niharika10 Submitted on: Fri 19 Jun 2015 06:55:27 AM GMT Category: Functionality Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Release: None Module: health _______________________________________________________ Details: # Step to Reproduce: 1. Go to demographics under health module (GNU Health). 2. Under demographics go to Birth certificate submenu. 3. Fill the required fields only (highlighted with blue) 4. Save the form. 5. Now go to parties menu 6. Under parties go to people submenu. 7. Select the record of the people whose birth certificate has been created. 8. Error Message Comes Up. # Solutions to the problem: 1. Make father/mother name as mandatory field in birth certificate. 2. Change the code at http://hg.savannah.gnu.org/hgweb/health/file/2d4c69f341cd/tryton/health/health.py#l326 as - if (self.birth_certificate) and (self.birth_certificate.father): Similarly, at http://hg.savannah.gnu.org/hgweb/health/file/2d4c69f341cd/tryton/health/health.py#l321 if (self.birth_certificate) and (self.birth_certificate.mother): 3 Raise an error "father/mother name is missing in birth certificate " while opening the people record. http://hg.savannah.gnu.org/hgweb/health/file/2d4c69f341cd/tryton/health/health.py#l324 def get_father(self, name): if (self.birth_certificate): if not self.birth_certificate.father: self.raise_user_error( "Father's Name is missing in Birth Certificate for %s" % self.name) return self.birth_certificate.father.id _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?45350> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |