odoo关联字段的增删改

Posted xushuotec

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了odoo关联字段的增删改相关的知识,希望对你有一定的参考价值。

(0, _, values)

Adds a new record created from the provided value dict.

(1, id, values)

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

(2, id, _)

Removes the record of id id from the set, then deletes it (from the database). Can not be used in 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().

(4, id, _)

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

(5, _, _)

Removes all records from the set, equivalent to using the command 3 on every record explicitly. Can not be used on One2many. Can not be used in 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.

以上是关于odoo关联字段的增删改的主要内容,如果未能解决你的问题,请参考以下文章

ORM操作mysql数据库多表的增删改查

hibernate关联对象的增删改查------增

SqlServer在关联的情况下的增删改查

orm的增删改查

02 django 框架ORM 操作数据库,字段的增删改查

odoo 关系字段(关联关系)