2019独角兽企业重金招聘Python工程师标准>>>

One2many and Many2many use a special “commands” format to manipulate the set of records stored in/associated with the field.

One2many和Many2many使用特殊的“命令”格式来操纵存储在字段中/与字段相关联的记录集。

This format is a list of triplets executed sequentially, where each triplet is a command to execute on the set of records. Not all commands apply in all situations. Possible commands are:

此格式是按顺序执行的三元组列表,其中每个三元组是在记录集上执行的命令。 并非所有命令都适用于所有情况。 可能的命令是:

(0, _, values)

adds a new record created from the provided value dict.

添加从提供的值dict创建的新记录。

(1, id, values)

updates an existing record of id id with the values in values. Can not be used in create().

使用值中的值更新 id id的现有记录。 不能在create()中使用。

(2, id, _)

removes the record of id id from the set, then deletes it (from the database). Can not be used in create().

从集合中删除 id id的记录,然后删除它(从数据库中)。 不能在create()中使用。

(3, id, _)

removes the record of id id from the set, but does not delete it. Can not be used on One2many. Can not be used in create().

从集合中删除 id id的记录,但不删除它。 不能在One2many上使用。 不能在create()中使用。

(4, id, _)

adds an existing record of id id to the set. Can not be used on One2many.

将id id的现有记录添加到集合中。 不能在One2many上使用。

(5, _, _)

removes all records from the set, equivalent to using the command 3on every record explicitly. Can not be used on One2many. Can not be used in create().

从集合中删除所有记录,相当于在每条记录中明确使用命令3。 不能在One2many上使用。 不能在create()中使用。

(6, _, ids)

replaces all existing records in the set by the ids list, equivalent to using the command 5 followed by a command 4 for each id in ids.

替换ids列表中集合中的所有现有记录,相当于使用命令5,后跟命令4,用于id中的每个id。

Values marked as _ in the list above are ignored and can be anything, generally 0 or False.

上面列表中标记为_的值将被忽略,可以是任何值,通常为0或False。

转载于:https://my.oschina.net/u/138005/blog/3001427

odoo 对 many2many one2many的操作相关推荐

  1. odoo对many2many、one2many的操作

    odoo对many2many.one2many的操作 点我下载完整odoo的demo many2many (0,0,{values}) 根据values里面的信息新建一个记录. (1,ID,{valu ...

  2. odoo的many2many和one2many字段给默认值

    odoo的x2many字段由于赋值方式比较特殊,所以不能像普通字段一样直接给默认值,需要返回一个列表里面嵌套列表结构的数据. 1.先看many2many和one2many字段的赋值方式: many2m ...

  3. odoo 关于many2many 和one2many

    many2many (0,0,{values}) 根据values里面的信息新建一个记录. (1,ID,{values})更新id=ID的记录(写入values里面的数据) (2,ID) 删除id=I ...

  4. Odoo开源ERP:功能模块操作-销售功能篇

    客户基础资料 1. 所有的客户基础资料,智云ERP开账启用时,期初的客户数据如果大于200条,可以批量导入: 2. 点"销售/订单/客户"菜单可以查看.编辑修改.搜索所有的客户基础 ...

  5. odoo10 ORM操作

    非常有用的odoo ORM参考手册:  odoo V10中文参考手册(一:ORM API     (部分内容没有更新到这里) 坑! 如果数据表已存在记录, 当新增字段时, 填了required=Tru ...

  6. odoo domain详解

    odoo domain详解 参考的以下文档: luohuayong:Odoo domain写法及运用 baimo:odoo domain表达式 1.domain 表达式规则 最简单的格式:[('字段名 ...

  7. odoo中如何在tree视图上实现M2M字段的跳转

    * 在odoo 自带的多对一类型是可以原生支持跳转的,但是最近遇到一个场景,我们需要在OA里面实现用户的考勤信息获取,考勤需要关联用户的请假/补卡/外出申请,一天的考勤信息可能关联用户的多个申请单,比 ...

  8. Odoo 14 手册 库存管理 盘点 到按成本 先进先出 追溯 批次 序列号 自动化路线

    盘点所有最终结果操作所承诺的每家公司的各个方面.公司的最终结果是发生在公司库存中的产品移动和存储.此外,这是一个所有高级.复杂和简单的策略管理操作亭应该一起工作以达到预期效果的区域. Odoo 软件认 ...

  9. Odoo 14 手册 采购订单 采购招标 代发货 供应商管理 对账

    Purchase Management(采购管理) 采购是公司或个人资产的一个方面,它处理以特定价格从供应商处获得的产品.服务和商品.公司运营的操作大多是重复的,并且具有固定的批发价格,而供应商向客户 ...

  10. odoo 14 手册 财务管理 应收应付 总账 报表

    任何公司运营的财务管理都将更加棘手,因为管理涉及的参数众多,因为它围绕整个公司运营.公司会计和财务方面的有效管理工具将为财务经理中的会计师减轻负担.Odoo 为用户提供了卓越.高效.可靠的公司财务和账 ...

最新文章

  1. CVPR2017-最新目标检测相关
  2. url的三个js编码函数escape(),encodeURI(),encodeURIComponent()简介
  3. FreeEIM通讯软件平均需要5分钟才能
  4. linux中的开机启动
  5. java xml解析_Java解析XML(4种方法)
  6. 配置数据引擎(BDE、SQL Link)的简单方法 /制做快速按钮条的方法/建立临时表的方法
  7. spring小实验 用spring的方式管理JDBC
  8. 32位数据源中没有mysql_基于 SpringBoot 多数据源 动态数据源 主从分离 快速启动器...
  9. 原创:CSS3技术-雪碧图自适应缩放与精灵动画方案
  10. 智能优化算法应用:基于GWO优化的对称交叉熵图像多阈值分割 - 附代码
  11. 2020-06-28
  12. 零基础必看的Html5+Css3+移动端前端教程(一)
  13. CMD中可执行的结束进程命令
  14. 全球及中国代餐轻食市场发展现状与消费需求前景调研报告2022版
  15. 整一篇整一篇,python3实现自动重启路由器的上的花生壳(selenium)
  16. 在centos中运行出现错误:cannot find -lbz2
  17. addon游戏_我的世界多人addon地图
  18. Webpack文件指纹
  19. IgH详解十、EtherCAT DC(1)理论
  20. ESP32-C3 LVGL(未完成)

热门文章

  1. 游戏设计阻力探秘之扩展空间
  2. 发展下一代互联网的动力
  3. 电子工业出版社博文视点在上海第六届UPA中国用户可用性大会上
  4. 什么是Windows内核编程
  5. 3.2. tensorflow2实现Wileoxon秩和检验法(下) ——python实战
  6. 优化理论11---- Zoutendijk可行方向法、非线性约束情形、ε起作用约束可行方向法、Frank-Wolfe 方法
  7. Django项目实践2 - Django模板(网页多语种支持/国际化)
  8. ubuntu常见错误及解决
  9. r语言kendall协和系数_多变量Kendall协和系数检验.ppt
  10. python中输入汉字_python汉字输入