Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4764 Lượt xem

When try to delete a product in inventory, there is an error:


The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Stock Valuation Layer (stock.valuation.layer), Constraint: stock_valuation_layer_product_id_fkey


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

The product is referenced in some another tables, that's why you are not able to delete the product. So if you really need to delete this product, you have to delete it from the places where it is referenced, as per the error message that you get the product is used in the table stock.valuation.layer , so you have to remove it first and then delete the product.


Or easily instead of deleting you can set Archive the record, which brings almost same functionality of delete.


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 22
3577
1
thg 3 15
4335
1
thg 3 15
35441
1
thg 3 15
1403
3
thg 11 22
17451