cant delete product with uom conversion (no transactions)
Description
steps to reproduce 1. create new product 2. create uom conversion 3. try to delete product (do not create MR)
Error Message: Record not deleted - dependent record found: ERROR: update or delete on table "m_product" violates foreign key constraint "mproduct_cuomconversion" on table "c_uom_conversion" - Detail: Key (m_product_id)=(1000021) is still referenced from table "c_uom_conversion".
Suggestion: change constraint
Environment
None
Attachments
1
24 Sep 2014, 08:51 AM
Activity
Show:
Carlos Ruiz July 27, 2018 at 4:00 PM
Workaround here is the delete manually the conversions before doing delete or merge.
I tend to think is a safer way not doing it automatically.
Tomáš Švikruha September 24, 2014 at 8:49 AM
Hi @Norbert Bede, for each merged entity (Org, BPartner, User, Product) there are some tables for which are records not updated but deleted. I suggest to add table C_UOM_Conversion to delete for Product merge, so records will be simply deleted (because DB update could throw unique error).
steps to reproduce
1. create new product
2. create uom conversion
3. try to delete product (do not create MR)
Error Message:
Record not deleted - dependent record found: ERROR: update or delete on table "m_product" violates foreign key constraint "mproduct_cuomconversion" on table "c_uom_conversion" - Detail: Key (m_product_id)=(1000021) is still referenced from table "c_uom_conversion".
Suggestion: change constraint