user_123
user_123

Reputation: 450

Difference between write and update in odoo11

What is the difference between write and update method in odoo11 because when i use write it work first time only then it not work.

Upvotes: 5

Views: 3033

Answers (1)

bigbear3001
bigbear3001

Reputation: 544

For simple fields

should give you a single update statement in the database, and

  • update({'attr1': 'val1', 'attr2': 'val2'})

iterates over the fields and sets each one separately giving you multiple update statements in the database.

Upvotes: 12

Related Questions