Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
30382 Представления

Hi,

Till yesterday everything was good on Odoo. But now when any of the employee in our company (or myself) save the Timesheet, we get the following errors:

duplicate key value violates unique constraint "hr_timesheet_sheet_sheet_pkey"

DETAIL: Key (id)=(91) already exists.

The id keeps changing for all employees.
I would really appreciate any help with this.
Thanks.

Аватар
Отменить
Лучший ответ

This happend to me - it turns out you need to resync your primary key fields in Postgres. The key is the SQL statement:

SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1);

Аватар
Отменить

Please use a readable formatting. The default is good enough.

Related Posts Ответы Просмотры Активность
0
мая 25
801
1
апр. 25
940
Validation Error Решено
4
июл. 25
4694
1
февр. 24
2639
0
окт. 24
3971