Odoo Help


2 Answers

Haresh Kansara

--Haresh Kansara--
--Haresh Kansara--

Odoo Application Engineer

I have completed odoo training from Odoo India, and i have formerly worked there as an application engineer. And currently works as an application engineer. 

I have worked on different projects like Sales, Purchase, MRP, Account etc. I have also worked on website development.

I can help you to:

- Develop new module

- Customise existing module

- Provide Odoo Functional / Technical training

Connect me at: https://www.linkedin.com/in/haresh-kansara-50048914b

Haresh Kansara
14‏/3‏/2019 1:55 م

Using Active Record pattern

You can now write using Active Record pattern:

def any_write(self):
  self.x = 1
  self.name = 'a'

More info about the subtility of the Active Record write pattern here https://goo.gl/2HdgUr

The classical way of writing is still available

From Record

From Record:

self.write({'key': value })
# or
record.write({'key': value})

From RecordSet

From RecordSet:

self.write({'key': value })
# It will write on all record.
self.line_ids.write({'key': value })

It will write on all Records of the relation line_ids

For more detail: https://goo.gl/qGruPb

Accept and upvote answer if helpful

Thanks and Regards

Haresh Kansara

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now