Odoo Help


This community 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.


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

on 5/20/16, 6:28 AM 122 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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