IoT Rule
iot_rule · OCA/iot
-
Security25/25No findings
-
Activity6/25Last human commit 28 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 4 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
IotKey— Migrating to 19.0: `_sql_constraints` is ignored and its constraints are silently not created: declare `models.Constraint` attributes instead. migration-sql-constraints · sourceiot_key_action_tree_view— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceiot_key_tree_view— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceiot_lock_tree_view— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceiot_rule_tree_view— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This addon allows to define IoT Rules.
A Rule specifies which Inputs that can be controlled by a certain Key. The Key is owned by an Agent (Employee, Partner or anonymous). The Input is a request from an IoT Device that executes a certain function in Odoo. This function will check if the Key (= the Agent) is allowed by any Rule to "control" the Device. If Odoo answers positively the Agent will be allowed the to execute some Function on the Device (for example open a door or switch on a relay).
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 15
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
iot_device_input_form_view |
iot.device.input.form (in iot_rule) | iot.device.input | form | Inherits iot_input_oca.iot_device_input_form |
iot_key_action_form_view |
iot.key.action.form (in iot_rule) | iot.key.action | form | New |
iot_key_action_search_view |
iot.key.action.search (in iot_rule) | iot.key.action | search | New |
iot_key_action_tree_view |
iot.key.action.tree (in iot_rule) | iot.key.action | tree | New |
iot_key_form_view |
iot.key.form (in iot_rule) | iot.key | form | New |
iot_key_search_view |
iot.key.search (in iot_rule) | iot.key | search | New |
iot_key_tree_view |
iot.key.tree (in iot_rule) | iot.key | tree | New |
iot_key_wizard_form_view |
iot.key.wizard.form (in iot_rule) | iot.key.wizard | form | New |
iot_lock_form_view |
iot.lock.form (in iot_rule) | iot.lock | form | New |
iot_lock_search_view |
iot.lock.search (in iot_rule) | iot.lock | search | New |
iot_lock_tree_view |
iot.lock.tree (in iot_rule) | iot.lock | tree | New |
iot_rule_form_view |
iot.rule.form (in iot_rule) | iot.rule | form | New |
iot_rule_search_view |
iot.rule.search (in iot_rule) | iot.rule | search | New |
iot_rule_tree_view |
iot.rule.tree (in iot_rule) | iot.rule | tree | New |
res_partner_form_view |
res.partner.form (in iot_rule) | res.partner | form | Inherits base.view_partner_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 9
No new fields.
Public methods (2)-
get_iot_keys(self, serial_of_input, type_of_key) -
write(self, vals)
-
lock_idMany2one → iot.lockargs: 'iot.lock'
-
call_lock(self, value) -
generate_iot_lock(self) -
get_iot_keys(self, domain=None)
-
action_idsOne2many → iot.key.actioninverse_name='key_id' args: 'iot.key.action' -
activeBooleandefault=True -
expiration_dateDatetime -
key_typeChar -
nameChar -
res_idIntegerindex=True -
res_modelCharindex=True -
rule_idsMany2many → iot.rulestring='Rules' args: 'iot.rule' -
unique_virtual_keyChardefault='/'readonly=Truerequired=True
-
create(self, mvals)@api.model_create_multi -
get_iot_rule_values(self) -
view_actions(self)
-
key_idMany2one → iot.keyargs: 'iot.key' -
key_nameCharrelated='key_id.name'string="Key's Name" -
lock_idMany2one → iot.lockrequired=True args: 'iot.lock' -
resultChardefault='undefined'required=True -
timestampDatetimedefault=fields.Datetime.nowrequired=Truestring='Time' -
unique_virtual_keyChar
No public methods.
-
iot_key_countIntegercompute='_compute_iot_key_count' -
iot_key_idsOne2many → iot.keydomain=<expr>inverse_name='res_id' args: 'iot.key'
-
action_view_iot_key(self)
-
iot_key_idMany2one → iot.keyargs: 'iot.key' -
res_idIntegerrequired=True -
res_modelCharrequired=True -
rule_idsMany2many → iot.ruleargs: 'iot.rule' -
unique_virtual_keyCharrequired=True
-
create_key(self) -
update_key(self, update=True)
-
action_idsOne2many → iot.key.actioninverse_name='lock_id' args: 'iot.key.action' -
activeBooleandefault=Truerequired=True -
descriptionText -
nameCharrequired=True -
rule_idsMany2many → iot.rulestring='Rules' args: 'iot.rule'
-
check_access(self, key) -
check_access_unique_virtual_key(self, unique_virtual_key) -
create_action(self, key, result) -
get_virtual_keys(self, domain=None) -
view_actions(self)
-
activeBooleandefault=Truerequired=True -
lock_idsMany2many → iot.lockstring='Locks' args: 'iot.lock' -
nameChar -
parent_idsMany2many → iot.rulecolumn1='rule_id'column2='implied_rule_id'relation='iot_rule_implied_rel' args: 'iot.rule'
No public methods.
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…