I am getting this following error
The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.
Model: product.enquiry (product.enquiry), Constraint: product_enquiry_product_id_fkey
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
here is the example :
Not Related to This Question but l had same problem too
In my case it was caused by calling a Many2one field and passing a value id which is not available in the Many2one table on create function, ie
self.env['claims_payments.model'].create({
'product_id':6,
'claim_pay_qoute':repaires_qoutes,
})
Therefore look around if you not passing a value which is not in a database you are referring to.
Hi
Selva KD
,
Have you solved this issue?
The problem that I had was because I didn't update the module before using the fields.
Hi,
You are creating the model "product.offers" in your create function,
I hope the error is because , data for some mandatory field or fileds in model product.offers is not being passed in def create function
Check for the required=True fields in model product.offers and check whether you have passed the data in your create function.
Hope it helps
Thanks
The error already told the cause: There are some records which has fields linked to the record you are trying to delete. Just find them and unlink, or as Odoo suggest, you archive it instead of delete the record.
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
7月 23
|
1218 | ||
|
0
5月 25
|
11 | ||
|
2
1月 25
|
2415 | ||
|
1
12月 24
|
6116 | ||
|
1
11月 24
|
2556 |