Ciao a tutti,
durante l'aggiornamento di un'installazione con odoo 8, dopo aver aggiornato odoo e tutti gli addons all'ultima versione, lancio l'update del DB e sul modulo project e crm mi trovo errori simili a questo
2019-02-02 13:37:38,250 30362 ERROR emernet openerp.sql_db: Programming error: column "h.date" must appear in the GROUP BY clause or be used in an aggregate function
LINE 9: h.date+generate_series(0, CAST((coalesce...
^
, in query CREATE VIEW project_task_history_cumulative AS (
SELECT
history.date::varchar||'-'||history.history_id::varchar AS id,
history.date AS end_date,
*
FROM (
SELECT
h.id AS history_id,
h.date+generate_series(0, CAST((coalesce(h.end_date, DATE 'tomorrow')::date - h.date) AS integer)-1) AS date,
h.task_id, h.type_id, h.user_id, h.kanban_state,
count(h.task_id) as nbr_tasks,
greatest(h.remaining_hours, 1) AS remaining_hours, greatest(h.planned_hours, 1) AS planned_hours,
t.project_id
FROM
project_task_history AS h
JOIN project_task AS t ON (h.task_id = t.id)
GROUP BY
h.id,
h.task_id,
t.project_id
) AS history
)
2019-02-02 13:37:38,251 30362 CRITICAL emernet openerp.service.server: Failed to initialize database `emernet`.
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/service/server.py", line 941, in preload_registries
registry = RegistryManager.new(dbname, update_module=update_module)
File "/opt/odoo/odoo/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 351, in load_modules
force, status, report, loaded_modules, update_module)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/odoo/odoo/openerp/modules/loading.py", line 157, in load_module_graph
init_module_models(cr, package.name, models)
File "/opt/odoo/odoo/openerp/modules/module.py", line 290, in init_module_models
obj.init(cr)
File "/opt/odoo/odoo/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/odoo/addons/project/project.py", line 1365, in init
""")
File "/opt/odoo/odoo/openerp/sql_db.py", line 171, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoo/odoo/openerp/sql_db.py", line 247, in execute
res = self._obj.execute(query, params)
ProgrammingError: column "h.date" must appear in the GROUP BY clause or be used in an aggregate function
LINE 9: h.date+generate_series(0, CAST((coalesce...
^
ProgrammingError: column "c.date_deadline"
Server bloccato e nessuna idea di come procedere. Leggendo nei vari forum internazionali , dicevano di cambiare la versione di postgres con una superiore alla 9.2 in quanto il problema era nel motore del database. Peccato che io già fossi con la 9.5. Nel dubbio migro il cluster prima alla 9.6, poi alla 10 e alla 11, ma senza alcun risultato. Qualcuno si è gia' imbattuto in una situazione simile?
Grazie