[FIX] project: Fix traceback when date_format is false
Current behaviour: When the language is not set on the user date_format value is False so when opening project tasks we get the following traceback Error: Odoo Server Error Traceback (most recent call last): File '/Users/nea/src/odoo/odoo/addons/base/models/ir_http.py', line 237, in _dispatch result = request.dispatch() .... File '/Users/nea/src/odoo/addons/project/models/project.py', line 798, in _compute_recurrence_message task.recurrence_message += '<li>%s</li>' % date.strftime(date_format) Exception The above exception was the direct cause of the following exception: Traceback (most recent call last): File '/Users/nea/src/odoo/odoo/http.py', line 650, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File '/Users/nea/src/odoo/odoo/http.py', line 317, in _handle_exception raise exception.with_traceback(None) from new_cause TypeError: strftime() argument 1 must be str, not bool Expected behaviour: - Open projects tasks with no problem Fix: - to fix the problem we use get_lang() to retrieve the language object for the current use Affected versions: - 14.0 - 15.0 - 16.0 - master opw-3301081 closes odoo/odoo#121576 X-original-commit: cbbaa9df Signed-off-by:Xavier Bol (xbo) <xbo@odoo.com>
Loading
Please register or sign in to comment