Components
component · OCA/connector
Health
100/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 6 months ago
-
Required by25/255 modules depend on it
-
Maturity25/25In 10 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Required by
5
Modules depending on it
External deps
1 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.14 MB
Module directory on disk
Code analysis
0 migration notes
2 models
0 views
0 HTTP endpoints
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 by @guewen.
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- cachetools
- System dependencies
- None
- Required by
- base_rest, component_event, connector, storage_backend, webservice
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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…
Loading…