The generated query in _generate_goals_from_challenge lacked spaces between the date clause, which caused a traceback. The traceback only appears since v12 and above, because the dates are now casted as dates (::date) in SQL, which has to be followed by a space. Before that it was "fine" as SQL does allow you to write g.start_date = '10-10-2017'and g.end_date = '11-11-2017' Closes #28773 closes odoo/odoo#29836