Hi, I am working on a BOM (Bill of Materials) creator, but currently stuck at this error:
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
[object with reference: product_id - product.id]
Error Log:
2019-06-28 02:57:40,220 9396 INFO 20190620 odoo.sql_db: bad query: INSERT INTO "mrp_production" ("id", "building", "procurement_group_id", "propagate", "user_id", "contract_id", "picking_type_id", "product_uom_id", "company_id", "priority", "date_planned_finished", "state", "product_id", "location_dest_id", "product_qty", "bom_id", "date_planned_start", "atlas_id", "partner_id", "location_src_id", "name", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('mrp_production_id_seq'), NULL, 546, false, 1, 7, 6, NULL, 1, '1', '2019-06-28 02:57:40', 'confirmed', NULL, 15, '8.000000', NULL, '2019-06-28 02:57:40', 23, NULL, 28, 'MO/00528', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Does this means my product_id - product.id value is empty? If so, how do I set a value in its field?
Much appreciated for any assistance.
**I am on Odoo 10**
Hi Hoang Tran, thanks for the reply, though I'm not exactly sure how to do that.