Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
30369 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona

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

Post correlati Risposte Visualizzazioni Attività
0
mag 25
796
1
apr 25
934
4
lug 25
4669
1
feb 24
2635
0
ott 24
3967