bugGNU Health - Bugs: bug #44108, Error saving Death Certificate...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44108: Error saving Death Certificate when no DoB

Submitter:  Bruno M. Villasanti <bvillasanti>
Submitted:  Wed 28 Jan 2015 04:51:36 PM UTC
   
 
Category:  Programming / Tracebacks Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  bvillasanti
Open/Closed:  Closed Release:  2.7.0
Module:  health Component:  None

Wed 28 Jan 2015 04:57:49 PM UTC, comment #1: 

Fixed on changeset 1808:7cd6cf636709

Bruno M. Villasanti <bvillasanti>
Wed 28 Jan 2015 04:51:36 PM UTC, original submission:  
  • Case 1


Attached localhost screenshot [20150128 - 13:10:59.png] creating Death Certificate of a Party without date of birth.

For testing requires applying previous fix #44105.


  • Case 2


Also attached GNU Health Demo Database screenshot [20150128 - 13:14:15.png] showing the same error after removing the date of birth of a Party with a Death Certificate associated.

The error occurs when trying to enter to Death Certificates.


--
Error: local variable 'years_months_days' referenced before assignment

Traceback (most recent call last):
  File "/trytond/protocols/jsonrpc.py", line 150, in _marshaled_dispatch
    response['result'] = dispatch_method(method, params)
  File "/trytond/protocols/jsonrpc.py", line 179, in _dispatch
    res = dispatch(*args)
  File "/trytond/protocols/dispatcher.py", line 161, in dispatch
    result = rpc.result(meth(c_args, *c_kwargs))
  File "/trytond/model/modelsql.py", line 645, in read
    getter_results = field.get(ids, cls, field_list, values=result)
  File "/trytond/model/fields/function.py", line 86, in get
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 86, in <genexpr>
    return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 80, in call
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 80, in <genexpr>
    return dict((r.id, method(r, name)) for r in records)
  File "/trytond/modules/health/health.py", line 2219, in get_age_at_death
    return years_months_days
UnboundLocalError: local variable 'years_months_days' referenced before assignment

Bruno M. Villasanti <bvillasanti>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #32924:  20150128 - 13:14:15.png added by bvillasanti (215KiB - image/png - localhost (20150128 - 13:10:59.png) and GNU Health Demo Database (20150128 - 13:14:15.png))
file #32923:  20150128 - 13:10:59.png added by bvillasanti (214KiB - image/png - localhost (20150128 - 13:10:59.png) and GNU Health Demo Database (20150128 - 13:14:15.png))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bvillasanti (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-28 bvillasanti StatusIn Progress Fixed
        Open/ClosedOpen Closed
        ReleaseNone 2.7.0
    2015-01-28 bvillasanti Attached File- Added 20150128 - 13:10:59.png, #32923
        Attached File- Added 20150128 - 13:14:15.png, #32924

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code