İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
30414 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
0
May 25
825
1
Nis 25
948
Validation Error Çözüldü
4
Tem 25
4731
1
Şub 24
2653
0
Eki 24
3973