Something like django signals in Odoo

Am looking for some mechanism that allows me to hook a python function to the triggering of a database event (insert, update, delete) of ANY model in Odoo. I have worked with Django signals and am wondering if Odoo has something like that. Thanks in advance.


EDITED

What i want to do is to execute a python code when a database event occurs. In django it would be

from django.db.models.signals import post_save
from django.dispatch import receiver

@receiver(post_save)
def post_save_receiver(sender, instance, created, **kwargs):
    #do something with parameters info

The post_save will be triggered by an update or an insert in ANY model, being 'sender' the model class and 'instance' the database row and therefore an instance of 'sender'.

Am looking in Odoo some mechanism that allows me to do something like that, I have seen something called Workflow, but it does not let me "listen" for ALL models.

链接地址: http://www.djcxy.com/p/54172.html

上一篇: 如何使用spacy找到最常用的单词?

下一篇: 像Odoo中的django信号