Odoo Help

0

0
2 Answers
0
Avatar

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:

@api.one
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:

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

From RecordSet

From RecordSet:

@api.multi
...
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
Writer
Tag
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.

Register
Odoo Training Center

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

Test it now