auditlog crashes Odoo when hr module demo data is loading

Aperta
#3,602 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by reproducing the crash: install auditlog and the hr module on a fresh Odoo 17 database with demo data enabled. The failure is a foreign key violation on hr_employee.department_id while demo records load, so the issue doesn't say which auditlog code path triggers it. Done means initialization completes with demo data on, with auditlog and hr installed together.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

auditlog v17

Describe the bug

When installing auditlog on a fresh Odoo 17 database with demo data enabled, Odoo crashes during initialization with a foreign key violation on hr_employee.

psycopg2.errors.ForeignKeyViolation: insert or update on table "hr_employee" violates foreign key constraint "hr_employee_department_id_fkey"
DETAIL: Key (department_id)=(2) is not present in table "hr_department".

To Reproduce

Steps to reproduce the behavior:

  1. Fresh Odoo 17 instance
  2. Add auditlog
  3. Make sure hr module is in your addons path
  4. Odoo crashes on first startup

Expected behavior
Odoo installs successfully without errors when auditlog and hr are installed together with demo data.

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

Lingua principale
Python
Stelle
960
Fork
1.7k
Merge medio
7g 17h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OCA/server-tools

Tutte le issue di OCA/server-tools

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.