$ 29.00
Needs 1 more store app, added with it:
- Components · $ 79.00
One purchase covers every version. Already bought it? Sign in.
Components Events
This module implements an event system (Observer pattern) and is a base block for the Connector Framework. It can be used without using the full Connector though. It is built upon the component module.
Documentation:
Table of contents
Usage
As a developer, you have access to a events system. You can find the documentation in the code or on
In a nutshell, you can create trigger events:
class Base(models.AbstractModel):
_inherit = 'base'
@api.model
def create(self, vals):
record = super(Base, self).create(vals)
self._event('on_record_create').notify(record, fields=vals.keys())
return record
And subscribe listeners to the events:
from tulio.addons.component.core import Component
from tulio.addons.component_event import skip_if
class MagentoListener(Component):
_name = 'magento.event.listener'
_inherit = 'base.connector.listener'
@skip_if(lambda self, record, **kwargs: self.no_connector_export(record))
def on_record_create(self, record, fields=None):
""" Called when a record is created """
record.with_delay().export_record(fields=fields)
This module triggers 3 events:
- on_record_create(record, fields=None)
- on_record_write(record, fields=None)
- on_record_unlink(record)
| Technical name | component_event |
|---|---|
| Module version | 12.0.1.1.0 |
| Tulio versions | 1.0 |
| Category | Tools |
| Publisher | Contaura LLC
Ported to Tulio, tested and supported by Contaura LLC. |
| Original authors | Camptocamp, OCA |
| License | LGPL-3
Open source: you may use, change and share
this module under its license. The price covers the Tulio port, its testing on Tulio
1.0 and the download. |
| Python libraries | cachetools
Install them on the server with pip before installing the module. |
| Requires (store) | Components |
| Lines of code | 813 |
| Downloads | 0 |
| Released | 12/06/2026 |