Odoo Help


How to if records of an model are created or modified ?

on 5/20/16, 6:28 AM 456 views

can i use write() & create() to test if an model has new records or modified recods

Jose Vasquez
On 5/20/16, 9:03 AM

Hi MouBou,

Yes, you can use the functions of writing and creating, you leave an example to follow and you can see the data:

import logging
_logger = logging.getLogger(__name__)

class ew_example(models.Model):
    _name = 'ew.example

    def create(self, vals):
        return super(ew_example, self).create(vals)

    def write(self, vals):
return super(ew_example, self).write(vals)

I hope it helps you, regards.

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/20/16, 6:28 AM
Seen: 456 times
Last updated: 5/20/16, 9:03 AM