Skip to content

[17.0] account_edi_format: psycopg2.errors.ForeignKeyViolation: update or delete on table "account_edi_format" violates foreign key constraint "account_edi_document_edi_format_id_fkey" on table "account_edi_document" #5079

@th3penguinwhisperer

Description

@th3penguinwhisperer

I'm on de83b78 and verified this code is included.
It seems that this commit actually triggers the error since it tries to delete the entries from account_edi_format while those records are still being referenced in account_edi_document.

I might misinterpret things here.

Also checked OCA/openupgradelib@860a5b1 where the delete_records_safely_by_xml_id function is defined.
I don't see how having this would resolve the references in the account_edi_document table. Should/could these account_edi_document entries be deleted and will they be created in another table? It's unclear what the proper way forward is.

Originally posted by @th3penguinwhisperer in #5046

My issue got closed while I'm on the commit that should resolve this...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions