Skip to content

Commit b963c97

Browse files
committed
[18.0] [ADD] signage
1 parent 0881d75 commit b963c97

15 files changed

Lines changed: 786 additions & 0 deletions

signage/README.rst

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
=======
6+
Signage
7+
=======
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:25712e0bedc2bcdc673778d32ea5830f2dda8ba3cc0e4337339aa4ad823cc173
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
24+
:target: https://github.com/OCA/knowledge/tree/18.0/signage
25+
:alt: OCA/knowledge
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-signage
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=18.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module allows to handle signage and create type of signs e.g. ISO
36+
3864, ISO 7001, GHS and connect. It is a base module providing only the
37+
signare part. Other glue modules will allow to link signs to
38+
mrp.production, mrp.workcenter, stock.location, etc.
39+
40+
**Table of contents**
41+
42+
.. contents::
43+
:local:
44+
45+
Usage
46+
=====
47+
48+
To create a sign you can upload a sign image and add the explanation
49+
text in the html field, or add all the sign components in the html field
50+
itself.
51+
52+
Bug Tracker
53+
===========
54+
55+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
56+
In case of trouble, please check there if your issue has already been reported.
57+
If you spotted it first, help us to smash it by providing a detailed and welcomed
58+
`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**>`_.
59+
60+
Do not contact contributors directly about support or help with technical issues.
61+
62+
Credits
63+
=======
64+
65+
Authors
66+
-------
67+
68+
* Dimitrios Tanis
69+
70+
Contributors
71+
------------
72+
73+
- Dimitrios Tanis <dtanis@tanisfood.gr>
74+
75+
Maintainers
76+
-----------
77+
78+
This module is maintained by the OCA.
79+
80+
.. image:: https://odoo-community.org/logo.png
81+
:alt: Odoo Community Association
82+
:target: https://odoo-community.org
83+
84+
OCA, or the Odoo Community Association, is a nonprofit organization whose
85+
mission is to support the collaborative development of Odoo features and
86+
promote its widespread use.
87+
88+
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/18.0/signage>`_ project on GitHub.
89+
90+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

signage/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models

signage/__manifest__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Signage",
5+
"summary": "Base module to create signs",
6+
"version": "18.0.1.0.0",
7+
"category": "Knowledge Management",
8+
"website": "https://github.com/OCA/knowledge",
9+
"author": "Dimitrios Tanis, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"depends": [
12+
"document_page",
13+
],
14+
"data": [
15+
"security/ir.model.access.csv",
16+
"views/signage_view.xml",
17+
"views/signage_category_view.xml",
18+
],
19+
}

signage/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import signage
2+
from . import signage_category

signage/models/signage.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
from odoo import api, fields, models
4+
from odoo.tools.mail import html2plaintext
5+
6+
7+
class Signage(models.Model):
8+
_name = "signage"
9+
_description = "Warning, obligation and information signs"
10+
11+
@api.depends("name")
12+
def _compute_display_name(self):
13+
for record in self:
14+
record.display_name = html2plaintext(record.name)
15+
16+
name = fields.Html(
17+
sanitize_style=True,
18+
required=True,
19+
)
20+
description = fields.Text()
21+
image = fields.Binary(
22+
attachment=True, help="This field holds the image used for the signage."
23+
)
24+
category_id = fields.Many2one(
25+
"signage.category",
26+
group_expand="_read_group_stage_ids",
27+
)
28+
29+
@api.model
30+
def _read_group_stage_ids(self, stages, domain):
31+
"""Show always the stages not folded."""
32+
search_domain = [
33+
("fold", "=", False),
34+
]
35+
return stages.search(search_domain)

signage/models/signage_category.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (C) 2025 Dimitrios Tanis (<dtanis@tanisfood.gr>).
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
from odoo import fields, models
4+
5+
6+
class SignageCategory(models.Model):
7+
_name = "signage.category"
8+
_description = "Category for signs"
9+
10+
name = fields.Char(
11+
"Category Name",
12+
required=True,
13+
)
14+
description = fields.Text()
15+
signage_ids = fields.One2many(
16+
comodel_name="signage",
17+
inverse_name="category_id",
18+
string="Signage",
19+
)
20+
sequence = fields.Integer(default=1)
21+
fold = fields.Boolean(
22+
string="Folded in Kanban",
23+
help="This stage is folded in the kanban view "
24+
"when there are no records in that stage "
25+
"to display.",
26+
)
27+
font_color_hex = fields.Char(
28+
"Font Color Code",
29+
default=False,
30+
help="Color code in Hex, # (pound sign) included",
31+
)
32+
background_color_hex = fields.Char(
33+
"Background Color Code",
34+
default=False,
35+
help="Color code in Hex used for background, # (pound sign) included",
36+
)

signage/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

signage/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Dimitrios Tanis \<dtanis@tanisfood.gr\>

signage/readme/DESCRIPTION.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This module allows to handle signage and create type of signs
2+
e.g. ISO 3864, ISO 7001, GHS and connect.
3+
It is a base module providing only the signare part.
4+
Other glue modules will allow to link signs to mrp.production,
5+
mrp.workcenter, stock.location, etc.

signage/readme/USAGE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To create a sign you can upload a sign image and add
2+
the explanation text in the html field, or add all the
3+
sign components in the html field itself.

0 commit comments

Comments
 (0)