diff --git a/signage/README.rst b/signage/README.rst new file mode 100644 index 00000000000..72bd8c2d38f --- /dev/null +++ b/signage/README.rst @@ -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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Dimitrios Tanis + +Contributors +------------ + +- Dimitrios Tanis + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/signage/__init__.py b/signage/__init__.py new file mode 100644 index 00000000000..31660d6a965 --- /dev/null +++ b/signage/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/signage/__manifest__.py b/signage/__manifest__.py new file mode 100644 index 00000000000..0f7e75864b1 --- /dev/null +++ b/signage/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright (C) 2025 Dimitrios Tanis (). +# 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", + ], +} diff --git a/signage/models/__init__.py b/signage/models/__init__.py new file mode 100644 index 00000000000..8b44dee2c78 --- /dev/null +++ b/signage/models/__init__.py @@ -0,0 +1,2 @@ +from . import signage +from . import signage_category diff --git a/signage/models/signage.py b/signage/models/signage.py new file mode 100644 index 00000000000..61a21079123 --- /dev/null +++ b/signage/models/signage.py @@ -0,0 +1,35 @@ +# Copyright (C) 2025 Dimitrios Tanis (). +# 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) diff --git a/signage/models/signage_category.py b/signage/models/signage_category.py new file mode 100644 index 00000000000..be1315ecf2a --- /dev/null +++ b/signage/models/signage_category.py @@ -0,0 +1,36 @@ +# Copyright (C) 2025 Dimitrios Tanis (). +# 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", + ) diff --git a/signage/pyproject.toml b/signage/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/signage/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/signage/readme/CONTRIBUTORS.md b/signage/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..6747dfab010 --- /dev/null +++ b/signage/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Dimitrios Tanis \ diff --git a/signage/readme/DESCRIPTION.md b/signage/readme/DESCRIPTION.md new file mode 100644 index 00000000000..cb5e5d80949 --- /dev/null +++ b/signage/readme/DESCRIPTION.md @@ -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. diff --git a/signage/readme/USAGE.md b/signage/readme/USAGE.md new file mode 100644 index 00000000000..9e2b951a5d2 --- /dev/null +++ b/signage/readme/USAGE.md @@ -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. diff --git a/signage/security/ir.model.access.csv b/signage/security/ir.model.access.csv new file mode 100644 index 00000000000..8ac1cc52380 --- /dev/null +++ b/signage/security/ir.model.access.csv @@ -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 diff --git a/signage/static/description/icon.png b/signage/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/signage/static/description/icon.png differ diff --git a/signage/static/description/index.html b/signage/static/description/index.html new file mode 100644 index 00000000000..ffb926aa6c9 --- /dev/null +++ b/signage/static/description/index.html @@ -0,0 +1,439 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Signage

+ +

Beta License: AGPL-3 OCA/knowledge Translate me on Weblate Try me on Runboat

+

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

+ +
+

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. +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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Dimitrios Tanis
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/signage/views/signage_category_view.xml b/signage/views/signage_category_view.xml new file mode 100644 index 00000000000..17b4f69cc2b --- /dev/null +++ b/signage/views/signage_category_view.xml @@ -0,0 +1,53 @@ + + + + + signage.category.tree + signage.category + + + + + + + + + + + + + + signage.category.form + signage.category + +
+ + + + + + + + + + +
+
+
+ + + Signage Categories + ir.actions.act_window + signage.category + list,form + + + +
diff --git a/signage/views/signage_view.xml b/signage/views/signage_view.xml new file mode 100644 index 00000000000..a76e0362f7f --- /dev/null +++ b/signage/views/signage_view.xml @@ -0,0 +1,92 @@ + + + + + + + signage.tree + signage + + + + + + + + + + signage.form + signage + form + +
+ + + + + + + + + + + +
+
+
+ + + signage Kanban + signage + + + + + + + + + + + + + + + + + Signage + ir.actions.act_window + signage + kanban,list,form + + + +