diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index 0cd92cb..f8acfa2 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -38,6 +38,7 @@ "recording_tag", "recording_url_link", "recording_version", + "show_appearance_type", "show_place", "show_project", "show_project_access", diff --git a/Dockerfile b/Dockerfile index c11ea33..9a01f89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,7 @@ COPY recording_subgenre /mnt/extra-addons/recording_subgenre COPY recording_tag /mnt/extra-addons/recording_tag COPY recording_url_link /mnt/extra-addons/recording_url_link COPY recording_version /mnt/extra-addons/recording_version +COPY show_appearance_type /mnt/extra-addons/show_appearance_type COPY show_place /mnt/extra-addons/show_place COPY show_project /mnt/extra-addons/show_project COPY show_project_access /mnt/extra-addons/show_project_access diff --git a/show_appearance_type/README.rst b/show_appearance_type/README.rst new file mode 100644 index 0000000..01887e9 --- /dev/null +++ b/show_appearance_type/README.rst @@ -0,0 +1,34 @@ +Show Appearance Type +========================= + +Description +----------- + +The Appearance Types menu item is available to members of the group ``Project / Manager`` +through the ``Project / Configuration`` menu. + +It shows the list of Appearance Types. + +.. image:: static/description/show_appearance_type_list.png + +By clicking on a Appearance Types, the form view is opened. + +.. image:: static/description/show_appearance_type_form.png + +On project form view, a new field Appearance Type is showed + +.. image:: static/description/project_show_appearance_type.png + +Configuration +------------- + +No configuration required apart from module installation. + +Contributors +------------ +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) +* Komit (https://komit-consulting.com) + +More information +---------------- +* Meet us at https://bit.ly/numigi-com diff --git a/show_appearance_type/__init__.py b/show_appearance_type/__init__.py new file mode 100644 index 0000000..157e543 --- /dev/null +++ b/show_appearance_type/__init__.py @@ -0,0 +1,4 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/show_appearance_type/__manifest__.py b/show_appearance_type/__manifest__.py new file mode 100644 index 0000000..f93cc31 --- /dev/null +++ b/show_appearance_type/__manifest__.py @@ -0,0 +1,18 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +{ + "name": "Show Appearance Type", + "summary": "Add new object Show Appearance Type and new field Appearance Type on Project", + "version": "1.0.0", + "website": "https://bit.ly/numigi-com", + "author": "Numigi", + "maintainer": "Numigi", + "license": "LGPL-3", + "installable": True, + "depends": ["show_project"], + "data": [ + "security/ir.model.access.csv", + "views/project_project.xml", + "views/show_appearance_type.xml", + ], +} diff --git a/show_appearance_type/i18n/fr.po b/show_appearance_type/i18n/fr.po new file mode 100644 index 0000000..328d3f4 --- /dev/null +++ b/show_appearance_type/i18n/fr.po @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * show_appearance_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-29 19:09+0000\n" +"PO-Revision-Date: 2021-12-29 19:09+0000\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: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__active +msgid "Active" +msgstr "Actif" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_project_project__show_appearance_type_id +msgid "Appearance Type" +msgstr "Type d’affiche" + +#. module: show_appearance_type +#: model:ir.actions.act_window,name:show_appearance_type.show_appearance_type_action +#: model:ir.ui.menu,name:show_appearance_type.show_appearance_type_menu +msgid "Appearance Types" +msgstr "Types d’affiche" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__description +msgid "Description" +msgstr "Description" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__id +msgid "ID" +msgstr "ID" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: show_appearance_type +#: model:ir.model.fields,field_description:show_appearance_type.field_show_appearance_type__name +msgid "Name" +msgstr "Nom" + +#. module: show_appearance_type +#: model:ir.model,name:show_appearance_type.model_project_project +msgid "Project" +msgstr "Projet" + +#. module: show_appearance_type +#: model:ir.model,name:show_appearance_type.model_show_appearance_type +msgid "Show Appearance Type" +msgstr "Afficher le type d'affiche" diff --git a/show_appearance_type/models/__init__.py b/show_appearance_type/models/__init__.py new file mode 100644 index 0000000..0d5e68d --- /dev/null +++ b/show_appearance_type/models/__init__.py @@ -0,0 +1,5 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import project_project +from . import show_appearance_type diff --git a/show_appearance_type/models/project_project.py b/show_appearance_type/models/project_project.py new file mode 100644 index 0000000..255525a --- /dev/null +++ b/show_appearance_type/models/project_project.py @@ -0,0 +1,14 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ProjectProject(models.Model): + _inherit = "project.project" + + show_appearance_type_id = fields.Many2one( + "show.appearance.type", + "Appearance Type", + ondelete="restrict", + ) diff --git a/show_appearance_type/models/show_appearance_type.py b/show_appearance_type/models/show_appearance_type.py new file mode 100644 index 0000000..512c6e2 --- /dev/null +++ b/show_appearance_type/models/show_appearance_type.py @@ -0,0 +1,13 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class ShowAppearanceType(models.Model): + _name = "show.appearance.type" + _description = "Show Appearance Type" + + name = fields.Char(required=True) + description = fields.Text() + active = fields.Boolean(default=True) diff --git a/show_appearance_type/security/ir.model.access.csv b/show_appearance_type/security/ir.model.access.csv new file mode 100644 index 0000000..ed70ede --- /dev/null +++ b/show_appearance_type/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_show_appearance_type_user,name_show_appearance_type_user,model_show_appearance_type,project.group_project_user,1,0,0,0 +access_show_appearance_type_manager,name_show_appearance_type_manager,model_show_appearance_type,project.group_project_manager,1,1,1,1 diff --git a/show_appearance_type/static/description/icon.png b/show_appearance_type/static/description/icon.png new file mode 100644 index 0000000..92a86b1 Binary files /dev/null and b/show_appearance_type/static/description/icon.png differ diff --git a/show_appearance_type/static/description/project_show_appearance_type.png b/show_appearance_type/static/description/project_show_appearance_type.png new file mode 100644 index 0000000..ed98c2b Binary files /dev/null and b/show_appearance_type/static/description/project_show_appearance_type.png differ diff --git a/show_appearance_type/static/description/show_appearance_type_form.png b/show_appearance_type/static/description/show_appearance_type_form.png new file mode 100644 index 0000000..cfad3ce Binary files /dev/null and b/show_appearance_type/static/description/show_appearance_type_form.png differ diff --git a/show_appearance_type/static/description/show_appearance_type_list.png b/show_appearance_type/static/description/show_appearance_type_list.png new file mode 100644 index 0000000..fc68139 Binary files /dev/null and b/show_appearance_type/static/description/show_appearance_type_list.png differ diff --git a/show_appearance_type/tests/__init__.py b/show_appearance_type/tests/__init__.py new file mode 100644 index 0000000..9e6ec6f --- /dev/null +++ b/show_appearance_type/tests/__init__.py @@ -0,0 +1,4 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import test_show_appearance_type diff --git a/show_appearance_type/tests/test_show_appearance_type.py b/show_appearance_type/tests/test_show_appearance_type.py new file mode 100644 index 0000000..6fae58c --- /dev/null +++ b/show_appearance_type/tests/test_show_appearance_type.py @@ -0,0 +1,13 @@ +# © 2021 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo.tests.common import SavepointCase + + +class TestShowProject(SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_create_appearance_type(self): + self.env["show.appearance.type"].create({"name": "Test", "description": "Test"}) diff --git a/show_appearance_type/views/project_project.xml b/show_appearance_type/views/project_project.xml new file mode 100644 index 0000000..c48a53e --- /dev/null +++ b/show_appearance_type/views/project_project.xml @@ -0,0 +1,16 @@ + + + + + show.appearance.type.project.form + project.project + + 10 + + + + + + + + diff --git a/show_appearance_type/views/show_appearance_type.xml b/show_appearance_type/views/show_appearance_type.xml new file mode 100644 index 0000000..4cec7fc --- /dev/null +++ b/show_appearance_type/views/show_appearance_type.xml @@ -0,0 +1,58 @@ + + + + + show.appearance.type.view.search + show.appearance.type + + + + + + + + + + show.appearance.type.view.tree + show.appearance.type + + + + + + + + + + show.appearance.type.view.tree + show.appearance.type + +
+ + + + + + + + + +
+
+
+ + + Appearance Types + show.appearance.type + form + tree,form + + + + +