TIP: You can type at any time to perform a new search.
Components
component · OCA/connector
- Repository
- OCA/connector · module folder · Try on Runboat
- Module version
- 1.0.1
- Category
- Generic Modules
- Folder size
- 0.14 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/connector
- Last tracking update
- 2026-08-12 05:23:57
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- SilvioC2C, Maksym Yankin, Weblate, OCA-git-bot, oca-ci
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- cachetools
- System dependencies
- None
- Required by
- base_rest, component_event, connector, storage_backend, webservice
- Description
This module implements a component system and is a base block for the Connector Framework. It can be used without using the full Connector though. Documentation: <http://odoo-connector.com/> You may also want to check the [Introduction to Odoo Components](https://dev.to/guewen/introduction-to-odoo-components-bn0) by @guewen.
Code Analysis ⓘ
Views touched (0)
No views found for this module.
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (2)
New fields (0)
No new fields.
Public methods (1)-
work_on(self, model_name, **kwargs)@contextmanagerEntry-point for the components, context manager Start a work using the components on the model. Any keyword argument will be assigned to the work context. See documentation of :class:`odoo.addons.component.core.WorkContext`. It is a context manager, so you can attach objects and clean them at the end of the work session, such as:: @contextmanager def work_on(self, model_name, **kwargs): self.ensure_one() magento_location = MagentoLocation( self.location, self.username, self.password, ) # We create a Magento Client API here, so we can create the # client once (lazily on the first use) and propagate it # through all the sync session, instead of recreating a client # in each backend adapter usage. with MagentoAPI(magento_location) as magento_api: _super = super(MagentoBackend, self) # from the components we'll be able to do: # self.work.magento_api with _super.work_on( model_name, magento_api=magento_api, **kwargs ) as work: yield work
New fields (0)
No new fields.
Public methods (2)-
build_registry(self, components_registry, states=None, exclude_addons=None) -
load_components(self, module, components_registry=None)Build every component known by MetaComponent for an odoo module The final component (composed by all the Component classes in this module) will be pushed into the registry. :param module: the name of the addon for which we want to load the components :type module: str | unicode :param registry: the registry in which we want to put the Component :type registry: :py:class:`~.core.ComponentRegistry`
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…