Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
30378 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează

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

Related Posts Răspunsuri Vizualizări Activitate
0
mai 25
798
1
apr. 25
935
4
iul. 25
4688
1
feb. 24
2638
0
oct. 24
3970