This question has been flagged
2 Replies
11796 Views

I extended Project Task model, It working good. But now A strange error is raising.

ProgrammingError: relation "report_project_task_user" does not exist

 Anyone can solve this? (I found so many reporting with same issue having zero answer)



Avatar
Discard
Best Answer

Have you do this query or another?



CREATE view report_project_task_user as
view_task_project_user_pivot
FROM project_task t
WHERE t.active = 'true'
GROUP BY
t.id,
create_date,
write_date,
date_start,
date_end,
date_deadline,
date_last_stage_update,
t.user_id,
t.project_id,
t.priority,
name,
t.company_id,
t.partner_id,
stage_id

;


Or other query?

Avatar
Discard
Best Answer

Nilmar,

It might be late for the reply, please check if you find it useful.

"report_project_task_user" is basically a 'view' in postgres which is dropped and created automatically from data of project_task object whenever project module is installed or updated. 

so, once you have extended the task master and update the module, this view will be dropped and recreated automatically.

There must be some issue with postgres relation(project_task) while odoo tries to recreate this view. Please refer to following scenarios:

  • have you extended with _inherit and _name attributes(if "_name" is used in inherited object then it will create new object with same name, which may conflict the sql query used for creating required view)

  • all the fields still exist in project_task master(mainly the fields used for fetching data in sql query for creating view)?

  • If above things are fine, then use the query from "project/report/project_report.py" and try executing it directly in postgres, this will through you the error if any.

Hope it helps!!

Avatar
Discard

same problem here but solved it by creating the relation in the postgresql