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

Why do i get this error message when i want to insert a person into a project?

ERROR odoo.sql_db: bad query: b'INSERT INTO "project_profile_rel" ("id", "no_counter", "state", "locked", "note", "profile_id", "p_id", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval(\'project_profile_rel_id_seq\'), 0, \'new\', false, \'\', 1057312, NULL, 1, 1, (now() at time zone \'UTC\'), (now() at time zone \'UTC\')) RETURNING id'
ERROR: null value in column "project_id" violates not-null constraint
DETAIL: Failing row contains (173192916, null, 1057312, null, f, null, new, null, 1, 2022-04-10 12:03:46.078911, 1, 2022-04-10 12:03:46.078911, , null, 0, null, null, null, null).


Thank you for your help!

Regards,

Steven

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

You got the error because the project( p_id) is null and it shouldn't be null because the profile_id and p_id shouldn't be null in the table project_profile_rel

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 23
8132
0
thg 9 20
3344
2
thg 3 15
5909
1
thg 12 23
27811
3
thg 6 24
1821