Loading

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])用提供的列表替换链接记录列表。

 
posted @ 2022-07-17 08:26  上官飞鸿  阅读(84)  评论(0)    收藏  举报