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

Submitted by:  Bruno M. Villasanti <bvillasanti>
Submitted on:  Wed 28 Jan 2015 04:51:36 PM UTC  
 
Category: Programming / TracebacksSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Bruno M. Villasanti <bvillasanti>
Open/Closed: ClosedRelease: 2.7.0
Module: health

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

Fixed on changeset 1808:7cd6cf636709

Bruno M. Villasanti <bvillasanti>In charge of this item.
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>In charge of this item.

 

Attached Files
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))
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))

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Jan 2015 04:57:49 PM UTCbvillasantiStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
      ReleaseNone=>2.7.0
    Wed 28 Jan 2015 04:51:36 PM UTCbvillasantiAttached 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.1-cleanup1