Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions iot_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

========
IoT Base
========
Expand All @@ -17,7 +13,7 @@ IoT Base
.. |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/license-AGPL--3-blue.png
.. |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
Expand Down Expand Up @@ -60,8 +56,9 @@ Authors
Contributors
------------

- Enric Tobella <etobella@creublanca.es>
- ViraWeb123 <info@viraweb123.ir>
- Enric Tobella etobella@creublanca.es
- ViraWeb123 info@viraweb123.ir
- Ghostdev9410 riccardoluzi52@gmail.com

Maintainers
-----------
Expand Down
5 changes: 3 additions & 2 deletions iot_oca/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Enric Tobella \<<etobella@creublanca.es>\>
- ViraWeb123 \<<info@viraweb123.ir>\>
- Enric Tobella <etobella@creublanca.es>
- ViraWeb123 <info@viraweb123.ir>
- Ghostdev9410 <riccardoluzi52@gmail.com>
29 changes: 12 additions & 17 deletions iot_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>IoT Base</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="iot-base">
<h1 class="title">IoT Base</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="iot-base">
<h1>IoT Base</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:889ef99592819ed5b23b313ad174361e1a470b2db47d14f0908c41c7e61bf746
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/iot/tree/18.0/iot_oca"><img alt="OCA/iot" src="https://img.shields.io/badge/github-OCA%2Fiot-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/iot-18-0/iot-18-0-iot_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/iot&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/iot/tree/18.0/iot_oca"><img alt="OCA/iot" src="https://img.shields.io/badge/github-OCA%2Fiot-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/iot-18-0/iot-18-0-iot_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/iot&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon is a base module used for all iot modules.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -389,30 +384,31 @@ <h1>IoT Base</h1>
</ul>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/iot/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/iot/issues/new?body=module:%20iot_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Creu Blanca</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
<li>ViraWeb123 &lt;<a class="reference external" href="mailto:info&#64;viraweb123.ir">info&#64;viraweb123.ir</a>&gt;</li>
<li>Enric Tobella <a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a></li>
<li>ViraWeb123 <a class="reference external" href="mailto:info&#64;viraweb123.ir">info&#64;viraweb123.ir</a></li>
<li>Ghostdev9410 <a class="reference external" href="mailto:riccardoluzi52&#64;gmail.com">riccardoluzi52&#64;gmail.com</a></li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -425,6 +421,5 @@ <h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
193 changes: 97 additions & 96 deletions iot_oca/views/iot_device_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<div class="oe_button_box" name="button_box" />
<widget
name="web_ribbon"
text="Archived"
bg_color="bg-danger"
title="Archived"
bg_color="text-bg-danger"
invisible="active"
/>
<field
Expand Down Expand Up @@ -93,106 +93,108 @@
<field name="name">iot.device.kanban</field>
<field name="model">iot.device</field>
<field name="arch" type="xml">
<kanban class="o_kanban_dashboard">
<field name="name" />
<field name="state" />
<kanban highlight_color="color" class="o_kanban_small_column" sample="1">
<field name="communication_system_id" />
<field name="group_id" />
<field name="color" />
<field name="id" />
<field name="image_128" />
<field name="icon" />
<field name="last_contact_date" />
<field name="ip" />
<templates>
<t t-name="card">
<div
t-attf-class="{{!selection_mode ? 'oe_kanban_color_' + kanban_getcolor(record.color.raw_value) : ''}} oe_kanban_global_click"
>
<div class="o_dropdown_kanban dropdown">
<a
role="button"
class="dropdown-toggle o-no-caret btn"
data-toggle="dropdown"
data-display="static"
href="#"
aria-label="Dropdown menu"
title="Dropdown menu"
>
<span class="fa fa-ellipsis-v" />
</a>
<div class="dropdown-menu" role="menu">
<t t-if="widget.editable">
<a
role="menuitem"
type="edit"
class="dropdown-item"
>Edit...</a>
</t>
<t t-if="widget.deletable">
<a
role="menuitem"
type="delete"
class="dropdown-item"
>Delete</a>
</t>
<ul
class="oe_kanban_colorpicker"
data-field="color"
/>
</div>
<t t-name="menu">
<t t-if="widget.editable">
<a
role="menuitem"
type="edit"
class="dropdown-item"
>Edit</a>
</t>
<t t-if="widget.deletable">
<a
role="menuitem"
type="delete"
class="dropdown-item"
>Delete</a>
</t>
<field name="color" widget="kanban_color_picker" />
</t>
<t t-name="card" class="row g-0">
<main class="col-9 pe-3">
<field
name="name"
class="fw-bold fs-5 text-truncate d-block"
/>
<div
t-if="record.group_id.raw_value"
class="text-muted small text-truncate"
>
<i class="fa fa-folder-open-o me-1" title="Group" />
<field name="group_id" />
</div>
<div
t-if="record.communication_system_id.raw_value"
class="text-muted small text-truncate"
>
<i
class="fa fa-exchange me-1"
title="Communication System"
/>
System: <field name="communication_system_id" />
</div>
<div
t-if="record.ip.raw_value"
class="text-primary small fw-bold mt-1"
>
<i class="fa fa-plug me-1" title="IP Address" />
IP: <field name="ip" />
</div>
<div class="oe_kanban_content">
<div class="o_kanban_image">
<img
t-att-src="kanban_image('iot.device', 'image_128', record.id.raw_value)"
alt="default_image"
t-if="record.image_128.raw_value"
/>
<i
t-attf-class="{{record.icon.raw_value}}"
t-if="!record.image_128.raw_value and record.icon.raw_value"
/>
<i
t-attf-class="fa fa-question fa-6x"
title="Unknown device"
t-if="!record.image_128.raw_value and !record.icon.raw_value"
/>
</div>
<div class="o_kanban_details">
<div class="o_kanban_record_top">
<b class="o_kanban_record_title">
<field name="name" />
</b>
</div>
<div class="o_kanban_record_body">
<div t-if="record.group_id.raw_value">
<field name="group_id" />
</div>
<div t-if="record.ip">IP: <field
name="ip"
/></div>
<div
t-if="record.last_contact_date"
>Last contact: <field
name="last_contact_date"
/></div>
<field
name="tag_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
/>
<div class="row">
<div
class="col-xs-6 o_kanban_primary_left"
id="actions"
>
<!-- TODO: Delete this on 14, actions should go to dropdown menu -->
</div>
</div>
</div>
<div class="o_kanban_record_bottom" />
</div>
<div
t-if="record.last_contact_date.raw_value"
class="text-muted small"
>
<i class="fa fa-clock-o me-1" title="Last Contact" />
Last contact: <field name="last_contact_date" />
</div>
</div>
<field
name="tag_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
class="d-block mt-2"
/>
<field
name="state"
widget="label_selection"
options="{'classes': {'connected': 'success', 'error': 'danger'}}"
class="d-inline-block mt-2"
/>
</main>
<aside
class="col-3 d-flex justify-content-end align-items-start"
>
<field
t-if="record.image_128.raw_value"
name="image_128"
widget="image"
options="{'preview_image': 'image_128', 'img_class': 'object-fit-contain shadow-sm rounded bg-white border'}"
/>
<span
t-elif="record.icon.raw_value"
class="d-flex align-items-center justify-content-center bg-light rounded text-muted border shadow-sm"
style="width: 60px; height: 60px;"
>
<i
t-attf-class="{{record.icon.raw_value}} fs-2"
title="Device Type Icon"
/>
</span>
<span
t-else=""
class="d-flex align-items-center justify-content-center bg-light rounded text-muted border shadow-sm"
style="width: 60px; height: 60px;"
>
<i class="fa fa-question fs-2" title="Unknown device" />
</span>
</aside>
</t>
</templates>
</kanban>
Expand Down Expand Up @@ -225,7 +227,6 @@
<filter
name="group_group"
string="Group"
domain="[]"
context="{'group_by':'group_id'}"
/>
</group>
Expand Down