Tuesday, March 14, 2017
1 change
Resolved issues and error corrections
This change fixes an error that could appear when loading currency formatting information, including during login in affected builds. It ensures the currency format is prepared before use so users can access the system without encountering the crash.
Original PR description
Description of the issue/feature this PR addresses:
1. Connect to [runbot build#203365](http://runbot.odoo.com/runbot/build/203365)
2. Login with admin/admin
Current behavior before PR:
- Show error
```python
File "/home/odoo/runbot/extra/runbot/static/build/203365-saas-14-7d7cc9/odoo/api.py", line 664, in call_kw_model
result = method(recs, *args, **kwargs)
File "/home/odoo/runbot/extra/runbot/static/build/203365-saas-14-7d7cc9/odoo/addons/base/res/res_currency.py", line 180, in get_format_currencies_js_function
function = "if (arguments[1] === false || arguments[1] === undefined) {" + company_currency_format + " }" + function
UnboundLocalError: local variable 'company_currency_format' referenced before assignment
```
See video for more details:
- [](http://www.youtube.com/watch?v=NCJ0VzAm2kY "Video Title")
Desired behavior after PR is merged:
- Fix the variable used before assigned.