Closed jackadam1981 closed 2 years ago
多对多关系的删除。
請參考 odoo 手把手教學 - 使用 python 增加取代 One2many M2X record - part8
以及 這篇底下的
(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.
谢谢
當你更新 One2many 和 Many2many 時, 要使用比較特別的語言,我之後會補充上來.
用到了,还没更新。