Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e29c2a8
[ADD] iot_template
etobella Mar 18, 2019
6bfdfe7
[IMP] iot_template: Add a demo example
etobella Dec 30, 2020
e6b6da2
[IMP] iot_template_oca: black, isort, prettier
olgamarcocb Jun 10, 2021
527d378
[MIG] iot_template_oca: Migration to 13.0
olgamarcocb Jun 10, 2021
8a62970
[IMP] iot_template_oca: User configuration, tag and groups
etobella Dec 9, 2021
5cab3fa
[IMP] iot_template_oca: Improve configuration wizard
etobella Dec 9, 2021
c75f414
[ADD] iot_option_oca
etobella Dec 10, 2021
eaf3143
[IMP] iot_template_oca: Add device image on template, fix manifest
etobella Dec 16, 2021
29c8136
[IMP] iot_template_oca: set a default icon, allow to pass IP
olgamarcocb Dec 17, 2021
b81f990
[IMP] iot_template_oca: black, isort, prettier
olgamarcocb Dec 20, 2021
8b5f245
[MIG] iot_template_oca: Migration to 14.0
olgamarcocb Dec 20, 2021
8c18b03
[IMP] iot_template_oca: add iot.device.configure access rules
olgamarcocb Dec 20, 2021
69d034c
[MIG] iot_template_oca: Migration to 15.0
olgamarcocb May 11, 2022
f85d339
[UPD] Update iot_template_oca.pot
May 12, 2022
666d18d
[UPD] README.rst
OCA-git-bot May 12, 2022
8dba0ca
[DEL] iot_template_oca: Remove migration script to v14.0
sergio-teruel Feb 21, 2023
c1869a3
Added translation using Weblate (Italian)
mymage Mar 23, 2023
a9ac2f9
Translated using Weblate (Italian)
mymage Mar 23, 2023
044f180
Translated using Weblate (Italian)
mymage Mar 23, 2023
6f84c9b
Translated using Weblate (Italian)
mymage Mar 23, 2023
b2a8dce
Translated using Weblate (Italian)
mymage Mar 30, 2023
65699f4
Translated using Weblate (Italian)
mymage Jun 8, 2023
aa370a2
[UPD] README.rst
OCA-git-bot Sep 3, 2023
93c606e
Added translation using Weblate (Spanish)
Ivorra78 Nov 15, 2023
5400463
Translated using Weblate (Spanish)
Ivorra78 Nov 15, 2023
1ae2319
[MIG] iot_template_oca: migration to v16
AaronHForgeFlow Jan 15, 2024
c8049a4
[UPD] Update iot_template_oca.pot
Jan 19, 2024
603ad25
Added translation using Weblate (Persian)
mostafabarmshory Apr 3, 2024
baaaee5
[UPD] Update iot_template_oca.pot
May 1, 2024
e68e4ac
Update translation files
weblate May 1, 2024
a1f4b43
Translated using Weblate (Italian)
mymage May 2, 2024
b62721a
[IMP] iot_template_oca: pre-commit auto fixes
FernandoRomera Aug 6, 2024
c40e99c
[MIG] iot_template_oca: Migration to 17.0
FernandoRomera Aug 6, 2024
c9e6a7c
[UPD] Update iot_template_oca.pot
Sep 13, 2024
bccc229
[BOT] post-merge updates
OCA-git-bot Sep 13, 2024
8be3021
[MIG] iot_template_oca: Migration to 18.0
JordiBForgeFlow Jul 21, 2025
6911802
[DON'T MERGE] test-requirements.txt
JordiBForgeFlow Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions iot_template_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
=============
IoT Templates
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9da856bdfdf1550c905f1ed5dc06b171812d3219d90070c36d0735b4e9013a78
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fiot-lightgray.png?logo=github
:target: https://github.com/OCA/iot/tree/18.0/iot_template_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/iot-18-0/iot-18-0-iot_template_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/iot&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Create a system of templates for IoT devices.

When we are using a template we can configure a device with a simple URL
configuration. The device will contact odoo and send the template name.
Odoo will create the device and respond with all the expected data.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Create a template with a module or in Iot > Templates
2. Access Iot > Config Device
3. Confirm that you want to configurate a new device
4. Copy the URL
5. Access the device and send it the configuration url
6. The device will contact odoo and automatically configure itself.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/iot/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/iot/issues/new?body=module:%20iot_template_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Creu Blanca

Contributors
------------

- Enric Tobella <etobella@creublanca.es>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/iot <https://github.com/OCA/iot/tree/18.0/iot_template_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions iot_template_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import controller
from . import models
from . import wizards
19 changes: 19 additions & 0 deletions iot_template_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2018 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "IoT Templates",
"version": "18.0.1.0.0",
"category": "IoT",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"summary": "IoT module for managing templates",
"depends": ["iot_input_oca", "iot_output_oca"],
"website": "https://github.com/OCA/iot",
"data": [
"security/ir.model.access.csv",
"wizards/iot_device_configure.xml",
"views/iot_template_views.xml",
],
"demo": ["demo/iot_template.xml"],
}
1 change: 1 addition & 0 deletions iot_template_oca/controller/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import iot_controller
25 changes: 25 additions & 0 deletions iot_template_oca/controller/iot_controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import json

from odoo import http


class CallIot(http.Controller):
@http.route(
["/iot/<serial>/configure"],
type="http",
auth="public",
methods=["POST"],
csrf=False,
)
def configure_iot(self, serial, template, **kwargs):
request = http.request
if not request.env:
return json.dumps(False)
return json.dumps(
request.env["iot.device.configure"]
.sudo()
.configure(serial, template, **kwargs)
)
17 changes: 17 additions & 0 deletions iot_template_oca/demo/iot_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="demo_template" model="iot.template">
<field name="name">demo_template</field>
</record>
<record id="demo_template_serial" model="iot.template.key">
<field name="template_id" ref="demo_template" />
<field name="key">serial</field>
</record>
<record id="demo_template_input" model="iot.template.input">
<field name="template_id" ref="demo_template" />
<field name="name">demo_input</field>
<field name="call_model_id" eval="False" />
<field name="call_function">test_input_device</field>
<field name="params">{}</field>
</record>
</odoo>
Loading
Loading