Skip to content
Draft
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
90 changes: 90 additions & 0 deletions signage/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======
Signage
=======

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

.. |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%2Fknowledge-lightgray.png?logo=github
:target: https://github.com/OCA/knowledge/tree/18.0/signage
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-signage
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=18.0
:alt: Try me on Runboat

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

This module allows to handle signage and create type of signs e.g. ISO
3864, ISO 7001, GHS and connect. It is a base module providing only the
signare part. Other glue modules will allow to link signs to
mrp.production, mrp.workcenter, stock.location, etc.

**Table of contents**

.. contents::
:local:

Usage
=====

To create a sign you can upload a sign image and add the explanation
text in the html field, or add all the sign components in the html field
itself.

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

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

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

Credits
=======

Authors
-------

* Dimitrios Tanis

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

- Dimitrios Tanis <dtanis@tanisfood.gr>

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/knowledge <https://github.com/OCA/knowledge/tree/18.0/signage>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions signage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions signage/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Signage",
"summary": "Base module to create signs",
"version": "18.0.1.0.0",
"category": "Knowledge Management",
"website": "https://github.com/OCA/knowledge",
"author": "Dimitrios Tanis, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"document_page",
],
"data": [
"security/ir.model.access.csv",
"views/signage_view.xml",
"views/signage_category_view.xml",
],
}
2 changes: 2 additions & 0 deletions signage/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import signage
from . import signage_category
35 changes: 35 additions & 0 deletions signage/models/signage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools.mail import html2plaintext


class Signage(models.Model):
_name = "signage"
_description = "Warning, obligation and information signs"

@api.depends("name")
def _compute_display_name(self):
for record in self:
record.display_name = html2plaintext(record.name)

name = fields.Html(
sanitize_style=True,
required=True,
)
description = fields.Text()
image = fields.Binary(
attachment=True, help="This field holds the image used for the signage."
)
category_id = fields.Many2one(
"signage.category",
group_expand="_read_group_stage_ids",
)

@api.model
def _read_group_stage_ids(self, stages, domain):
"""Show always the stages not folded."""
search_domain = [
("fold", "=", False),
]
return stages.search(search_domain)
36 changes: 36 additions & 0 deletions signage/models/signage_category.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models


class SignageCategory(models.Model):
_name = "signage.category"
_description = "Category for signs"

name = fields.Char(
"Category Name",
required=True,
)
description = fields.Text()
signage_ids = fields.One2many(
comodel_name="signage",
inverse_name="category_id",
string="Signage",
)
sequence = fields.Integer(default=1)
fold = fields.Boolean(
string="Folded in Kanban",
help="This stage is folded in the kanban view "
"when there are no records in that stage "
"to display.",
)
font_color_hex = fields.Char(
"Font Color Code",
default=False,
help="Color code in Hex, # (pound sign) included",
)
background_color_hex = fields.Char(
"Background Color Code",
default=False,
help="Color code in Hex used for background, # (pound sign) included",
)
3 changes: 3 additions & 0 deletions signage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions signage/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Dimitrios Tanis \<dtanis@tanisfood.gr\>
5 changes: 5 additions & 0 deletions signage/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module allows to handle signage and create type of signs
e.g. ISO 3864, ISO 7001, GHS and connect.
It is a base module providing only the signare part.
Other glue modules will allow to link signs to mrp.production,
mrp.workcenter, stock.location, etc.
3 changes: 3 additions & 0 deletions signage/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To create a sign you can upload a sign image and add
the explanation text in the html field, or add all the
sign components in the html field itself.
5 changes: 5 additions & 0 deletions signage/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
signage_read,Permission to read signage,model_signage,base.group_user,1,0,0,0
signage_manager,Permission to modify signage,model_signage,document_page.group_document_editor,1,1,1,1
signage_category_read,Permission to read signage_category,model_signage_category,base.group_user,1,0,0,0
signage_category_manager,Permission to modify signage_category,model_signage_category,document_page.group_document_editor,1,1,1,1
Binary file added signage/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading