IoT Rule

iot_rule
REPOSITORY
REPOSITORYOCA/iot
GIT
GIThttps://github.com/OCA/iot.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/iot/tree/17.0/iot_rule
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, FernandoRomera
WEBSITE
WEBSITEhttps://github.com/OCA/iot
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/iot:
    - iot_input_oca
    - iot_oca
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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).

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
iot_device_input_form_view iot.device.input.form (in iot_rule) iot.device.input field 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 div Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • get_iot_keys(self, serial_of_input, type_of_key)
  • write(self, vals)

New fields (1)
  • lock_id Many2one → iot.lock
    args: 'iot.lock'
Public methods (3)
  • call_lock(self, value)
  • generate_iot_lock(self)
  • get_iot_keys(self, domain=None)

New fields (9)
  • action_ids One2many → iot.key.action
    inverse_name='key_id' args: 'iot.key.action'
  • active Boolean
    default=True
  • expiration_date Datetime
  • key_type Char
  • name Char
  • res_id Integer
    index=True
  • res_model Char
    index=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
  • unique_virtual_key Char
    default='/' readonly=True required=True
Public methods (3)
  • create(self, mvals)
    @api.model_create_multi
  • get_iot_rule_values(self)
  • view_actions(self)

New fields (6)
  • key_id Many2one → iot.key
    args: 'iot.key'
  • key_name Char
    related='key_id.name' string="Key's Name"
  • lock_id Many2one → iot.lock
    required=True args: 'iot.lock'
  • result Char
    default='undefined' required=True
  • timestamp Datetime
    default=fields.Datetime.now required=True string='Time'
  • unique_virtual_key Char
Public methods (0)

No public methods.

New fields (2)
  • iot_key_count Integer
    compute='_compute_iot_key_count'
  • iot_key_ids One2many → iot.key
    domain=<expr> inverse_name='res_id' args: 'iot.key'
Public methods (1)
  • action_view_iot_key(self)

New fields (5)
  • iot_key_id Many2one → iot.key
    args: 'iot.key'
  • res_id Integer
    required=True
  • res_model Char
    required=True
  • rule_ids Many2many → iot.rule
    args: 'iot.rule'
  • unique_virtual_key Char
    required=True
Public methods (2)
  • create_key(self)
  • update_key(self, update=True)

New fields (5)
  • action_ids One2many → iot.key.action
    inverse_name='lock_id' args: 'iot.key.action'
  • active Boolean
    default=True required=True
  • description Text
  • name Char
    required=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
Public methods (5)
  • 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)

New fields (4)
  • active Boolean
    default=True required=True
  • lock_ids Many2many → iot.lock
    string='Locks' args: 'iot.lock'
  • name Char
  • parent_ids Many2many → iot.rule
    column1='rule_id' column2='implied_rule_id' relation='iot_rule_implied_rel' args: 'iot.rule'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/iot
GIT
GIThttps://github.com/OCA/iot.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/iot/tree/16.0/iot_rule
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Kevin Luna
WEBSITE
WEBSITEhttps://github.com/OCA/iot
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:54:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/iot:
    - iot_input_oca
    - iot_oca
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
iot_device_input_form_view iot.device.input.form (in iot_rule) iot.device.input field 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 div Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • get_iot_keys(self, serial_of_input, type_of_key)
  • write(self, vals)

New fields (1)
  • lock_id Many2one → iot.lock
    args: 'iot.lock'
Public methods (3)
  • call_lock(self, value)
  • generate_iot_lock(self)
  • get_iot_keys(self, domain=None)

New fields (9)
  • action_ids One2many → iot.key.action
    inverse_name='key_id' args: 'iot.key.action'
  • active Boolean
    default=True
  • expiration_date Datetime
  • key_type Char
  • name Char
  • res_id Integer
    index=True
  • res_model Char
    index=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
  • unique_virtual_key Char
    default='/' readonly=True required=True
Public methods (3)
  • create(self, mvals)
    @api.model_create_multi
  • get_iot_rule_values(self)
  • view_actions(self)

New fields (6)
  • key_id Many2one → iot.key
    args: 'iot.key'
  • key_name Char
    related='key_id.name' string="Key's Name"
  • lock_id Many2one → iot.lock
    required=True args: 'iot.lock'
  • result Char
    default='undefined' required=True
  • timestamp Datetime
    default=fields.Datetime.now required=True string='Time'
  • unique_virtual_key Char
Public methods (0)

No public methods.

New fields (2)
  • iot_key_count Integer
    compute='_compute_iot_key_count'
  • iot_key_ids One2many → iot.key
    domain=<expr> inverse_name='res_id' args: 'iot.key'
Public methods (1)
  • action_view_iot_key(self)

New fields (5)
  • iot_key_id Many2one → iot.key
    args: 'iot.key'
  • res_id Integer
    required=True
  • res_model Char
    required=True
  • rule_ids Many2many → iot.rule
    args: 'iot.rule'
  • unique_virtual_key Char
    required=True
Public methods (2)
  • create_key(self)
  • update_key(self, update=True)

New fields (5)
  • action_ids One2many → iot.key.action
    inverse_name='lock_id' args: 'iot.key.action'
  • active Boolean
    default=True required=True
  • description Text
  • name Char
    required=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
Public methods (5)
  • 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)

New fields (4)
  • active Boolean
    default=True required=True
  • lock_ids Many2many → iot.lock
    string='Locks' args: 'iot.lock'
  • name Char
  • parent_ids Many2many → iot.rule
    column1='rule_id' column2='implied_rule_id' relation='iot_rule_implied_rel' args: 'iot.rule'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/iot
GIT
GIThttps://github.com/OCA/iot.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/iot/tree/15.0/iot_rule
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
COMMITTERS
COMMITTERSAaronHForgeFlow, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/iot
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:44
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/iot:
    - iot_input_oca
    - iot_oca
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
iot_device_input_form_view iot.device.input.form (in iot_rule) iot.device.input field 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 div Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • get_iot_keys(self, serial_of_input, type_of_key)
  • write(self, vals)

New fields (1)
  • lock_id Many2one → iot.lock
    args: 'iot.lock'
Public methods (3)
  • call_lock(self, value)
  • generate_iot_lock(self)
  • get_iot_keys(self, domain=None)

New fields (9)
  • action_ids One2many → iot.key.action
    inverse_name='key_id' args: 'iot.key.action'
  • active Boolean
    default=True
  • expiration_date Datetime
  • key_type Char
  • name Char
  • res_id Integer
    index=True
  • res_model Char
    index=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
  • unique_virtual_key Char
    default='/' readonly=True required=True
Public methods (3)
  • create(self, mvals)
    @api.model_create_multi
  • get_iot_rule_values(self)
  • view_actions(self)

New fields (6)
  • key_id Many2one → iot.key
    args: 'iot.key'
  • key_name Char
    related='key_id.name' string="Key's Name"
  • lock_id Many2one → iot.lock
    required=True args: 'iot.lock'
  • result Char
    default='undefined' required=True
  • timestamp Datetime
    default=fields.Datetime.now required=True string='Time'
  • unique_virtual_key Char
Public methods (0)

No public methods.

New fields (2)
  • iot_key_count Integer
    compute='_compute_iot_key_count'
  • iot_key_ids One2many → iot.key
    domain=<expr> inverse_name='res_id' args: 'iot.key'
Public methods (1)
  • action_view_iot_key(self)

New fields (5)
  • iot_key_id Many2one → iot.key
    args: 'iot.key'
  • res_id Integer
    required=True
  • res_model Char
    required=True
  • rule_ids Many2many → iot.rule
    args: 'iot.rule'
  • unique_virtual_key Char
    required=True
Public methods (2)
  • create_key(self)
  • update_key(self, update=True)

New fields (5)
  • action_ids One2many → iot.key.action
    inverse_name='lock_id' args: 'iot.key.action'
  • active Boolean
    default=True required=True
  • description Text
  • name Char
    required=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
Public methods (5)
  • 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)

New fields (4)
  • active Boolean
    default=True required=True
  • lock_ids Many2many → iot.lock
    string='Locks' args: 'iot.lock'
  • name Char
  • parent_ids Many2many → iot.rule
    column1='rule_id' column2='implied_rule_id' relation='iot_rule_implied_rel' args: 'iot.rule'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/iot
GIT
GIThttps://github.com/OCA/iot.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/iot/tree/14.0/iot_rule
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ForgeFlow, CreuBlanca
COMMITTERS
COMMITTERSEnric Tobella, Weblate, OCA-git-bot, oca-ci, Núria Sancho
WEBSITE
WEBSITEhttps://github.com/OCA/iot
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/iot:
    - iot_input_oca
    - iot_oca
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
iot_device_input_form_view iot.device.input.form (in iot_rule) iot.device.input field 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 div Inherits base.view_partner_form
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • get_iot_keys(self, serial_of_input, type_of_key)
  • write(self, vals)

New fields (1)
  • lock_id Many2one → iot.lock
    args: 'iot.lock'
Public methods (3)
  • call_lock(self, value)
  • generate_iot_lock(self)
  • get_iot_keys(self, domain=None)

New fields (9)
  • action_ids One2many → iot.key.action
    inverse_name='key_id' args: 'iot.key.action'
  • active Boolean
    default=True
  • expiration_date Datetime
  • key_type Char
  • name Char
  • res_id Integer
    index=True
  • res_model Char
    index=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
  • unique_virtual_key Char
    default='/' readonly=True required=True
Public methods (3)
  • create(self, mvals)
    @api.model_create_multi
  • get_iot_rule_values(self)
  • view_actions(self)

New fields (6)
  • key_id Many2one → iot.key
    args: 'iot.key'
  • key_name Char
    related='key_id.name' string="Key's Name"
  • lock_id Many2one → iot.lock
    required=True args: 'iot.lock'
  • result Char
    default='undefined' required=True
  • timestamp Datetime
    default=fields.Datetime.now required=True string='Time'
  • unique_virtual_key Char
Public methods (0)

No public methods.

New fields (2)
  • iot_key_count Integer
    compute='_compute_iot_key_count'
  • iot_key_ids One2many → iot.key
    domain=<expr> inverse_name='res_id' args: 'iot.key'
Public methods (1)
  • action_view_iot_key(self)

New fields (5)
  • iot_key_id Many2one → iot.key
    args: 'iot.key'
  • res_id Integer
    required=True
  • res_model Char
    required=True
  • rule_ids Many2many → iot.rule
    args: 'iot.rule'
  • unique_virtual_key Char
    required=True
Public methods (2)
  • create_key(self)
  • update_key(self, update=True)

New fields (5)
  • action_ids One2many → iot.key.action
    inverse_name='lock_id' args: 'iot.key.action'
  • active Boolean
    default=True required=True
  • description Text
  • name Char
    required=True
  • rule_ids Many2many → iot.rule
    string='Rules' args: 'iot.rule'
Public methods (5)
  • 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)

New fields (4)
  • active Boolean
    default=True required=True
  • lock_ids Many2many → iot.lock
    string='Locks' args: 'iot.lock'
  • name Char
  • parent_ids Many2many → iot.rule
    column1='rule_id' column2='implied_rule_id' relation='iot_rule_implied_rel' args: 'iot.rule'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.