From f0d2d7b2fb498e594b5494f2a2b8b35dbf1be598 Mon Sep 17 00:00:00 2001
From: Enric Tobella
Date: Mon, 18 Mar 2019 11:24:59 +0100
Subject: [PATCH 01/27] [ADD] iot_output
---
iot_output_oca/README.rst | 74 +++
iot_output_oca/__init__.py | 3 +
iot_output_oca/__manifest__.py | 22 +
iot_output_oca/i18n/iot_output.pot | 188 ++++++++
iot_output_oca/models/__init__.py | 4 +
iot_output_oca/models/iot_device.py | 37 ++
iot_output_oca/models/iot_device_output.py | 41 ++
.../models/iot_device_output_action.py | 48 ++
iot_output_oca/models/iot_system.py | 13 +
iot_output_oca/readme/CONTRIBUTORS.rst | 1 +
iot_output_oca/readme/DESCRIPTION.rst | 2 +
iot_output_oca/security/ir.model.access.csv | 4 +
iot_output_oca/static/description/icon.png | Bin 0 -> 4151 bytes
iot_output_oca/static/description/index.html | 420 ++++++++++++++++++
iot_output_oca/tests/__init__.py | 1 +
iot_output_oca/tests/test_iot.py | 60 +++
.../views/iot_device_output_views.xml | 62 +++
iot_output_oca/views/iot_device_views.xml | 28 ++
iot_output_oca/views/iot_menu.xml | 10 +
iot_output_oca/views/iot_system_views.xml | 62 +++
20 files changed, 1080 insertions(+)
create mode 100644 iot_output_oca/README.rst
create mode 100644 iot_output_oca/__init__.py
create mode 100644 iot_output_oca/__manifest__.py
create mode 100644 iot_output_oca/i18n/iot_output.pot
create mode 100644 iot_output_oca/models/__init__.py
create mode 100644 iot_output_oca/models/iot_device.py
create mode 100644 iot_output_oca/models/iot_device_output.py
create mode 100644 iot_output_oca/models/iot_device_output_action.py
create mode 100644 iot_output_oca/models/iot_system.py
create mode 100644 iot_output_oca/readme/CONTRIBUTORS.rst
create mode 100644 iot_output_oca/readme/DESCRIPTION.rst
create mode 100644 iot_output_oca/security/ir.model.access.csv
create mode 100644 iot_output_oca/static/description/icon.png
create mode 100644 iot_output_oca/static/description/index.html
create mode 100644 iot_output_oca/tests/__init__.py
create mode 100644 iot_output_oca/tests/test_iot.py
create mode 100644 iot_output_oca/views/iot_device_output_views.xml
create mode 100644 iot_output_oca/views/iot_device_views.xml
create mode 100644 iot_output_oca/views/iot_menu.xml
create mode 100644 iot_output_oca/views/iot_system_views.xml
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
new file mode 100644
index 00000000..fa5cc7b5
--- /dev/null
+++ b/iot_output_oca/README.rst
@@ -0,0 +1,74 @@
+==========
+IoT Output
+==========
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |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/11.0/iot_output
+ :alt: OCA/iot
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/iot-11-0/iot-11-0-iot_output
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/269/11.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
+This addon is a base module used to allow different outputs from the same
+device
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* Creu Blanca
+
+Contributors
+~~~~~~~~~~~~
+
+* Enric Tobella
+
+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 `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/__init__.py b/iot_output_oca/__init__.py
new file mode 100644
index 00000000..83e553ac
--- /dev/null
+++ b/iot_output_oca/__init__.py
@@ -0,0 +1,3 @@
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from . import models
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
new file mode 100644
index 00000000..4ff1b3cf
--- /dev/null
+++ b/iot_output_oca/__manifest__.py
@@ -0,0 +1,22 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+{
+ 'name': 'IoT Output',
+ 'version': '11.0.1.0.0',
+ 'category': 'IoT',
+ 'author': "Creu Blanca, "
+ "Odoo Community Association (OCA)",
+ 'license': 'AGPL-3',
+ 'installable': True,
+ 'application': True,
+ 'summary': 'IoT allow multiple outputs',
+ 'depends': [
+ 'iot',
+ ],
+ 'data': [
+ 'security/ir.model.access.csv',
+ 'views/iot_device_output_views.xml',
+ 'views/iot_device_views.xml',
+ ],
+}
diff --git a/iot_output_oca/i18n/iot_output.pot b/iot_output_oca/i18n/iot_output.pot
new file mode 100644
index 00000000..de8efe6b
--- /dev/null
+++ b/iot_output_oca/i18n/iot_output.pot
@@ -0,0 +1,188 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * iot_output
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_ids
+msgid "Action"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_count
+msgid "Action Count"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_system_applies_to
+msgid "Applies To"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_create_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_create_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_create_date
+msgid "Created on"
+msgstr ""
+
+#. module: iot_output
+#: selection:iot.system,applies_to:0
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_device_id
+msgid "Device"
+msgstr ""
+
+#. module: iot_output
+#: code:addons/iot_output/models/iot_device_output_action.py:32
+#, python-format
+msgid "Device and action must be of the same system"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_display_name
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: iot_output
+#: selection:iot.device.output.action,status:0
+msgid "Failed"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_id
+msgid "ID"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model,name:iot_output.model_iot_device_output_action
+msgid "IoT Action"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model,name:iot_output.model_iot_device
+#: model:ir.model,name:iot_output.model_iot_device_output
+msgid "IoT Device"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.actions.act_window,name:iot_output.iot_device_output_action
+msgid "IoT Outputs"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model,name:iot_output.model_iot_system
+msgid "IoT System"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_ip
+msgid "Ip"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output___last_update
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action___last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_write_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_write_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_model
+msgid "Model"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_name
+msgid "Name"
+msgstr ""
+
+#. module: iot_output
+#: selection:iot.device.output.action,status:0
+msgid "Ok"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_date_ok
+msgid "Ok date"
+msgstr ""
+
+#. module: iot_output
+#: selection:iot.system,applies_to:0
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_output_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_ids
+#: model:ir.model.fields,field_description:iot_output.field_iot_system_output_ids
+msgid "Output"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_count
+msgid "Output Count"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.ui.view,arch_db:iot_output.iot_device_form
+msgid "Outputs"
+msgstr ""
+
+#. module: iot_output
+#: selection:iot.device.output.action,status:0
+msgid "Pending"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_result
+msgid "Result"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.ui.view,arch_db:iot_output.iot_device_output_action_tree
+msgid "Run"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_state
+msgid "State"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_status
+msgid "Status"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_system_id
+msgid "System"
+msgstr ""
+
+#. module: iot_output
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_system_action_id
+msgid "System Action"
+msgstr ""
+
diff --git a/iot_output_oca/models/__init__.py b/iot_output_oca/models/__init__.py
new file mode 100644
index 00000000..942ea954
--- /dev/null
+++ b/iot_output_oca/models/__init__.py
@@ -0,0 +1,4 @@
+from . import iot_device
+from . import iot_device_output_action
+from . import iot_device_output
+from . import iot_system
diff --git a/iot_output_oca/models/iot_device.py b/iot_output_oca/models/iot_device.py
new file mode 100644
index 00000000..65611363
--- /dev/null
+++ b/iot_output_oca/models/iot_device.py
@@ -0,0 +1,37 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo import api, fields, models
+
+
+class IoTDevice(models.Model):
+ _inherit = 'iot.device'
+
+ output_ids = fields.One2many(
+ 'iot.device.output',
+ inverse_name='device_id'
+ )
+ output_count = fields.Integer(compute='_compute_output_count')
+ system_id = fields.Many2one(required=False)
+
+ @api.multi
+ @api.depends('output_ids')
+ def _compute_output_count(self):
+ for record in self:
+ record.output_count = len(record.output_ids)
+
+ @api.multi
+ def action_show_output(self):
+ self.ensure_one()
+ action = self.env.ref(
+ 'iot_output.iot_device_output_action')
+ result = action.read()[0]
+
+ result['context'] = {
+ 'default_device_id': self.id,
+ }
+ result['domain'] = "[('device_id', '=', " + \
+ str(self.id) + ")]"
+ if len(self.output_ids) == 1:
+ result['views'] = [(False, 'form')]
+ result['res_id'] = self.output_ids.id
+ return result
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
new file mode 100644
index 00000000..ef676f39
--- /dev/null
+++ b/iot_output_oca/models/iot_device_output.py
@@ -0,0 +1,41 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo import api, fields, models
+
+
+class IoTDevice(models.Model):
+ _name = 'iot.device.output'
+ _description = 'IoT Device'
+
+ name = fields.Char(required=True)
+ device_id = fields.Many2one('iot.device', required=True, readonly=True)
+ system_id = fields.Many2one('iot.system', required=True)
+ action_ids = fields.One2many(
+ 'iot.device.output.action',
+ inverse_name='output_id'
+ )
+ state = fields.Selection([], readonly=True)
+ model = fields.Char()
+ ip = fields.Char()
+ action_count = fields.Integer(compute='_compute_action_count')
+
+ @api.multi
+ @api.depends('action_ids')
+ def _compute_action_count(self):
+ for record in self:
+ record.action_count = len(record.action_ids)
+
+ def _system_action_vals(self, system_action):
+ return {
+ 'output_id': self.id,
+ 'system_action_id': system_action.id,
+ }
+
+ @api.multi
+ def device_run_action(self):
+ system_action = self.env['iot.system.action'].browse(
+ self.env.context.get('iot_system_action_id'))
+ for rec in self:
+ action = self.env['iot.device.output.action'].create(
+ rec._system_action_vals(system_action))
+ action.run()
diff --git a/iot_output_oca/models/iot_device_output_action.py b/iot_output_oca/models/iot_device_output_action.py
new file mode 100644
index 00000000..93a7bac2
--- /dev/null
+++ b/iot_output_oca/models/iot_device_output_action.py
@@ -0,0 +1,48 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo import api, fields, models, _
+from odoo.exceptions import ValidationError
+
+
+class IoTDeviceOutputAction(models.Model):
+ _name = 'iot.device.output.action'
+ _description = 'IoT Action'
+ _order = 'date_ok desc'
+
+ output_id = fields.Many2one(
+ 'iot.device.output',
+ required=True,
+ readonly=True
+ )
+ system_action_id = fields.Many2one('iot.system.action', required=True)
+ status = fields.Selection([
+ ('ok', 'Ok'),
+ ('pending', 'Pending'),
+ ('failed', 'Failed')
+ ], required=True, default='pending')
+ result = fields.Text()
+ date_ok = fields.Datetime(readonly=True, string="Ok date")
+
+ @api.multi
+ @api.constrains('output_id', 'system_action_id')
+ def _check_system(self):
+ if self.filtered(
+ lambda r: r.output_id.system_id != r.system_action_id.system_id
+ ):
+ raise ValidationError(_(
+ 'Device and action must be of the same system'))
+
+ def run_extra_actions(self, status, result):
+ return
+
+ @api.multi
+ def run(self):
+ self.ensure_one()
+ if self.status != 'ok':
+ status, result = self.system_action_id.run(self)
+ self.write({
+ 'status': status,
+ 'result': result,
+ 'date_ok': fields.Datetime.now() if status == 'ok' else False,
+ })
+ self.run_extra_actions(status, result)
diff --git a/iot_output_oca/models/iot_system.py b/iot_output_oca/models/iot_system.py
new file mode 100644
index 00000000..276e08f4
--- /dev/null
+++ b/iot_output_oca/models/iot_system.py
@@ -0,0 +1,13 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo import fields, models
+
+
+class IoTSystem(models.Model):
+ _inherit = 'iot.system'
+
+ output_ids = fields.One2many('iot.device.output', inverse_name='system_id')
+ applies_to = fields.Selection([
+ ('device', 'Device'),
+ ('output', 'Output'),
+ ], default='device', required=True)
diff --git a/iot_output_oca/readme/CONTRIBUTORS.rst b/iot_output_oca/readme/CONTRIBUTORS.rst
new file mode 100644
index 00000000..93ec993e
--- /dev/null
+++ b/iot_output_oca/readme/CONTRIBUTORS.rst
@@ -0,0 +1 @@
+* Enric Tobella
diff --git a/iot_output_oca/readme/DESCRIPTION.rst b/iot_output_oca/readme/DESCRIPTION.rst
new file mode 100644
index 00000000..0147494b
--- /dev/null
+++ b/iot_output_oca/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+This addon is a base module used to allow different outputs from the same
+device
diff --git a/iot_output_oca/security/ir.model.access.csv b/iot_output_oca/security/ir.model.access.csv
new file mode 100644
index 00000000..b64debce
--- /dev/null
+++ b/iot_output_oca/security/ir.model.access.csv
@@ -0,0 +1,4 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_iot_device_output_action,access_iot_device_output_action,model_iot_device_output_action,iot.group_iot_user,1,1,1,0
+access_iot_device_output,access_iot_device_output,model_iot_device_output,iot.group_iot_user,1,0,0,0
+manage_iot_device_output,access_iot_device_output,model_iot_device_output,iot.group_iot_manager,1,1,1,0
diff --git a/iot_output_oca/static/description/icon.png b/iot_output_oca/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..da43f6f07766d54a65259a14a0688ace6b65ccf0
GIT binary patch
literal 4151
zcmZWsXH-*76TUzYLYH2pNmZH%p@RqnrArY(2u0}~r3(S+Em4Zn1Of^Q0hAJ?1O!Zi
zRO#|kLJ^P}ic05;zrVA0XYbCrb7%JK%(MHXn43Zw>3Hb?0ARdhsCSP%!vA&JOJv!t
z<=jUeF1Z*%^?-|it)#soi>v_$7(NIlTTK4z6uOcHVPqxElRGB*G>bH>G{V;(IcZb^
z0CUeBy<1jc(_0Rnw(R#Oq6?luA5KAT$qQLAE5RL@rgC?XeoW$vPvVUB|b9kZT&QO9;WeR
z60P{&jv~|Mw*1Tl
zV-eyjx06?FTmHQ#Mv_smC~6z=6(aaBUP0-3_n4_rQumh;g?bj{F+tad2A#b@^644r
z7bJmHR7q_uv)^q-+41GF@{g=E{zV4&F|Xw-1}KyHG^s|P;hZOuX%jM+FpVh3sdVO{
z&098KYvVP2+2F?8bTS=86rX_mrQNU3xo}u_$oEx`?o4)N^dmu(!5YROM-Gaf2m2XF2
za-aFkf~%g;mB^95oj2VXd{~S5waJ;4Aml)a)Yk&I`FIpqU*>Uhzc5EKQD`8d0Lk{4
zS0S!ydb-&fl~=31>;O3tLErB}78@lgAe=x0TE5=v%X)CIX7W3vKCtt{$NkQqkdo$)aq{SD8uQ#!$HJDV
zOS4uGQ5+8s_af{hg#-L#!EBtX8cFsX}x%**redz6}R%hK7`C6+!k2)sYU23PB)f!o~T
z`$QkC(BI1_7kMo26;M|txROzrzWI$(V^b){V2D;{cKI*LXeOb*YW2Ic$89ST=q!#YnL|6u<(?RDI=~L?4*xt
zJ#LNc#cKBdxwJt6$G|@c2nRE88#;lppCPiwjGQVO6oS^Lm$Eg9BDGEIlhX9&C&|!a
z;Gj&SyhSHkE|Gyde#t&dK_Q^}?vkW^l$Wbl3MTHI>o(yIZOCs+zalG#^mJ68%JF{)
zV%oIQb$H;QTAt=dwFoI}@_h9O_fHL3mwOPDRVF``ySIHc81XfASao>P(oC9PtP~lv
zuO5|G^g*Gvq@EIhznV!DmJy~F)kv(mnYr7t8kzMwi_>*9Tg*!oD<^#Qp+>yGE9NR~
zhOywrX;c-ZN5oiMc7Iu&yb`pMb-^Xc7SzZ1slfJ7Jz{AYC1A^~VqNwu<3J_iHIXOY
zaL0*#Y}UXvQgIhZ6%i2v;kAttXLXL~pxesho&J+idBu2;-okKO25-Udq5Vrnrq43j
zsI@OMm(Y@{?M3!EqXxeNtXZH4W}jJ7%h~G)i$9}2S&8a5geYoeUYR2m!2b*~E!%Lh
zQAnyq-l%;84Y#I#hbUs8dhT9OKCT&&+;a_TF&1DZew3oP$b@Mh2NDn*Bk?-EVpKEKb?MS=e^e|edw;1SV-
zkJ-+Z=aLPfCk>$#Jrve9_xGO)f3)RR%W6d2B&UHnE8XM{*T@FNpJ*gJCzz}1Yw~h>
zck+CD%6Y51Gf4CPwSY^1ifUG_Hg?T!X^+^geb_APj9h(~5Xz9_2)c6eq;{G>^UrW;
zsv`1%KDI$WUdh$f)+`!vZ4%Ebwk~{-U3B!}{9t-jT0Kaa?4*--4{fg!=8n@vr}){#
z55{J^f9pog0+F#pD|X14kzeuy_r%71lheX(Uvs+{btIxoe&w_MJ9I+Y>K&I7H^bc9
zb?NV#Aem#i{Y?u?pGNWrLrq5tfeBnqwtBxMb(8Y*kIErpWy|XSsR{MSnQwqtHrHv$
zYaO6<`f>d@RdzgDmYP5l5yaTYv7|}4d|or-&yc62m74qGqJe7->v+5Gb9yd~Mi!eY
zZW88AO-ik=o$28GwnZV1V0vDIsx34W4E0Ah;_-tHX9#%bg6PwirREn<3~~Aaf&vleV=1V`F~UY}
z5>Uv~Ic3sjZCBYyNvM(;H)anYK9Tk{7!I$&c3L5BKPB2dj&%beU*{Y5EhgjrbzQt}
zltDh`PQnWpqtK$-m=@d82KfZgurRC3*|`8Ox>l-6IQmI{24uO)(_dneRrsJ?JDNmE*!&YM^7n;+lx8n#uRPKiU9-*&09KKZ8
zT=4c__w2(hJvo#_M`m@oB`JvKIO&3qhgW1q8${l#X8Yiayrt+`NvM4i@Z!tm>bj+}
zEEv(eS2YK>cK?dbTqa5^2cxi#mXeF|kvBP?J7vhh3!9)Gm5^hbaYMW~IwE^KbnEt;
zo&>S$JNGV_SqGh*nF1+Q$}T49i&e|yBW$Af+qMEXaVsgN`iFu26QrdLe4HmmlD$$+
zHR)z*Hq|9(*`c%3tmZJE=*SFQ8->2b;U+AS^p_9+$VOR;zQ}~mL7<)e>-z`NFJO*O
znaem$!WaHF3I3oT3NJOhdtrxeO=Q;>mOAqe!|8j(M-?3a>t3Ag5?exAr+9ZdL3dYG
zAaHbLVIV~@JNo7_`>Lqs#`VlXb!x2D;Y_}P2wXcMR2q}E3K0$IlYV%onC8053jXt$-+-LZGm_uB2XpvH3vnFM4n`r)Oq@QB2{<>$4$-oEG&ZTt2R*~aT4>6;raIk`{2`?g2je`F-#Ly$
z@^efpEX(XaEqLp5`jGZkuwu6ePsdQ?2ve6_h=_3UpguACKF-z6_UiTiex6qRI>XMB
zgeW@@$&LWp43D`+rVC_kg>2Cm7zTZ-qB#p`h5=Sg^1)Qk+)yUFt_r!^hXws0#JMRJ
zM@=#~^v>ToelN2iK;Jvr47^@%#K?xLhX~9w+r;TFds_k9OtKA_TyHKqmSz>YzZ+HH
zBjco4GKdmgRt>8Z$d|DIULP}p`*UDs)8WnL#%O|RAlD^ZyUTk&gn;={#|A!EKd*N|
zf6QV;U}cnRtZ82s0z4p<^;Kyv_Ps=pcsa*CDCL3L>F6CO8Ws@2*{HKOj*zX43;12Ai
zzkDCSM?PU7hPsBXj^IxoN-J)=wUv=mhW{eW7u>b@)}FQkjhasX?3j)3r!+U}og{Nd
zVnMxUL%(5)UfftQwj0BRti+hwKvTwwf>n#9)bbh}eQ0ziHzG!{x%e*kF$o_ixG*>~3u9l8#5|U3pJfJbO
z%N)wZ&CC7aasM^y4q{n3$Z9N*955Hq(awRX+KI*c<9bR0$uvz`X6jG5fZoF{uLinl
z+M{V9prk@+rtxAKb$m;+{GOC!5Z}Ak$0-rhg`IpL3Lqcq79CCh$
zT8AJ(DYVQ+!LpYE&>r2q-V6%_@Du6CdFEakfGYDN1#!gESokOSMDU28=|F=9?&>)s
v*XR!b{Fb+Wh!6vS_f{D9Xl*e;;G7=(E>>ZMBDIA~@qs(~rg}BHPI3POT<6QK
literal 0
HcmV?d00001
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
new file mode 100644
index 00000000..2b62ff67
--- /dev/null
+++ b/iot_output_oca/static/description/index.html
@@ -0,0 +1,420 @@
+
+
+
+
+
+
+IoT Output
+
+
+
+
+
IoT Output
+
+
+
+
This addon is a base module used to allow different outputs from the same
+device
+
Table of contents
+
+
+
+
Bugs are tracked on GitHub Issues .
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback .
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
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 project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
+
+
+
+
+
diff --git a/iot_output_oca/tests/__init__.py b/iot_output_oca/tests/__init__.py
new file mode 100644
index 00000000..c1763e19
--- /dev/null
+++ b/iot_output_oca/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_iot
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
new file mode 100644
index 00000000..a509d199
--- /dev/null
+++ b/iot_output_oca/tests/test_iot.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2018 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from mock import patch
+from odoo.tests.common import TransactionCase
+from odoo.exceptions import ValidationError
+
+
+class TestIoT(TransactionCase):
+ def setUp(self):
+ super().setUp()
+ self.system = self.env['iot.system'].create({
+ 'name': 'Testing',
+ })
+ self.system_2 = self.env['iot.system'].create({
+ 'name': 'Testing 02',
+ })
+ self.action = self.env['iot.system.action'].create({
+ 'name': 'test',
+ 'system_id': self.system.id,
+ })
+ self.action_2 = self.env['iot.system.action'].create({
+ 'name': 'test 02',
+ 'system_id': self.system_2.id,
+ })
+ self.device = self.env['iot.device'].create({
+ 'name': 'Device',
+ })
+ self.assertEqual(self.device.output_count, 0)
+ self.output = self.env['iot.device.output'].create({
+ 'system_id': self.system.id,
+ 'device_id': self.device.id,
+ 'name': 'Output',
+ })
+
+ def test_views(self):
+ self.assertEqual(self.device.output_count, 1)
+ res = self.device.action_show_output()
+ self.assertEqual(
+ self.output, self.env[res['res_model']].browse(res['res_id']))
+
+ def test_action(self):
+ self.assertEqual(self.output.action_count, 0)
+ self.output.with_context(
+ iot_system_action_id=self.action.id).device_run_action()
+ self.assertEqual(self.output.action_count, 1)
+ self.assertEqual(self.output.action_ids.status, 'failed')
+
+ def test_correct_action(self):
+ self.assertEqual(self.output.action_count, 0)
+ with patch('odoo.addons.iot.models.iot_system_action.'
+ 'IoTSystemAction._run', return_value=('ok', '')):
+ self.output.with_context(
+ iot_system_action_id=self.action.id).device_run_action()
+ self.assertEqual(self.output.action_count, 1)
+ self.assertEqual(self.output.action_ids.status, 'ok')
+
+ def test_constrains(self):
+ with self.assertRaises(ValidationError):
+ self.output.with_context(
+ iot_system_action_id=self.action_2.id).device_run_action()
diff --git a/iot_output_oca/views/iot_device_output_views.xml b/iot_output_oca/views/iot_device_output_views.xml
new file mode 100644
index 00000000..07b00fbf
--- /dev/null
+++ b/iot_output_oca/views/iot_device_output_views.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ iot.device.output.tree
+ iot.device.output
+
+
+
+
+
+
+
+
+
+ iot.device.output.form
+ iot.device.output
+
+
+
+
+
+
+ IoT Outputs
+ ir.actions.act_window
+ iot.device.output
+ form
+ tree,form
+
+
+
+
+
+ iot.device.output.action.tree
+ iot.device.output.action
+
+
+
+
+
+
+
+
+
+
+
diff --git a/iot_output_oca/views/iot_device_views.xml b/iot_output_oca/views/iot_device_views.xml
new file mode 100644
index 00000000..9f8c854f
--- /dev/null
+++ b/iot_output_oca/views/iot_device_views.xml
@@ -0,0 +1,28 @@
+
+
+
+
+ iot.device.form
+ iot.device
+
+
+
+
+
+
+
+
+ [('applies_to', '=', 'device')]
+
+
+ {'invisible': [('system_id', '=', False)]}
+
+
+
+
+
+
diff --git a/iot_output_oca/views/iot_menu.xml b/iot_output_oca/views/iot_menu.xml
new file mode 100644
index 00000000..e1a05f94
--- /dev/null
+++ b/iot_output_oca/views/iot_menu.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/iot_output_oca/views/iot_system_views.xml b/iot_output_oca/views/iot_system_views.xml
new file mode 100644
index 00000000..726d373a
--- /dev/null
+++ b/iot_output_oca/views/iot_system_views.xml
@@ -0,0 +1,62 @@
+
+
+
+
+ iot.system.tree
+ iot.system
+
+
+
+
+
+
+
+
+ iot.system.form
+ iot.system
+
+
+
+
+
+
+ iot.system.action.tree
+ iot.system.action
+
+
+
+
+
+
+
+
+ IoT System
+ ir.actions.act_window
+ iot.system
+ form
+ tree,form
+
+
+
+
From 1dcf4c5320c77731342dc50f580899b96d49fbbd Mon Sep 17 00:00:00 2001
From: Enric Tobella
Date: Fri, 6 Mar 2020 11:48:03 +0100
Subject: [PATCH 02/27] [MIG] iot_output
---
iot_output_oca/README.rst | 10 +--
iot_output_oca/__manifest__.py | 2 +-
iot_output_oca/i18n/iot_output.pot | 69 ++++++++++----------
iot_output_oca/static/description/index.html | 6 +-
iot_output_oca/tests/test_iot.py | 6 +-
5 files changed, 48 insertions(+), 45 deletions(-)
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index fa5cc7b5..26b888c8 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -14,13 +14,13 @@ IoT Output
: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/11.0/iot_output
+ :target: https://github.com/OCA/iot/tree/12.0/iot_output
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/iot-11-0/iot-11-0-iot_output
+ :target: https://translation.odoo-community.org/projects/iot-12-0/iot-12-0-iot_output
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/11.0
+ :target: https://runbot.odoo-community.org/runbot/269/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -69,6 +69,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/iot `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index 4ff1b3cf..e180b89e 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'IoT Output',
- 'version': '11.0.1.0.0',
+ 'version': '12.0.1.0.0',
'category': 'IoT',
'author': "Creu Blanca, "
"Odoo Community Association (OCA)",
diff --git a/iot_output_oca/i18n/iot_output.pot b/iot_output_oca/i18n/iot_output.pot
index de8efe6b..7146e991 100644
--- a/iot_output_oca/i18n/iot_output.pot
+++ b/iot_output_oca/i18n/iot_output.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,35 +14,35 @@ msgstr ""
"Plural-Forms: \n"
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_ids
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__action_ids
msgid "Action"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_count
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__action_count
msgid "Action Count"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_system_applies_to
+#: model:ir.model.fields,field_description:iot_output.field_iot_system__applies_to
msgid "Applies To"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_create_uid
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_create_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__create_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__create_uid
msgid "Created by"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_create_date
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_create_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__create_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__create_date
msgid "Created on"
msgstr ""
#. module: iot_output
#: selection:iot.system,applies_to:0
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_device_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__device_id
msgid "Device"
msgstr ""
@@ -53,8 +53,8 @@ msgid "Device and action must be of the same system"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_display_name
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_display_name
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__display_name
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__display_name
msgid "Display Name"
msgstr ""
@@ -64,8 +64,8 @@ msgid "Failed"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_id
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__id
msgid "ID"
msgstr ""
@@ -91,35 +91,35 @@ msgid "IoT System"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_ip
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__ip
msgid "Ip"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output___last_update
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action___last_update
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output____last_update
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action____last_update
msgid "Last Modified on"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_write_uid
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_write_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__write_uid
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__write_uid
msgid "Last Updated by"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_write_date
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_write_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__write_date
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__write_date
msgid "Last Updated on"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_model
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__model
msgid "Model"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_name
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__name
msgid "Name"
msgstr ""
@@ -129,25 +129,25 @@ msgid "Ok"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_date_ok
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__date_ok
msgid "Ok date"
msgstr ""
#. module: iot_output
#: selection:iot.system,applies_to:0
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_output_id
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_ids
-#: model:ir.model.fields,field_description:iot_output.field_iot_system_output_ids
+#: model:ir.model.fields,field_description:iot_output.field_iot_device__output_ids
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__output_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_system__output_ids
msgid "Output"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_count
+#: model:ir.model.fields,field_description:iot_output.field_iot_device__output_count
msgid "Output Count"
msgstr ""
#. module: iot_output
-#: model:ir.ui.view,arch_db:iot_output.iot_device_form
+#: model_terms:ir.ui.view,arch_db:iot_output.iot_device_form
msgid "Outputs"
msgstr ""
@@ -157,32 +157,33 @@ msgid "Pending"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_result
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__result
msgid "Result"
msgstr ""
#. module: iot_output
-#: model:ir.ui.view,arch_db:iot_output.iot_device_output_action_tree
+#: model_terms:ir.ui.view,arch_db:iot_output.iot_device_output_action_tree
msgid "Run"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_state
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__state
msgid "State"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_status
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__status
msgid "Status"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_system_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device__system_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output__system_id
msgid "System"
msgstr ""
#. module: iot_output
-#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action_system_action_id
+#: model:ir.model.fields,field_description:iot_output.field_iot_device_output_action__system_action_id
msgid "System Action"
msgstr ""
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index 2b62ff67..9f600bbc 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -367,7 +367,7 @@ IoT Output
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This addon is a base module used to allow different outputs from the same
device
Table of contents
@@ -387,7 +387,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -411,7 +411,7 @@
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 project on GitHub.
+
This module is part of the OCA/iot project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
index a509d199..87840399 100644
--- a/iot_output_oca/tests/test_iot.py
+++ b/iot_output_oca/tests/test_iot.py
@@ -2,6 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from mock import patch
from odoo.tests.common import TransactionCase
+from odoo.tools import mute_logger
from odoo.exceptions import ValidationError
@@ -40,8 +41,9 @@ def test_views(self):
def test_action(self):
self.assertEqual(self.output.action_count, 0)
- self.output.with_context(
- iot_system_action_id=self.action.id).device_run_action()
+ with mute_logger('odoo.addons.iot.models.iot_system_action'):
+ self.output.with_context(
+ iot_system_action_id=self.action.id).device_run_action()
self.assertEqual(self.output.action_count, 1)
self.assertEqual(self.output.action_ids.status, 'failed')
From 9f4dfd2ab9f190c2944b7750cf6774262bbdfb37 Mon Sep 17 00:00:00 2001
From: Olga Marco
Date: Tue, 8 Jun 2021 17:54:10 +0200
Subject: [PATCH 03/27] [IMP] iot_output_oca: black, isort, prettier
---
iot_output_oca/__manifest__.py | 29 ++++-----
iot_output_oca/models/iot_device.py | 25 +++----
iot_output_oca/models/iot_device_output.py | 31 +++++----
.../models/iot_device_output_action.py | 41 ++++++------
iot_output_oca/models/iot_system.py | 11 ++--
iot_output_oca/tests/test_iot.py | 65 +++++++++----------
.../views/iot_device_output_views.xml | 36 +++++-----
iot_output_oca/views/iot_device_views.xml | 22 +++----
iot_output_oca/views/iot_menu.xml | 11 ++--
iot_output_oca/views/iot_system_views.xml | 32 +++++----
10 files changed, 143 insertions(+), 160 deletions(-)
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index e180b89e..fd905f39 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -2,21 +2,18 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
- 'name': 'IoT Output',
- 'version': '12.0.1.0.0',
- 'category': 'IoT',
- 'author': "Creu Blanca, "
- "Odoo Community Association (OCA)",
- 'license': 'AGPL-3',
- 'installable': True,
- 'application': True,
- 'summary': 'IoT allow multiple outputs',
- 'depends': [
- 'iot',
- ],
- 'data': [
- 'security/ir.model.access.csv',
- 'views/iot_device_output_views.xml',
- 'views/iot_device_views.xml',
+ "name": "IoT Output",
+ "version": "12.0.1.0.0",
+ "category": "IoT",
+ "author": "Creu Blanca, " "Odoo Community Association (OCA)",
+ "license": "AGPL-3",
+ "installable": True,
+ "application": True,
+ "summary": "IoT allow multiple outputs",
+ "depends": ["iot",],
+ "data": [
+ "security/ir.model.access.csv",
+ "views/iot_device_output_views.xml",
+ "views/iot_device_views.xml",
],
}
diff --git a/iot_output_oca/models/iot_device.py b/iot_output_oca/models/iot_device.py
index 65611363..cc600485 100644
--- a/iot_output_oca/models/iot_device.py
+++ b/iot_output_oca/models/iot_device.py
@@ -4,17 +4,14 @@
class IoTDevice(models.Model):
- _inherit = 'iot.device'
+ _inherit = "iot.device"
- output_ids = fields.One2many(
- 'iot.device.output',
- inverse_name='device_id'
- )
- output_count = fields.Integer(compute='_compute_output_count')
+ output_ids = fields.One2many("iot.device.output", inverse_name="device_id")
+ output_count = fields.Integer(compute="_compute_output_count")
system_id = fields.Many2one(required=False)
@api.multi
- @api.depends('output_ids')
+ @api.depends("output_ids")
def _compute_output_count(self):
for record in self:
record.output_count = len(record.output_ids)
@@ -22,16 +19,14 @@ def _compute_output_count(self):
@api.multi
def action_show_output(self):
self.ensure_one()
- action = self.env.ref(
- 'iot_output.iot_device_output_action')
+ action = self.env.ref("iot_output.iot_device_output_action")
result = action.read()[0]
- result['context'] = {
- 'default_device_id': self.id,
+ result["context"] = {
+ "default_device_id": self.id,
}
- result['domain'] = "[('device_id', '=', " + \
- str(self.id) + ")]"
+ result["domain"] = "[('device_id', '=', " + str(self.id) + ")]"
if len(self.output_ids) == 1:
- result['views'] = [(False, 'form')]
- result['res_id'] = self.output_ids.id
+ result["views"] = [(False, "form")]
+ result["res_id"] = self.output_ids.id
return result
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
index ef676f39..4699dff0 100644
--- a/iot_output_oca/models/iot_device_output.py
+++ b/iot_output_oca/models/iot_device_output.py
@@ -4,38 +4,37 @@
class IoTDevice(models.Model):
- _name = 'iot.device.output'
- _description = 'IoT Device'
+ _name = "iot.device.output"
+ _description = "IoT Device"
name = fields.Char(required=True)
- device_id = fields.Many2one('iot.device', required=True, readonly=True)
- system_id = fields.Many2one('iot.system', required=True)
- action_ids = fields.One2many(
- 'iot.device.output.action',
- inverse_name='output_id'
- )
+ device_id = fields.Many2one("iot.device", required=True, readonly=True)
+ system_id = fields.Many2one("iot.system", required=True)
+ action_ids = fields.One2many("iot.device.output.action", inverse_name="output_id")
state = fields.Selection([], readonly=True)
model = fields.Char()
ip = fields.Char()
- action_count = fields.Integer(compute='_compute_action_count')
+ action_count = fields.Integer(compute="_compute_action_count")
@api.multi
- @api.depends('action_ids')
+ @api.depends("action_ids")
def _compute_action_count(self):
for record in self:
record.action_count = len(record.action_ids)
def _system_action_vals(self, system_action):
return {
- 'output_id': self.id,
- 'system_action_id': system_action.id,
+ "output_id": self.id,
+ "system_action_id": system_action.id,
}
@api.multi
def device_run_action(self):
- system_action = self.env['iot.system.action'].browse(
- self.env.context.get('iot_system_action_id'))
+ system_action = self.env["iot.system.action"].browse(
+ self.env.context.get("iot_system_action_id")
+ )
for rec in self:
- action = self.env['iot.device.output.action'].create(
- rec._system_action_vals(system_action))
+ action = self.env["iot.device.output.action"].create(
+ rec._system_action_vals(system_action)
+ )
action.run()
diff --git a/iot_output_oca/models/iot_device_output_action.py b/iot_output_oca/models/iot_device_output_action.py
index 93a7bac2..472b5720 100644
--- a/iot_output_oca/models/iot_device_output_action.py
+++ b/iot_output_oca/models/iot_device_output_action.py
@@ -1,36 +1,31 @@
# Copyright (C) 2018 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-from odoo import api, fields, models, _
+from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class IoTDeviceOutputAction(models.Model):
- _name = 'iot.device.output.action'
- _description = 'IoT Action'
- _order = 'date_ok desc'
+ _name = "iot.device.output.action"
+ _description = "IoT Action"
+ _order = "date_ok desc"
- output_id = fields.Many2one(
- 'iot.device.output',
+ output_id = fields.Many2one("iot.device.output", required=True, readonly=True)
+ system_action_id = fields.Many2one("iot.system.action", required=True)
+ status = fields.Selection(
+ [("ok", "Ok"), ("pending", "Pending"), ("failed", "Failed")],
required=True,
- readonly=True
+ default="pending",
)
- system_action_id = fields.Many2one('iot.system.action', required=True)
- status = fields.Selection([
- ('ok', 'Ok'),
- ('pending', 'Pending'),
- ('failed', 'Failed')
- ], required=True, default='pending')
result = fields.Text()
date_ok = fields.Datetime(readonly=True, string="Ok date")
@api.multi
- @api.constrains('output_id', 'system_action_id')
+ @api.constrains("output_id", "system_action_id")
def _check_system(self):
if self.filtered(
lambda r: r.output_id.system_id != r.system_action_id.system_id
):
- raise ValidationError(_(
- 'Device and action must be of the same system'))
+ raise ValidationError(_("Device and action must be of the same system"))
def run_extra_actions(self, status, result):
return
@@ -38,11 +33,13 @@ def run_extra_actions(self, status, result):
@api.multi
def run(self):
self.ensure_one()
- if self.status != 'ok':
+ if self.status != "ok":
status, result = self.system_action_id.run(self)
- self.write({
- 'status': status,
- 'result': result,
- 'date_ok': fields.Datetime.now() if status == 'ok' else False,
- })
+ self.write(
+ {
+ "status": status,
+ "result": result,
+ "date_ok": fields.Datetime.now() if status == "ok" else False,
+ }
+ )
self.run_extra_actions(status, result)
diff --git a/iot_output_oca/models/iot_system.py b/iot_output_oca/models/iot_system.py
index 276e08f4..9572fa47 100644
--- a/iot_output_oca/models/iot_system.py
+++ b/iot_output_oca/models/iot_system.py
@@ -4,10 +4,9 @@
class IoTSystem(models.Model):
- _inherit = 'iot.system'
+ _inherit = "iot.system"
- output_ids = fields.One2many('iot.device.output', inverse_name='system_id')
- applies_to = fields.Selection([
- ('device', 'Device'),
- ('output', 'Output'),
- ], default='device', required=True)
+ output_ids = fields.One2many("iot.device.output", inverse_name="system_id")
+ applies_to = fields.Selection(
+ [("device", "Device"), ("output", "Output"),], default="device", required=True
+ )
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
index 87840399..63998143 100644
--- a/iot_output_oca/tests/test_iot.py
+++ b/iot_output_oca/tests/test_iot.py
@@ -1,62 +1,61 @@
# Copyright (C) 2018 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from mock import patch
+
+from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
-from odoo.exceptions import ValidationError
class TestIoT(TransactionCase):
def setUp(self):
super().setUp()
- self.system = self.env['iot.system'].create({
- 'name': 'Testing',
- })
- self.system_2 = self.env['iot.system'].create({
- 'name': 'Testing 02',
- })
- self.action = self.env['iot.system.action'].create({
- 'name': 'test',
- 'system_id': self.system.id,
- })
- self.action_2 = self.env['iot.system.action'].create({
- 'name': 'test 02',
- 'system_id': self.system_2.id,
- })
- self.device = self.env['iot.device'].create({
- 'name': 'Device',
- })
+ self.system = self.env["iot.system"].create({"name": "Testing",})
+ self.system_2 = self.env["iot.system"].create({"name": "Testing 02",})
+ self.action = self.env["iot.system.action"].create(
+ {"name": "test", "system_id": self.system.id,}
+ )
+ self.action_2 = self.env["iot.system.action"].create(
+ {"name": "test 02", "system_id": self.system_2.id,}
+ )
+ self.device = self.env["iot.device"].create({"name": "Device",})
self.assertEqual(self.device.output_count, 0)
- self.output = self.env['iot.device.output'].create({
- 'system_id': self.system.id,
- 'device_id': self.device.id,
- 'name': 'Output',
- })
+ self.output = self.env["iot.device.output"].create(
+ {
+ "system_id": self.system.id,
+ "device_id": self.device.id,
+ "name": "Output",
+ }
+ )
def test_views(self):
self.assertEqual(self.device.output_count, 1)
res = self.device.action_show_output()
- self.assertEqual(
- self.output, self.env[res['res_model']].browse(res['res_id']))
+ self.assertEqual(self.output, self.env[res["res_model"]].browse(res["res_id"]))
def test_action(self):
self.assertEqual(self.output.action_count, 0)
- with mute_logger('odoo.addons.iot.models.iot_system_action'):
+ with mute_logger("odoo.addons.iot.models.iot_system_action"):
self.output.with_context(
- iot_system_action_id=self.action.id).device_run_action()
+ iot_system_action_id=self.action.id
+ ).device_run_action()
self.assertEqual(self.output.action_count, 1)
- self.assertEqual(self.output.action_ids.status, 'failed')
+ self.assertEqual(self.output.action_ids.status, "failed")
def test_correct_action(self):
self.assertEqual(self.output.action_count, 0)
- with patch('odoo.addons.iot.models.iot_system_action.'
- 'IoTSystemAction._run', return_value=('ok', '')):
+ with patch(
+ "odoo.addons.iot.models.iot_system_action." "IoTSystemAction._run",
+ return_value=("ok", ""),
+ ):
self.output.with_context(
- iot_system_action_id=self.action.id).device_run_action()
+ iot_system_action_id=self.action.id
+ ).device_run_action()
self.assertEqual(self.output.action_count, 1)
- self.assertEqual(self.output.action_ids.status, 'ok')
+ self.assertEqual(self.output.action_ids.status, "ok")
def test_constrains(self):
with self.assertRaises(ValidationError):
self.output.with_context(
- iot_system_action_id=self.action_2.id).device_run_action()
+ iot_system_action_id=self.action_2.id
+ ).device_run_action()
diff --git a/iot_output_oca/views/iot_device_output_views.xml b/iot_output_oca/views/iot_device_output_views.xml
index 07b00fbf..3df95e0f 100644
--- a/iot_output_oca/views/iot_device_output_views.xml
+++ b/iot_output_oca/views/iot_device_output_views.xml
@@ -1,40 +1,40 @@
-
iot.device.output.tree
iot.device.output
-
-
+
+
-
iot.device.output.form
iot.device.output
-
IoT Outputs
ir.actions.act_window
@@ -42,21 +42,21 @@
form
tree,form
-
-
-
iot.device.output.action.tree
iot.device.output.action
-
-
-
-
+
+
+
+
-
diff --git a/iot_output_oca/views/iot_device_views.xml b/iot_output_oca/views/iot_device_views.xml
index 9f8c854f..b39733c3 100644
--- a/iot_output_oca/views/iot_device_views.xml
+++ b/iot_output_oca/views/iot_device_views.xml
@@ -1,28 +1,28 @@
-
iot.device.form
iot.device
-
+
-
-
+
+
[('applies_to', '=', 'device')]
- {'invisible': [('system_id', '=', False)]}
+ {'invisible': [('system_id', '=', False)]}
-
-
diff --git a/iot_output_oca/views/iot_menu.xml b/iot_output_oca/views/iot_menu.xml
index e1a05f94..f145674d 100644
--- a/iot_output_oca/views/iot_menu.xml
+++ b/iot_output_oca/views/iot_menu.xml
@@ -1,10 +1,9 @@
-
-
-
diff --git a/iot_output_oca/views/iot_system_views.xml b/iot_output_oca/views/iot_system_views.xml
index 726d373a..e561ca86 100644
--- a/iot_output_oca/views/iot_system_views.xml
+++ b/iot_output_oca/views/iot_system_views.xml
@@ -1,49 +1,47 @@
-
iot.system.tree
iot.system
-
+
-
iot.system.form
iot.system
-
iot.system.action.tree
iot.system.action
-
+
-
IoT System
ir.actions.act_window
@@ -51,12 +49,12 @@
form
tree,form
-
-
From 92681f8e8af4196c7dab6774d61b10e24abdaec1 Mon Sep 17 00:00:00 2001
From: Olga Marco
Date: Tue, 8 Jun 2021 18:37:50 +0200
Subject: [PATCH 04/27] [MIG] iot_output_oca: Migration to 13.0
---
iot_output_oca/README.rst | 10 +-
iot_output_oca/__manifest__.py | 5 +-
iot_output_oca/i18n/iot_output_oca.pot | 188 ++++++++++++++++++
iot_output_oca/models/iot_device.py | 4 +-
iot_output_oca/models/iot_device_output.py | 2 -
.../models/iot_device_output_action.py | 2 -
iot_output_oca/models/iot_system.py | 2 +-
iot_output_oca/security/ir.model.access.csv | 6 +-
iot_output_oca/static/description/index.html | 6 +-
iot_output_oca/tests/test_iot.py | 14 +-
.../views/iot_device_output_views.xml | 1 -
iot_output_oca/views/iot_device_views.xml | 2 +-
iot_output_oca/views/iot_menu.xml | 9 -
iot_output_oca/views/iot_system_views.xml | 60 ------
14 files changed, 212 insertions(+), 99 deletions(-)
create mode 100644 iot_output_oca/i18n/iot_output_oca.pot
delete mode 100644 iot_output_oca/views/iot_menu.xml
delete mode 100644 iot_output_oca/views/iot_system_views.xml
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index 26b888c8..2966201f 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -14,13 +14,13 @@ IoT Output
: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/12.0/iot_output
+ :target: https://github.com/OCA/iot/tree/13.0/iot_output_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/iot-12-0/iot-12-0-iot_output
+ :target: https://translation.odoo-community.org/projects/iot-13-0/iot-13-0-iot_output_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/12.0
+ :target: https://runbot.odoo-community.org/runbot/269/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -69,6 +69,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/iot `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index fd905f39..592ad756 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,14 +3,15 @@
{
"name": "IoT Output",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.1",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"application": True,
"summary": "IoT allow multiple outputs",
- "depends": ["iot",],
+ "website": "https://github.com/OCA/iot",
+ "depends": ["iot_oca"],
"data": [
"security/ir.model.access.csv",
"views/iot_device_output_views.xml",
diff --git a/iot_output_oca/i18n/iot_output_oca.pot b/iot_output_oca/i18n/iot_output_oca.pot
new file mode 100644
index 00000000..f1767ad2
--- /dev/null
+++ b/iot_output_oca/i18n/iot_output_oca.pot
@@ -0,0 +1,188 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * iot_output_oca
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 13.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_ids
+msgid "Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_count
+msgid "Action Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_system__applies_to
+msgid "Applies To"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__device_id
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_system__applies_to__device
+msgid "Device"
+msgstr ""
+
+#. module: iot_output_oca
+#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
+#, python-format
+msgid "Device and action must be of the same system"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__failed
+msgid "Failed"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
+msgid "ID"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device_output_action
+msgid "IoT Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device
+#: model:ir.model,name:iot_output_oca.model_iot_device_output
+msgid "IoT Device"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.actions.act_window,name:iot_output_oca.iot_device_output_action
+msgid "IoT Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_system
+msgid "IoT System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__ip
+msgid "Ip"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__model
+msgid "Model"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__name
+msgid "Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__ok
+msgid "Ok"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__date_ok
+msgid "Ok date"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_ids
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__output_id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_system__output_ids
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_system__applies_to__output
+msgid "Output"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_count
+msgid "Output Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_form
+msgid "Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__pending
+msgid "Pending"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__result
+msgid "Result"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_output_action_tree
+msgid "Run"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__state
+msgid "State"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
+msgid "Status"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__system_id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__system_id
+msgid "System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__system_action_id
+msgid "System Action"
+msgstr ""
diff --git a/iot_output_oca/models/iot_device.py b/iot_output_oca/models/iot_device.py
index cc600485..01e8d92c 100644
--- a/iot_output_oca/models/iot_device.py
+++ b/iot_output_oca/models/iot_device.py
@@ -10,16 +10,14 @@ class IoTDevice(models.Model):
output_count = fields.Integer(compute="_compute_output_count")
system_id = fields.Many2one(required=False)
- @api.multi
@api.depends("output_ids")
def _compute_output_count(self):
for record in self:
record.output_count = len(record.output_ids)
- @api.multi
def action_show_output(self):
self.ensure_one()
- action = self.env.ref("iot_output.iot_device_output_action")
+ action = self.env.ref("iot_output_oca.iot_device_output_action")
result = action.read()[0]
result["context"] = {
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
index 4699dff0..7ce054c4 100644
--- a/iot_output_oca/models/iot_device_output.py
+++ b/iot_output_oca/models/iot_device_output.py
@@ -16,7 +16,6 @@ class IoTDevice(models.Model):
ip = fields.Char()
action_count = fields.Integer(compute="_compute_action_count")
- @api.multi
@api.depends("action_ids")
def _compute_action_count(self):
for record in self:
@@ -28,7 +27,6 @@ def _system_action_vals(self, system_action):
"system_action_id": system_action.id,
}
- @api.multi
def device_run_action(self):
system_action = self.env["iot.system.action"].browse(
self.env.context.get("iot_system_action_id")
diff --git a/iot_output_oca/models/iot_device_output_action.py b/iot_output_oca/models/iot_device_output_action.py
index 472b5720..961efcd4 100644
--- a/iot_output_oca/models/iot_device_output_action.py
+++ b/iot_output_oca/models/iot_device_output_action.py
@@ -19,7 +19,6 @@ class IoTDeviceOutputAction(models.Model):
result = fields.Text()
date_ok = fields.Datetime(readonly=True, string="Ok date")
- @api.multi
@api.constrains("output_id", "system_action_id")
def _check_system(self):
if self.filtered(
@@ -30,7 +29,6 @@ def _check_system(self):
def run_extra_actions(self, status, result):
return
- @api.multi
def run(self):
self.ensure_one()
if self.status != "ok":
diff --git a/iot_output_oca/models/iot_system.py b/iot_output_oca/models/iot_system.py
index 9572fa47..4aa2850b 100644
--- a/iot_output_oca/models/iot_system.py
+++ b/iot_output_oca/models/iot_system.py
@@ -8,5 +8,5 @@ class IoTSystem(models.Model):
output_ids = fields.One2many("iot.device.output", inverse_name="system_id")
applies_to = fields.Selection(
- [("device", "Device"), ("output", "Output"),], default="device", required=True
+ [("device", "Device"), ("output", "Output")], default="device", required=True
)
diff --git a/iot_output_oca/security/ir.model.access.csv b/iot_output_oca/security/ir.model.access.csv
index b64debce..2f735d3d 100644
--- a/iot_output_oca/security/ir.model.access.csv
+++ b/iot_output_oca/security/ir.model.access.csv
@@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_iot_device_output_action,access_iot_device_output_action,model_iot_device_output_action,iot.group_iot_user,1,1,1,0
-access_iot_device_output,access_iot_device_output,model_iot_device_output,iot.group_iot_user,1,0,0,0
-manage_iot_device_output,access_iot_device_output,model_iot_device_output,iot.group_iot_manager,1,1,1,0
+access_iot_device_output_action,access_iot_device_output_action,model_iot_device_output_action,iot_oca.group_iot_user,1,1,1,0
+access_iot_device_output,access_iot_device_output,model_iot_device_output,iot_oca.group_iot_user,1,0,0,0
+manage_iot_device_output,access_iot_device_output,model_iot_device_output,iot_oca.group_iot_manager,1,1,1,0
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index 9f600bbc..6aad60c8 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -367,7 +367,7 @@ IoT Output
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This addon is a base module used to allow different outputs from the same
device
Table of contents
@@ -387,7 +387,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -411,7 +411,7 @@
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 project on GitHub.
+
This module is part of the OCA/iot project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
index 63998143..73204ae5 100644
--- a/iot_output_oca/tests/test_iot.py
+++ b/iot_output_oca/tests/test_iot.py
@@ -10,15 +10,15 @@
class TestIoT(TransactionCase):
def setUp(self):
super().setUp()
- self.system = self.env["iot.system"].create({"name": "Testing",})
- self.system_2 = self.env["iot.system"].create({"name": "Testing 02",})
+ self.system = self.env["iot.system"].create({"name": "Testing"})
+ self.system_2 = self.env["iot.system"].create({"name": "Testing 02"})
self.action = self.env["iot.system.action"].create(
- {"name": "test", "system_id": self.system.id,}
+ {"name": "test", "system_id": self.system.id}
)
self.action_2 = self.env["iot.system.action"].create(
- {"name": "test 02", "system_id": self.system_2.id,}
+ {"name": "test 02", "system_id": self.system_2.id}
)
- self.device = self.env["iot.device"].create({"name": "Device",})
+ self.device = self.env["iot.device"].create({"name": "Device"})
self.assertEqual(self.device.output_count, 0)
self.output = self.env["iot.device.output"].create(
{
@@ -35,7 +35,7 @@ def test_views(self):
def test_action(self):
self.assertEqual(self.output.action_count, 0)
- with mute_logger("odoo.addons.iot.models.iot_system_action"):
+ with mute_logger("odoo.addons.iot_oca.models.iot_system_action"):
self.output.with_context(
iot_system_action_id=self.action.id
).device_run_action()
@@ -45,7 +45,7 @@ def test_action(self):
def test_correct_action(self):
self.assertEqual(self.output.action_count, 0)
with patch(
- "odoo.addons.iot.models.iot_system_action." "IoTSystemAction._run",
+ "odoo.addons.iot_oca.models.iot_system_action." "IoTSystemAction._run",
return_value=("ok", ""),
):
self.output.with_context(
diff --git a/iot_output_oca/views/iot_device_output_views.xml b/iot_output_oca/views/iot_device_output_views.xml
index 3df95e0f..909d5744 100644
--- a/iot_output_oca/views/iot_device_output_views.xml
+++ b/iot_output_oca/views/iot_device_output_views.xml
@@ -39,7 +39,6 @@
IoT Outputs
ir.actions.act_window
iot.device.output
- form
tree,form
diff --git a/iot_output_oca/views/iot_device_views.xml b/iot_output_oca/views/iot_device_views.xml
index b39733c3..3dbcb58c 100644
--- a/iot_output_oca/views/iot_device_views.xml
+++ b/iot_output_oca/views/iot_device_views.xml
@@ -3,7 +3,7 @@
iot.device.form
iot.device
-
+
-
-
-
diff --git a/iot_output_oca/views/iot_system_views.xml b/iot_output_oca/views/iot_system_views.xml
deleted file mode 100644
index e561ca86..00000000
--- a/iot_output_oca/views/iot_system_views.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
- iot.system.tree
- iot.system
-
-
-
-
-
-
-
- iot.system.form
- iot.system
-
-
-
-
-
- iot.system.action.tree
- iot.system.action
-
-
-
-
-
-
-
- IoT System
- ir.actions.act_window
- iot.system
- form
- tree,form
-
-
-
From 5c56919e2dd46f9809b1744b0c19be80e1d68074 Mon Sep 17 00:00:00 2001
From: Enric Tobella
Date: Wed, 15 Dec 2021 20:18:40 +0100
Subject: [PATCH 05/27] [IMP] iot_output_oca: Add last_contact_date
---
iot_output_oca/__manifest__.py | 2 +-
iot_output_oca/models/iot_device_output.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index 592ad756..7e731228 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "IoT Output",
- "version": "13.0.1.0.1",
+ "version": "13.0.1.1.0",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
index 7ce054c4..29ca968c 100644
--- a/iot_output_oca/models/iot_device_output.py
+++ b/iot_output_oca/models/iot_device_output.py
@@ -36,3 +36,4 @@ def device_run_action(self):
rec._system_action_vals(system_action)
)
action.run()
+ self.device_id.last_contact_date = fields.Datetime.now()
From 6b38268eabadcf4f4ab76babe64daa5a8e669666 Mon Sep 17 00:00:00 2001
From: Enric Tobella
Date: Thu, 16 Dec 2021 11:19:42 +0100
Subject: [PATCH 06/27] [FIX] iot_output_oca: No processing when device is
archived
---
iot_output_oca/__manifest__.py | 2 +-
iot_output_oca/models/iot_device_output.py | 6 +++++-
iot_output_oca/tests/test_iot.py | 9 +++++++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index 7e731228..fe3cee36 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "IoT Output",
- "version": "13.0.1.1.0",
+ "version": "13.0.1.2.0",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
index 29ca968c..add486d1 100644
--- a/iot_output_oca/models/iot_device_output.py
+++ b/iot_output_oca/models/iot_device_output.py
@@ -8,7 +8,9 @@ class IoTDevice(models.Model):
_description = "IoT Device"
name = fields.Char(required=True)
- device_id = fields.Many2one("iot.device", required=True, readonly=True)
+ device_id = fields.Many2one(
+ "iot.device", required=True, readonly=True, auto_join=True
+ )
system_id = fields.Many2one("iot.system", required=True)
action_ids = fields.One2many("iot.device.output.action", inverse_name="output_id")
state = fields.Selection([], readonly=True)
@@ -32,6 +34,8 @@ def device_run_action(self):
self.env.context.get("iot_system_action_id")
)
for rec in self:
+ if not self.device_id.active:
+ continue
action = self.env["iot.device.output.action"].create(
rec._system_action_vals(system_action)
)
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
index 73204ae5..021c1162 100644
--- a/iot_output_oca/tests/test_iot.py
+++ b/iot_output_oca/tests/test_iot.py
@@ -42,6 +42,15 @@ def test_action(self):
self.assertEqual(self.output.action_count, 1)
self.assertEqual(self.output.action_ids.status, "failed")
+ def test_action_archived_device(self):
+ self.assertEqual(self.output.action_count, 0)
+ self.device.active = False
+ with mute_logger("odoo.addons.iot_oca.models.iot_system_action"):
+ self.output.with_context(
+ iot_system_action_id=self.action.id
+ ).device_run_action()
+ self.assertEqual(self.output.action_count, 0)
+
def test_correct_action(self):
self.assertEqual(self.output.action_count, 0)
with patch(
From c5831b3f5a3a96c45969b06d51fe63fdf1cb84c5 Mon Sep 17 00:00:00 2001
From: Enric Tobella
Date: Sat, 18 Dec 2021 22:32:16 +0100
Subject: [PATCH 07/27] [MIG] iot_output_oca: Migration to 14.0
---
iot_output_oca/README.rst | 10 ++--
iot_output_oca/__manifest__.py | 2 +-
iot_output_oca/i18n/iot_output_oca.pot | 55 ++++++++++++-------
.../migrations/14.0.1.0.0/pre-migration.py | 15 +++++
iot_output_oca/models/__init__.py | 2 +-
..._system.py => iot_communication_system.py} | 8 ++-
iot_output_oca/models/iot_device.py | 2 +-
iot_output_oca/models/iot_device_output.py | 8 +--
.../models/iot_device_output_action.py | 11 ++--
iot_output_oca/static/description/index.html | 6 +-
iot_output_oca/tests/test_iot.py | 31 ++++++-----
.../views/iot_device_output_views.xml | 4 +-
iot_output_oca/views/iot_device_views.xml | 23 +++++++-
13 files changed, 116 insertions(+), 61 deletions(-)
create mode 100644 iot_output_oca/migrations/14.0.1.0.0/pre-migration.py
rename iot_output_oca/models/{iot_system.py => iot_communication_system.py} (57%)
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index 2966201f..854686a2 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -14,13 +14,13 @@ IoT Output
: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/13.0/iot_output_oca
+ :target: https://github.com/OCA/iot/tree/14.0/iot_output_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/iot-13-0/iot-13-0-iot_output_oca
+ :target: https://translation.odoo-community.org/projects/iot-14-0/iot-14-0-iot_output_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/13.0
+ :target: https://runbot.odoo-community.org/runbot/269/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -69,6 +69,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/iot `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index fe3cee36..3fc164c1 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "IoT Output",
- "version": "13.0.1.2.0",
+ "version": "14.0.1.0.0",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
diff --git a/iot_output_oca/i18n/iot_output_oca.pot b/iot_output_oca/i18n/iot_output_oca.pot
index f1767ad2..eaef27a6 100644
--- a/iot_output_oca/i18n/iot_output_oca.pot
+++ b/iot_output_oca/i18n/iot_output_oca.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -13,6 +13,13 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_kanban
+msgid ""
+" \n"
+" Outputs"
+msgstr ""
+
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_ids
msgid "Action"
@@ -24,10 +31,21 @@ msgid "Action Count"
msgstr ""
#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_system__applies_to
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__applies_to
msgid "Applies To"
msgstr ""
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__communication_system_id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__communication_system_id
+msgid "Communication System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__communication_system_action_id
+msgid "Communication System Action"
+msgstr ""
+
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_uid
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_uid
@@ -42,7 +60,7 @@ msgstr ""
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__device_id
-#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_system__applies_to__device
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__device
msgid "Device"
msgstr ""
@@ -53,6 +71,8 @@ msgid "Device and action must be of the same system"
msgstr ""
#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__display_name
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__display_name
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
msgid "Display Name"
@@ -64,6 +84,8 @@ msgid "Failed"
msgstr ""
#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
msgid "ID"
@@ -74,6 +96,11 @@ msgstr ""
msgid "IoT Action"
msgstr ""
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_communication_system
+msgid "IoT Communication System"
+msgstr ""
+
#. module: iot_output_oca
#: model:ir.model,name:iot_output_oca.model_iot_device
#: model:ir.model,name:iot_output_oca.model_iot_device_output
@@ -85,17 +112,14 @@ msgstr ""
msgid "IoT Outputs"
msgstr ""
-#. module: iot_output_oca
-#: model:ir.model,name:iot_output_oca.model_iot_system
-msgid "IoT System"
-msgstr ""
-
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__ip
msgid "Ip"
msgstr ""
#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system____last_update
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device____last_update
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
msgid "Last Modified on"
@@ -134,10 +158,10 @@ msgid "Ok date"
msgstr ""
#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__output_ids
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_ids
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__output_id
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_system__output_ids
-#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_system__applies_to__output
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__output
msgid "Output"
msgstr ""
@@ -175,14 +199,3 @@ msgstr ""
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
msgid "Status"
msgstr ""
-
-#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__system_id
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__system_id
-msgid "System"
-msgstr ""
-
-#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__system_action_id
-msgid "System Action"
-msgstr ""
diff --git a/iot_output_oca/migrations/14.0.1.0.0/pre-migration.py b/iot_output_oca/migrations/14.0.1.0.0/pre-migration.py
new file mode 100644
index 00000000..1179c8c7
--- /dev/null
+++ b/iot_output_oca/migrations/14.0.1.0.0/pre-migration.py
@@ -0,0 +1,15 @@
+# Copyright 2021 Creu Blanca
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from openupgradelib import openupgrade
+
+_column_renames = {
+ "iot_device_output": [("system_id", "communication_system_id")],
+ "iot_device_output_action": [
+ ("system_action_id", "communication_system_action_id")
+ ],
+}
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ openupgrade.rename_columns(env.cr, _column_renames)
diff --git a/iot_output_oca/models/__init__.py b/iot_output_oca/models/__init__.py
index 942ea954..ba048e86 100644
--- a/iot_output_oca/models/__init__.py
+++ b/iot_output_oca/models/__init__.py
@@ -1,4 +1,4 @@
from . import iot_device
from . import iot_device_output_action
from . import iot_device_output
-from . import iot_system
+from . import iot_communication_system
diff --git a/iot_output_oca/models/iot_system.py b/iot_output_oca/models/iot_communication_system.py
similarity index 57%
rename from iot_output_oca/models/iot_system.py
rename to iot_output_oca/models/iot_communication_system.py
index 4aa2850b..2ebcecbd 100644
--- a/iot_output_oca/models/iot_system.py
+++ b/iot_output_oca/models/iot_communication_system.py
@@ -3,10 +3,12 @@
from odoo import fields, models
-class IoTSystem(models.Model):
- _inherit = "iot.system"
+class IoTCommunicationSystem(models.Model):
+ _inherit = "iot.communication.system"
- output_ids = fields.One2many("iot.device.output", inverse_name="system_id")
+ output_ids = fields.One2many(
+ "iot.device.output", inverse_name="communication_system_id"
+ )
applies_to = fields.Selection(
[("device", "Device"), ("output", "Output")], default="device", required=True
)
diff --git a/iot_output_oca/models/iot_device.py b/iot_output_oca/models/iot_device.py
index 01e8d92c..96b0bca1 100644
--- a/iot_output_oca/models/iot_device.py
+++ b/iot_output_oca/models/iot_device.py
@@ -8,7 +8,7 @@ class IoTDevice(models.Model):
output_ids = fields.One2many("iot.device.output", inverse_name="device_id")
output_count = fields.Integer(compute="_compute_output_count")
- system_id = fields.Many2one(required=False)
+ communication_system_id = fields.Many2one(required=False)
@api.depends("output_ids")
def _compute_output_count(self):
diff --git a/iot_output_oca/models/iot_device_output.py b/iot_output_oca/models/iot_device_output.py
index add486d1..eefdb5eb 100644
--- a/iot_output_oca/models/iot_device_output.py
+++ b/iot_output_oca/models/iot_device_output.py
@@ -11,7 +11,7 @@ class IoTDevice(models.Model):
device_id = fields.Many2one(
"iot.device", required=True, readonly=True, auto_join=True
)
- system_id = fields.Many2one("iot.system", required=True)
+ communication_system_id = fields.Many2one("iot.communication.system", required=True)
action_ids = fields.One2many("iot.device.output.action", inverse_name="output_id")
state = fields.Selection([], readonly=True)
model = fields.Char()
@@ -26,12 +26,12 @@ def _compute_action_count(self):
def _system_action_vals(self, system_action):
return {
"output_id": self.id,
- "system_action_id": system_action.id,
+ "communication_system_action_id": system_action.id,
}
def device_run_action(self):
- system_action = self.env["iot.system.action"].browse(
- self.env.context.get("iot_system_action_id")
+ system_action = self.env["iot.communication.system.action"].browse(
+ self.env.context.get("iot_communication_system_action_id")
)
for rec in self:
if not self.device_id.active:
diff --git a/iot_output_oca/models/iot_device_output_action.py b/iot_output_oca/models/iot_device_output_action.py
index 961efcd4..58d388ea 100644
--- a/iot_output_oca/models/iot_device_output_action.py
+++ b/iot_output_oca/models/iot_device_output_action.py
@@ -10,7 +10,9 @@ class IoTDeviceOutputAction(models.Model):
_order = "date_ok desc"
output_id = fields.Many2one("iot.device.output", required=True, readonly=True)
- system_action_id = fields.Many2one("iot.system.action", required=True)
+ communication_system_action_id = fields.Many2one(
+ "iot.communication.system.action", required=True
+ )
status = fields.Selection(
[("ok", "Ok"), ("pending", "Pending"), ("failed", "Failed")],
required=True,
@@ -19,10 +21,11 @@ class IoTDeviceOutputAction(models.Model):
result = fields.Text()
date_ok = fields.Datetime(readonly=True, string="Ok date")
- @api.constrains("output_id", "system_action_id")
+ @api.constrains("output_id", "communication_system_action_id")
def _check_system(self):
if self.filtered(
- lambda r: r.output_id.system_id != r.system_action_id.system_id
+ lambda r: r.output_id.communication_system_id
+ != r.communication_system_action_id.communication_system_id
):
raise ValidationError(_("Device and action must be of the same system"))
@@ -32,7 +35,7 @@ def run_extra_actions(self, status, result):
def run(self):
self.ensure_one()
if self.status != "ok":
- status, result = self.system_action_id.run(self)
+ status, result = self.communication_system_action_id.run(self)
self.write(
{
"status": status,
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index 6aad60c8..c86b6fa9 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -367,7 +367,7 @@ IoT Output
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This addon is a base module used to allow different outputs from the same
device
Table of contents
@@ -387,7 +387,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -411,7 +411,7 @@
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 project on GitHub.
+
This module is part of the OCA/iot project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/iot_output_oca/tests/test_iot.py b/iot_output_oca/tests/test_iot.py
index 021c1162..829f6707 100644
--- a/iot_output_oca/tests/test_iot.py
+++ b/iot_output_oca/tests/test_iot.py
@@ -10,19 +10,21 @@
class TestIoT(TransactionCase):
def setUp(self):
super().setUp()
- self.system = self.env["iot.system"].create({"name": "Testing"})
- self.system_2 = self.env["iot.system"].create({"name": "Testing 02"})
- self.action = self.env["iot.system.action"].create(
- {"name": "test", "system_id": self.system.id}
+ self.system = self.env["iot.communication.system"].create({"name": "Testing"})
+ self.system_2 = self.env["iot.communication.system"].create(
+ {"name": "Testing 02"}
)
- self.action_2 = self.env["iot.system.action"].create(
- {"name": "test 02", "system_id": self.system_2.id}
+ self.action = self.env["iot.communication.system.action"].create(
+ {"name": "test", "communication_system_id": self.system.id}
+ )
+ self.action_2 = self.env["iot.communication.system.action"].create(
+ {"name": "test 02", "communication_system_id": self.system_2.id}
)
self.device = self.env["iot.device"].create({"name": "Device"})
self.assertEqual(self.device.output_count, 0)
self.output = self.env["iot.device.output"].create(
{
- "system_id": self.system.id,
+ "communication_system_id": self.system.id,
"device_id": self.device.id,
"name": "Output",
}
@@ -35,9 +37,9 @@ def test_views(self):
def test_action(self):
self.assertEqual(self.output.action_count, 0)
- with mute_logger("odoo.addons.iot_oca.models.iot_system_action"):
+ with mute_logger("odoo.addons.iot_oca.models.iot_communication_system_action"):
self.output.with_context(
- iot_system_action_id=self.action.id
+ iot_communication_system_action_id=self.action.id
).device_run_action()
self.assertEqual(self.output.action_count, 1)
self.assertEqual(self.output.action_ids.status, "failed")
@@ -45,20 +47,21 @@ def test_action(self):
def test_action_archived_device(self):
self.assertEqual(self.output.action_count, 0)
self.device.active = False
- with mute_logger("odoo.addons.iot_oca.models.iot_system_action"):
+ with mute_logger("odoo.addons.iot_oca.models.iot_communication_system_action"):
self.output.with_context(
- iot_system_action_id=self.action.id
+ iot_communication_system_action_id=self.action.id
).device_run_action()
self.assertEqual(self.output.action_count, 0)
def test_correct_action(self):
self.assertEqual(self.output.action_count, 0)
with patch(
- "odoo.addons.iot_oca.models.iot_system_action." "IoTSystemAction._run",
+ "odoo.addons.iot_oca.models.iot_communication_system_action."
+ "IoTSystemAction._run",
return_value=("ok", ""),
):
self.output.with_context(
- iot_system_action_id=self.action.id
+ iot_communication_system_action_id=self.action.id
).device_run_action()
self.assertEqual(self.output.action_count, 1)
self.assertEqual(self.output.action_ids.status, "ok")
@@ -66,5 +69,5 @@ def test_correct_action(self):
def test_constrains(self):
with self.assertRaises(ValidationError):
self.output.with_context(
- iot_system_action_id=self.action_2.id
+ iot_communication_system_action_id=self.action_2.id
).device_run_action()
diff --git a/iot_output_oca/views/iot_device_output_views.xml b/iot_output_oca/views/iot_device_output_views.xml
index 909d5744..64799937 100644
--- a/iot_output_oca/views/iot_device_output_views.xml
+++ b/iot_output_oca/views/iot_device_output_views.xml
@@ -6,7 +6,7 @@
-
+
@@ -26,7 +26,7 @@
diff --git a/iot_output_oca/views/iot_device_views.xml b/iot_output_oca/views/iot_device_views.xml
index 3dbcb58c..449af56c 100644
--- a/iot_output_oca/views/iot_device_views.xml
+++ b/iot_output_oca/views/iot_device_views.xml
@@ -15,14 +15,33 @@
-
+
[('applies_to', '=', 'device')]
{'invisible': [('system_id', '=', False)]}
+ >{'invisible': [('communication_system_id', '=', False)]}
+
+
+ iot.device.kanban
+ iot.device
+
+
+
+
+
+ Outputs
+
+
+
+
From 915f490fc477a79199bda888181edfb07bd081bd Mon Sep 17 00:00:00 2001
From: Olga Marco
Date: Wed, 11 May 2022 10:30:24 +0200
Subject: [PATCH 08/27] [MIG] iot_output_oca: Migration to 15.0
---
iot_output_oca/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index 3fc164c1..6e7cfaa0 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "IoT Output",
- "version": "14.0.1.0.0",
+ "version": "15.0.1.0.0",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
From 2718eee324f83d52e8037c290ce8ae4992ad7173 Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Thu, 12 May 2022 08:02:23 +0000
Subject: [PATCH 09/27] [UPD] Update iot_output_oca.pot
---
iot_output_oca/i18n/iot_output_oca.pot | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/iot_output_oca/i18n/iot_output_oca.pot b/iot_output_oca/i18n/iot_output_oca.pot
index eaef27a6..9a1f127b 100644
--- a/iot_output_oca/i18n/iot_output_oca.pot
+++ b/iot_output_oca/i18n/iot_output_oca.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -71,8 +71,6 @@ msgid "Device and action must be of the same system"
msgstr ""
#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__display_name
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__display_name
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
msgid "Display Name"
@@ -84,8 +82,6 @@ msgid "Failed"
msgstr ""
#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__id
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
msgid "ID"
@@ -118,8 +114,6 @@ msgid "Ip"
msgstr ""
#. module: iot_output_oca
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system____last_update
-#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device____last_update
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
msgid "Last Modified on"
From 856d5b239bdcc1e4d40277566fe42fd312875d67 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Thu, 12 May 2022 08:04:08 +0000
Subject: [PATCH 10/27] [UPD] README.rst
---
iot_output_oca/README.rst | 10 +++++-----
iot_output_oca/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index 854686a2..09bc96a0 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -14,13 +14,13 @@ IoT Output
: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/14.0/iot_output_oca
+ :target: https://github.com/OCA/iot/tree/15.0/iot_output_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/iot-14-0/iot-14-0-iot_output_oca
+ :target: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/14.0
+ :target: https://runbot.odoo-community.org/runbot/269/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -69,6 +69,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/iot `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index c86b6fa9..bcfe31c3 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -367,7 +367,7 @@ IoT Output
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This addon is a base module used to allow different outputs from the same
device
Table of contents
@@ -387,7 +387,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -411,7 +411,7 @@
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 project on GitHub.
+
This module is part of the OCA/iot project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
From 4d1c7b5a92303a5cd5633b959d2aa80feeacf253 Mon Sep 17 00:00:00 2001
From: mymage
Date: Wed, 22 Mar 2023 20:26:18 +0000
Subject: [PATCH 11/27] Added translation using Weblate (Italian)
---
iot_output_oca/i18n/it.po | 196 ++++++++++++++++++++++++++++++++++++++
1 file changed, 196 insertions(+)
create mode 100644 iot_output_oca/i18n/it.po
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
new file mode 100644
index 00000000..ddaa6ae3
--- /dev/null
+++ b/iot_output_oca/i18n/it.po
@@ -0,0 +1,196 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * iot_output_oca
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 15.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_kanban
+msgid ""
+" \n"
+" Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_ids
+msgid "Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_count
+msgid "Action Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__applies_to
+msgid "Applies To"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__communication_system_id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__communication_system_id
+msgid "Communication System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__communication_system_action_id
+msgid "Communication System Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__device_id
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__device
+msgid "Device"
+msgstr ""
+
+#. module: iot_output_oca
+#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
+#, python-format
+msgid "Device and action must be of the same system"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__failed
+msgid "Failed"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
+msgid "ID"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device_output_action
+msgid "IoT Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_communication_system
+msgid "IoT Communication System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device
+#: model:ir.model,name:iot_output_oca.model_iot_device_output
+msgid "IoT Device"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.actions.act_window,name:iot_output_oca.iot_device_output_action
+msgid "IoT Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__ip
+msgid "Ip"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__model
+msgid "Model"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__name
+msgid "Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__ok
+msgid "Ok"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__date_ok
+msgid "Ok date"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__output_ids
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_ids
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__output_id
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__output
+msgid "Output"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_count
+msgid "Output Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_form
+msgid "Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__pending
+msgid "Pending"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__result
+msgid "Result"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_output_action_tree
+msgid "Run"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__state
+msgid "State"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
+msgid "Status"
+msgstr ""
From 0700709d8f2125263b83aa096ddcee9643174791 Mon Sep 17 00:00:00 2001
From: mymage
Date: Wed, 22 Mar 2023 20:26:43 +0000
Subject: [PATCH 12/27] Translated using Weblate (Italian)
Currently translated at 48.4% (16 of 33 strings)
Translation: iot-15.0/iot-15.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca/it/
---
iot_output_oca/i18n/it.po | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index ddaa6ae3..a8d90e2d 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -6,13 +6,15 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2023-03-23 00:19+0000\n"
+"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: iot_output_oca
#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_kanban
@@ -20,89 +22,91 @@ msgid ""
" \n"
" Outputs"
msgstr ""
+" \n"
+" Output"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_ids
msgid "Action"
-msgstr ""
+msgstr "Azione"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_count
msgid "Action Count"
-msgstr ""
+msgstr "Conteggio azione"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__applies_to
msgid "Applies To"
-msgstr ""
+msgstr "Si applica a"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__communication_system_id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__communication_system_id
msgid "Communication System"
-msgstr ""
+msgstr "Sistema di comunicazione"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__communication_system_action_id
msgid "Communication System Action"
-msgstr ""
+msgstr "Azione sistema di comunicazione"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_uid
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Creato da"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_date
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_date
msgid "Created on"
-msgstr ""
+msgstr "Creato il"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__device_id
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__device
msgid "Device"
-msgstr ""
+msgstr "Dispositivo"
#. module: iot_output_oca
#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
#, python-format
msgid "Device and action must be of the same system"
-msgstr ""
+msgstr "Il dispositivo e l'azione devono essere dello stesso sistema"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Nome visualizzato"
#. module: iot_output_oca
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__failed
msgid "Failed"
-msgstr ""
+msgstr "Fallito"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: iot_output_oca
#: model:ir.model,name:iot_output_oca.model_iot_device_output_action
msgid "IoT Action"
-msgstr ""
+msgstr "Azione IoT"
#. module: iot_output_oca
#: model:ir.model,name:iot_output_oca.model_iot_communication_system
msgid "IoT Communication System"
-msgstr ""
+msgstr "Sistema di comunicazione IoT"
#. module: iot_output_oca
#: model:ir.model,name:iot_output_oca.model_iot_device
#: model:ir.model,name:iot_output_oca.model_iot_device_output
msgid "IoT Device"
-msgstr ""
+msgstr "Dispositivo IoT"
#. module: iot_output_oca
#: model:ir.actions.act_window,name:iot_output_oca.iot_device_output_action
From 8931411ebc99997a9a02b40cb0841d14449efe67 Mon Sep 17 00:00:00 2001
From: mymage
Date: Thu, 23 Mar 2023 07:11:19 +0000
Subject: [PATCH 13/27] Translated using Weblate (Italian)
Currently translated at 60.6% (20 of 33 strings)
Translation: iot-15.0/iot-15.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca/it/
---
iot_output_oca/i18n/it.po | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index a8d90e2d..114823a4 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-03-23 00:19+0000\n"
+"PO-Revision-Date: 2023-03-23 07:44+0000\n"
"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
@@ -111,24 +111,24 @@ msgstr "Dispositivo IoT"
#. module: iot_output_oca
#: model:ir.actions.act_window,name:iot_output_oca.iot_device_output_action
msgid "IoT Outputs"
-msgstr ""
+msgstr "Output IoT"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__ip
msgid "Ip"
-msgstr ""
+msgstr "IP"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Ultima modifica il"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_uid
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Ultimo aggiornamento di"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_date
From 524071f4bd77d158f159c5910e53297ccb6e9dc2 Mon Sep 17 00:00:00 2001
From: mymage
Date: Thu, 23 Mar 2023 13:03:34 +0000
Subject: [PATCH 14/27] Translated using Weblate (Italian)
Currently translated at 100.0% (33 of 33 strings)
Translation: iot-15.0/iot-15.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca/it/
---
iot_output_oca/i18n/it.po | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index 114823a4..1956c776 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-03-23 07:44+0000\n"
+"PO-Revision-Date: 2023-03-23 13:23+0000\n"
"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
@@ -134,27 +134,27 @@ msgstr "Ultimo aggiornamento di"
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_date
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Ultimo aggiornamento il"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__model
msgid "Model"
-msgstr ""
+msgstr "Modello"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__name
msgid "Name"
-msgstr ""
+msgstr "Nome"
#. module: iot_output_oca
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__ok
msgid "Ok"
-msgstr ""
+msgstr "Ok"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__date_ok
msgid "Ok date"
-msgstr ""
+msgstr "Data ok"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__output_ids
@@ -162,39 +162,39 @@ msgstr ""
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__output_id
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__output
msgid "Output"
-msgstr ""
+msgstr "Output"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_count
msgid "Output Count"
-msgstr ""
+msgstr "Conteggio output"
#. module: iot_output_oca
#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_form
msgid "Outputs"
-msgstr ""
+msgstr "Output"
#. module: iot_output_oca
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__pending
msgid "Pending"
-msgstr ""
+msgstr "In sospeso"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__result
msgid "Result"
-msgstr ""
+msgstr "Risultato"
#. module: iot_output_oca
#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_output_action_tree
msgid "Run"
-msgstr ""
+msgstr "Esegui"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__state
msgid "State"
-msgstr ""
+msgstr "Stato"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
msgid "Status"
-msgstr ""
+msgstr "Stati"
From 769b5e665f5628327d48bd74687ce5e09187d631 Mon Sep 17 00:00:00 2001
From: mymage
Date: Sat, 15 Apr 2023 10:25:25 +0000
Subject: [PATCH 15/27] Translated using Weblate (Italian)
Currently translated at 100.0% (33 of 33 strings)
Translation: iot-15.0/iot-15.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca/it/
---
iot_output_oca/i18n/it.po | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index 1956c776..0f181014 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-03-23 13:23+0000\n"
+"PO-Revision-Date: 2023-04-15 12:34+0000\n"
"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
@@ -197,4 +197,4 @@ msgstr "Stato"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
msgid "Status"
-msgstr "Stati"
+msgstr "Stato"
From 4c1e259fe8aef8fdeae7fd182e74506bce55e791 Mon Sep 17 00:00:00 2001
From: mymage
Date: Mon, 22 May 2023 12:33:53 +0000
Subject: [PATCH 16/27] Translated using Weblate (Italian)
Currently translated at 100.0% (33 of 33 strings)
Translation: iot-15.0/iot-15.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca/it/
---
iot_output_oca/i18n/it.po | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index 0f181014..da15886c 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-04-15 12:34+0000\n"
+"PO-Revision-Date: 2023-05-22 15:09+0000\n"
"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.14.1\n"
+"X-Generator: Weblate 4.17\n"
#. module: iot_output_oca
#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_kanban
@@ -177,7 +177,7 @@ msgstr "Output"
#. module: iot_output_oca
#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__pending
msgid "Pending"
-msgstr "In sospeso"
+msgstr "In attesa"
#. module: iot_output_oca
#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__result
From 1c132fdec5d98726029c3df982625c3c7e9583f8 Mon Sep 17 00:00:00 2001
From: maso
Date: Tue, 27 Jun 2023 17:08:00 +0330
Subject: [PATCH 17/27] [MIG] iot_output_oca: Migration to 16.0
---
iot_output_oca/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iot_output_oca/__manifest__.py b/iot_output_oca/__manifest__.py
index 6e7cfaa0..e75923ea 100644
--- a/iot_output_oca/__manifest__.py
+++ b/iot_output_oca/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "IoT Output",
- "version": "15.0.1.0.0",
+ "version": "16.0.1.0.0",
"category": "IoT",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
From 46741b11de6ad3aa0729ac83ad073c7dac33ba26 Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Tue, 27 Jun 2023 14:21:57 +0000
Subject: [PATCH 18/27] [UPD] Update iot_output_oca.pot
---
iot_output_oca/i18n/iot_output_oca.pot | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/iot_output_oca/i18n/iot_output_oca.pot b/iot_output_oca/i18n/iot_output_oca.pot
index 9a1f127b..40dcb3a6 100644
--- a/iot_output_oca/i18n/iot_output_oca.pot
+++ b/iot_output_oca/i18n/iot_output_oca.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 15.0\n"
+"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -65,6 +65,7 @@ msgid "Device"
msgstr ""
#. module: iot_output_oca
+#. odoo-python
#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
#, python-format
msgid "Device and action must be of the same system"
From f963baf66073a16d9c76a9c405146491a57dd4e6 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 27 Jun 2023 14:24:34 +0000
Subject: [PATCH 19/27] [UPD] README.rst
---
iot_output_oca/README.rst | 10 +++++-----
iot_output_oca/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index 09bc96a0..004283f5 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -14,13 +14,13 @@ IoT Output
: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/15.0/iot_output_oca
+ :target: https://github.com/OCA/iot/tree/16.0/iot_output_oca
:alt: OCA/iot
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/iot-15-0/iot-15-0-iot_output_oca
+ :target: https://translation.odoo-community.org/projects/iot-16-0/iot-16-0-iot_output_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/15.0
+ :target: https://runbot.odoo-community.org/runbot/269/16.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -39,7 +39,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -69,6 +69,6 @@ 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 `_ project on GitHub.
+This module is part of the `OCA/iot `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index bcfe31c3..cf416180 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -367,7 +367,7 @@ IoT Output
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This addon is a base module used to allow different outputs from the same
device
Table of contents
@@ -387,7 +387,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -411,7 +411,7 @@
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 project on GitHub.
+
This module is part of the OCA/iot project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
From e3c7850e39febae2534836fb31e961433e79d0a5 Mon Sep 17 00:00:00 2001
From: Weblate
Date: Tue, 27 Jun 2023 15:15:15 +0000
Subject: [PATCH 20/27] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: iot-16.0/iot-16.0-iot_output_oca
Translate-URL: https://translation.odoo-community.org/projects/iot-16-0/iot-16-0-iot_output_oca/
---
iot_output_oca/i18n/it.po | 1 +
1 file changed, 1 insertion(+)
diff --git a/iot_output_oca/i18n/it.po b/iot_output_oca/i18n/it.po
index da15886c..9acce8ad 100644
--- a/iot_output_oca/i18n/it.po
+++ b/iot_output_oca/i18n/it.po
@@ -70,6 +70,7 @@ msgid "Device"
msgstr "Dispositivo"
#. module: iot_output_oca
+#. odoo-python
#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
#, python-format
msgid "Device and action must be of the same system"
From 11614206b827ec6ba98d0917ab76083dea8df145 Mon Sep 17 00:00:00 2001
From: Ivorra78
Date: Tue, 22 Aug 2023 15:13:13 +0000
Subject: [PATCH 21/27] Added translation using Weblate (Spanish)
---
iot_output_oca/i18n/es.po | 197 ++++++++++++++++++++++++++++++++++++++
1 file changed, 197 insertions(+)
create mode 100644 iot_output_oca/i18n/es.po
diff --git a/iot_output_oca/i18n/es.po b/iot_output_oca/i18n/es.po
new file mode 100644
index 00000000..e7fee1d7
--- /dev/null
+++ b/iot_output_oca/i18n/es.po
@@ -0,0 +1,197 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * iot_output_oca
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_kanban
+msgid ""
+" \n"
+" Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_ids
+msgid "Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__action_count
+msgid "Action Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__applies_to
+msgid "Applies To"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__communication_system_id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__communication_system_id
+msgid "Communication System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__communication_system_action_id
+msgid "Communication System Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__create_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__device_id
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__device
+msgid "Device"
+msgstr ""
+
+#. module: iot_output_oca
+#. odoo-python
+#: code:addons/iot_output_oca/models/iot_device_output_action.py:0
+#, python-format
+msgid "Device and action must be of the same system"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__display_name
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__failed
+msgid "Failed"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__id
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__id
+msgid "ID"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device_output_action
+msgid "IoT Action"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_communication_system
+msgid "IoT Communication System"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model,name:iot_output_oca.model_iot_device
+#: model:ir.model,name:iot_output_oca.model_iot_device_output
+msgid "IoT Device"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.actions.act_window,name:iot_output_oca.iot_device_output_action
+msgid "IoT Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__ip
+msgid "Ip"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output____last_update
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_uid
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__write_date
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__model
+msgid "Model"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__name
+msgid "Name"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__ok
+msgid "Ok"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__date_ok
+msgid "Ok date"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_communication_system__output_ids
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_ids
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__output_id
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_communication_system__applies_to__output
+msgid "Output"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device__output_count
+msgid "Output Count"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_form
+msgid "Outputs"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields.selection,name:iot_output_oca.selection__iot_device_output_action__status__pending
+msgid "Pending"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__result
+msgid "Result"
+msgstr ""
+
+#. module: iot_output_oca
+#: model_terms:ir.ui.view,arch_db:iot_output_oca.iot_device_output_action_tree
+msgid "Run"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output__state
+msgid "State"
+msgstr ""
+
+#. module: iot_output_oca
+#: model:ir.model.fields,field_description:iot_output_oca.field_iot_device_output_action__status
+msgid "Status"
+msgstr ""
From d9f45dd1d3a6b0aa6baa83d30b8878191de40325 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 13:18:05 +0000
Subject: [PATCH 22/27] [UPD] README.rst
---
iot_output_oca/README.rst | 15 +++++----
iot_output_oca/static/description/index.html | 34 +++++++++++---------
2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/iot_output_oca/README.rst b/iot_output_oca/README.rst
index 004283f5..6ca8fbee 100644
--- a/iot_output_oca/README.rst
+++ b/iot_output_oca/README.rst
@@ -2,10 +2,13 @@
IoT Output
==========
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:772571e056826b7a1b1628661b06c130e639c2a1d7fd5db0ef0cce7a9ab026cd
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ IoT Output
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/iot-16-0/iot-16-0-iot_output_oca
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/269/16.0
- :alt: Try me on Runbot
+.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/iot&target_branch=16.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This addon is a base module used to allow different outputs from the same
device
@@ -38,7 +41,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
-If you spotted it first, help us smashing it by providing a detailed and welcomed
+If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback `_.
Do not contact contributors directly about support or help with technical issues.
diff --git a/iot_output_oca/static/description/index.html b/iot_output_oca/static/description/index.html
index cf416180..b6350302 100644
--- a/iot_output_oca/static/description/index.html
+++ b/iot_output_oca/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
IoT Output