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

     
  • 相关阅读:
    Java之五种遍历Map集合的方式
    CUDA功能和通用功能
    编写CUDA内核
    LLD-LLVM链接器
    Pass Infrastructure基础架构(下)
    Pass Infrastructure基础架构(上)
    算子规范化
    多级中间表示概述MLIR
    “ compiler-rt”运行时runtime库
    LLDB调试器
  • 原文地址:https://www.cnblogs.com/jackadam/p/16485883.html
Copyright © 2020-2023  润新知