error:
The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Product Template (product.template), Constraint: product_template_categ_id_fkey
Is there a way to delete an empty product category completely?
Этот вопрос был отмечен
You can delete product categories that aren't used. However, if products have been archived rather than deleted then the count will be 0 (see below) but you still cannot delete the category, so it's better to create another category for archived products.
It's possible to select archived products in the Product List and group by product category:
To check whether there any active products for any category:
Hi,
The product category that you tried to delete is referenced in some another tables, that's why you are not able to delete the product category.
So if you really need to delete this product category, you have to delete it from the places where it is referenced, as per the error message that you get the product category is used in the table product.template , 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
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
|
3
нояб. 22
|
19744 | ||
|
I can't delete my product
Решено
|
|
2
окт. 22
|
5413 | |
|
|
1
авг. 20
|
6263 | ||
|
|
0
сент. 19
|
4534 | ||
|
|
1
мар. 15
|
38778 |
Thank you Chris! Thank you for your kindly answer. Your answer solves the problem that cannot delete the product categories. ( Need to delete the Archived products first, then delete the product categories). And thanks to Niyas, you point out the problem.