odoo 数据关系的管理

(0, _ , {'field': value}) creates a new record and links it to this one.
(1, id, {'field': value}) updates the values on an already linked record.
(2, id, _) removes the link to and deletes the id related record.
(3, id, _) removes the link to, but does not delete, the id related record. This is usually what you will use to delete related records on many-to-many fields.
(4, id, _) links an already existing record.
(5, _, _) removes all the links, without deleting the linked records.
(6, _, [ids]) replaces the list of linked records with the provided list.

(0,_,{field:value})创建一个新记录并将其链接到此记录。

(1,id,{field:value})更新已链接记录上的值。

(2,id,_)删除指向并删除id相关记录的链接。

(3,id,_)删除指向id相关记录的链接,但不删除该记录。这通常是用于删除多对多字段上的相关记录的内容。

(4,id,_)链接已存在的记录。

(5,_,_)删除所有链接,而不删除链接的记录。

(6,_,[id])用提供的列表替换链接记录列表。

 

作者:上官飞鸿

出处:https://www.cnblogs.com/jackadam/p/16485883.html

版权:本作品采用「知识共享-署名-非商业性-禁止演绎(CC-BY-NC-ND)」许可协议进行许可。

posted @   上官飞鸿  阅读(67)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2020-07-17 H3C配置tftp参数,搭配WDS,windows部署服务器。
more_horiz
keyboard_arrow_up light_mode palette
选择主题
点击右上角即可分享
微信分享提示