how can we unlink records from one2many without deleting ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- 项目
- MRP
此问题已终结
1
回复
8942
查看
Hi,
First your relation field should be not required. So you can update the relation field by False to unlink association.
Example, to unlink association between an pos.order and all one2many lines:
self.env['pos.order.line'].serach([('order_id','=', order_id)]).write({'order_id':False})Best regards.
| 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|
|
0
9月 20
|
3769 | ||
|
|
6
12月 19
|
19229 | ||
|
|
0
4月 16
|
3887 | ||
|
|
3
3月 16
|
14966 | ||
|
|
1
3月 15
|
13330 |