Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
30389 Ansichten

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.

Avatar
Verwerfen
Beste Antwort

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);

Avatar
Verwerfen

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Mai 25
809
1
Apr. 25
942
4
Juli 25
4708
1
Feb. 24
2647
0
Okt. 24
3972