Wed 28 Jan 2015 04:51:36 PM UTC, original submission:
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.
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
|