Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
It was said that in OpenERP the functions
def create(self, cr, user, vals, context=None)
def update(self, cr, user, vals, context=None)
exist within the orm.Model that are called if you save a new record or if you update one. I need to inherit those functions to prevent ERP from saving or updating any records if certain typed-in data have the wrong format. I found the create function and was able to inherit and my implementation for this what I wanted works fine with that. However, I wasn't able to find the function that is called when I want to update a record. It is definitely not "update" I'm using OpenERP 7. What function is called for updating a record? Please can anybody help
I tested overwriting the "write function", but it doesn't seem to use this function. Even if I try using a variable that obviously doesn't exist, there is no error. Only if I delete the write function from the orm Model it uses this function.
What do I do wrong? It works fine with the inherited "create" function. how can I force the system to use the new write function?
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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/18/16, 4:42 AM|
|Seen: 1113 times|
|Last updated: 2/18/16, 9:39 AM|