Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
12690 Lượt xem

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)



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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!!

Ảnh đại diện
Huỷ bỏ

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
2130
2
thg 7 24
1199
2
thg 5 23
2409
1
thg 4 23
2396
1
thg 1 23
4372