Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
30402 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer

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

Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 25
815
1
apr. 25
942
4
jul. 25
4720
1
feb. 24
2648
0
okt. 24
3972