Integrity Error Odoo/Postgres/psql

On Uninstall and Install module

Probuse Admin

Integrity Error: duplicate key value violates unique constraint "calendar_event_res_partner_re_calendar_event_id_res_partner_key"DETAIL: Key (calendar_event_id, res_partner_id)=(19, 43) already exists.


Go to PSQL prompt and run below commands:

# \d calendar_event;

# delete from calendar_event_res_partner_rel where calendar_event_id=18 and res_partner_id=3;

Please make sure you are running delete psql command so you have to be sure before run that query else data deleted from tables can not be recovered.