Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
odoo11中的write 和 update方法有什么区别,因为当我第一次使用 write 时它才起作用,然后它就不起作用了。
对于简单字段
write({'attr1': 'val1', 'attr2': 'val2'})
应该在数据库中给你一个更新语句,并且
update({'attr1': 'val1', 'attr2': 'val2'})
遍历字段并分别设置每个字段,为您提供数据库中的多个更新语句。