Hi everyone I've been always hosted in sh and never had issues with accessing my clients account_followup, but from a few days back I've been having an issue when trying to access them when the customer has invoices in USD which is a currency different than the companies main one which is DOP, i'ts been 3 days and a half and I've done everything (from the frontend) to try to solve this error:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http\.py",\ line\ 624,\ in\ _handle_exception
\ \ \ \ return\ super\(JsonRequest,\ self\)\._handle_exception\(exception\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 310,\ in\ _handle_exception
\ \ \ \ raise\ pycompat\.reraise\(type\(exception\),\ exception,\ sys\.exc_info\(\)\[2\]\)
\ \ File\ "/home/odoo/src/odoo/odoo/tools/pycompat\.py",\ line\ 14,\ in\ reraise
\ \ \ \ raise\ value
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 669,\ in\ dispatch
\ \ \ \ result\ =\ self\._call_function\(\*\*self\.params\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 350,\ in\ _call_function
\ \ \ \ return\ checked_call\(self\.db,\ \*args,\ \*\*kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/service/model\.py",\ line\ 94,\ in\ wrapper
\ \ \ \ return\ f\(dbname,\ \*args,\ \*\*kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 339,\ in\ checked_call
\ \ \ \ result\ =\ self\.endpoint\(\*a,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 915,\ in\ __call__
\ \ \ \ return\ self\.method\(\*args,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 515,\ in\ response_wrap
\ \ \ \ response\ =\ f\(\*args,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/addons/web/controllers/main\.py",\ line\ 1342,\ in\ call_kw
\ \ \ \ return\ self\._call_kw\(model,\ method,\ args,\ kwargs\)
\ \ File\ "/home/odoo/src/odoo/addons/web/controllers/main\.py",\ line\ 1334,\ in\ _call_kw
\ \ \ \ return\ call_kw\(request\.env\[model\],\ method,\ args,\ kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/api\.py",\ line\ 386,\ in\ call_kw
\ \ \ \ result\ =\ _call_kw_model\(method,\ model,\ args,\ kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/api\.py",\ line\ 359,\ in\ _call_kw_model
\ \ \ \ result\ =\ method\(recs,\ \*args,\ \*\*kwargs\)
\ \ File\ "/home/odoo/src/enterprise/account_followup/models/account_followup_report\.py",\ line\ 267,\ in\ get_followup_informations
\ \ \ \ html\ =\ self\.get_html\(options\)
\ \ File\ "/home/odoo/src/enterprise/account_followup/models/account_followup_report\.py",\ line\ 227,\ in\ get_html
\ \ \ \ return\ super\(AccountFollowupReport,\ self\)\.get_html\(options,\ line_id=line_id,\ additional_context=additional_context\)
\ \ File\ "/home/odoo/src/enterprise/account_reports/models/account_report\.py",\ line\ 1214,\ in\ get_html
\ \ \ \ lines\ =\ self\._get_lines\(options,\ line_id=line_id\)
\ \ File\ "/home/odoo/src/enterprise/account_followup/models/account_followup_report\.py",\ line\ 67,\ in\ _get_lines
\ \ \ \ for\ l\ in\ partner\.unreconciled_aml_ids\.sorted\(\)\.filtered\(lambda\ aml:\ not\ aml\.company_currency_id\.is_zero\(aml\.amount_residual\)
\ \ File\ "/home/odoo/src/odoo/odoo/models\.py",\ line\ 5374,\ in\ filtered
\ \ \ \ return\ self\.browse\(\[rec\.id\ for\ rec\ in\ self\ if\ func\(rec\)\]\)
\ \ File\ "/home/odoo/src/odoo/odoo/models\.py",\ line\ 5374,\ in\
\ \ \ \ return\ self\.browse\(\[rec\.id\ for\ rec\ in\ self\ if\ func\(rec\)\]\)
\ \ File\ "/home/odoo/src/enterprise/account_followup/models/account_followup_report.py", line 68, in
and (not aml.currency_id or not aml.currency_id.is_zero(aml.amount_residual-currency))):
NameError: free variable 'currency' referenced before assignment in enclosing scope