diff --git a/beesdoo_product_info_screen/__init__.py b/beesdoo_product_info_screen/__init__.py index e69de29bb..087065725 100644 --- a/beesdoo_product_info_screen/__init__.py +++ b/beesdoo_product_info_screen/__init__.py @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/beesdoo_product_info_screen/__manifest__.py b/beesdoo_product_info_screen/__manifest__.py index 54ea74eb7..e9a96479a 100644 --- a/beesdoo_product_info_screen/__manifest__.py +++ b/beesdoo_product_info_screen/__manifest__.py @@ -1,23 +1,23 @@ -# Copyright 2021 Coop IT Easy SCRL fs -# Robin Keunen -# Houssine Bakkali -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +# SPDX-FileCopyrightText: 2022 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + { "name": "Product Information Screen", + "summary": """ + Emptied.""", "version": "12.0.0.0.1", "category": "Product", - "summary": "Adds a read-only screen to display product information", - "author": "Coop IT Easy SC", "website": "https://github.com/beescoop/Obeesdoo", + "author": "Coop IT Easy SC", + "maintainers": ["carmenbianca"], "license": "AGPL-3", - "depends": ["beesdoo_product"], - "data": [ - "security/groups.xml", - "security/ir.model.access.csv", - "security/ir_rules.xml", - "views/product.xml", - "views/menus.xml", - ], - "installable": True, "application": False, + "depends": [ + "product_info_screen", + ], + "excludes": [], + "data": [], + "demo": [], + "qweb": [], } diff --git a/beesdoo_product_info_screen/i18n/beesdoo_product_info_screen.pot b/beesdoo_product_info_screen/i18n/beesdoo_product_info_screen.pot deleted file mode 100644 index 10ac1ea32..000000000 --- a/beesdoo_product_info_screen/i18n/beesdoo_product_info_screen.pot +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * beesdoo_product_info_screen -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \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: beesdoo_product_info_screen -#: model_terms:ir.ui.view,arch_db:beesdoo_product_info_screen.view_product_information_read_only_form_button -msgid "Back to product list" -msgstr "" - -#. module: beesdoo_product_info_screen -#: model:res.groups,name:beesdoo_product_info_screen.group_product_info_user -msgid "Product Info User" -msgstr "" - -#. module: beesdoo_product_info_screen -#: model:ir.actions.act_window,name:beesdoo_product_info_screen.action_product_information -msgid "Product Information" -msgstr "" - -#. module: beesdoo_product_info_screen -#: model_terms:ir.ui.view,arch_db:beesdoo_product_info_screen.view_product_information_read_only_form -msgid "Product Name" -msgstr "" - -#. module: beesdoo_product_info_screen -#: model:ir.ui.menu,name:beesdoo_product_info_screen.menu_product_info -msgid "Product info" -msgstr "" - -#. module: beesdoo_product_info_screen -#: model:ir.ui.menu,name:beesdoo_product_info_screen.menu_main_product -#: model_terms:ir.ui.view,arch_db:beesdoo_product_info_screen.view_product_information_read_only_form -#: model_terms:ir.ui.view,arch_db:beesdoo_product_info_screen.view_product_information_read_only_tree -msgid "Products" -msgstr "" - diff --git a/beesdoo_product_info_screen/readme/CONTRIBUTORS.rst b/beesdoo_product_info_screen/readme/CONTRIBUTORS.rst index e90159c0a..f1ac67577 100644 --- a/beesdoo_product_info_screen/readme/CONTRIBUTORS.rst +++ b/beesdoo_product_info_screen/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ -* Robin Keunen -* Houssine Bakkali +* `Coop IT Easy SC `_: + + * Carmen Bianca BAKKER diff --git a/beesdoo_product_info_screen/readme/DESCRIPTION.rst b/beesdoo_product_info_screen/readme/DESCRIPTION.rst index 47252d0ef..916155003 100644 --- a/beesdoo_product_info_screen/readme/DESCRIPTION.rst +++ b/beesdoo_product_info_screen/readme/DESCRIPTION.rst @@ -1 +1 @@ -Adds a read-only screen to display product information. +Emptied. diff --git a/beesdoo_product_info_screen/README.rst b/product_info_screen/README.rst similarity index 85% rename from beesdoo_product_info_screen/README.rst rename to product_info_screen/README.rst index 2bcbd7ac2..4d7bfbf77 100644 --- a/beesdoo_product_info_screen/README.rst +++ b/product_info_screen/README.rst @@ -17,7 +17,7 @@ Product Information Screen :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github - :target: https://github.com/beescoop/Obeesdoo/tree/12.0/beesdoo_product_info_screen + :target: https://github.com/beescoop/Obeesdoo/tree/12.0/product_info_screen :alt: beescoop/Obeesdoo |badge1| |badge2| |badge3| @@ -42,7 +42,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -63,6 +63,6 @@ Contributors Maintainers ~~~~~~~~~~~ -This module is part of the `beescoop/Obeesdoo `_ project on GitHub. +This module is part of the `beescoop/Obeesdoo `_ project on GitHub. You are welcome to contribute. diff --git a/product_info_screen/__init__.py b/product_info_screen/__init__.py new file mode 100644 index 000000000..5e19cc19a --- /dev/null +++ b/product_info_screen/__init__.py @@ -0,0 +1 @@ +from .rename_beesdoo import rename_beesdoo diff --git a/product_info_screen/__manifest__.py b/product_info_screen/__manifest__.py new file mode 100644 index 000000000..db50b28c8 --- /dev/null +++ b/product_info_screen/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2021 Coop IT Easy SCRL fs +# Robin Keunen +# Houssine Bakkali +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Product Information Screen", + "version": "12.0.0.0.1", + "category": "Product", + "summary": "Adds a read-only screen to display product information", + "author": "Coop IT Easy SC", + "website": "https://github.com/beescoop/Obeesdoo", + "license": "AGPL-3", + "depends": ["beesdoo_product"], + "data": [ + "security/groups.xml", + "security/ir.model.access.csv", + "security/ir_rules.xml", + "views/product.xml", + "views/menus.xml", + ], + "installable": True, + "application": False, + "pre_init_hook": "rename_beesdoo", +} diff --git a/product_info_screen/i18n/beesdoo_product_info_screen.pot b/product_info_screen/i18n/beesdoo_product_info_screen.pot new file mode 100644 index 000000000..be961b918 --- /dev/null +++ b/product_info_screen/i18n/beesdoo_product_info_screen.pot @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_info_screen +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \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: product_info_screen +#: model_terms:ir.ui.view,arch_db:product_info_screen.view_product_information_read_only_form_button +msgid "Back to product list" +msgstr "" + +#. module: product_info_screen +#: model:res.groups,name:product_info_screen.group_product_info_user +msgid "Product Info User" +msgstr "" + +#. module: product_info_screen +#: model:ir.actions.act_window,name:product_info_screen.action_product_information +msgid "Product Information" +msgstr "" + +#. module: product_info_screen +#: model_terms:ir.ui.view,arch_db:product_info_screen.view_product_information_read_only_form +msgid "Product Name" +msgstr "" + +#. module: product_info_screen +#: model:ir.ui.menu,name:product_info_screen.menu_product_info +msgid "Product info" +msgstr "" + +#. module: product_info_screen +#: model:ir.ui.menu,name:product_info_screen.menu_main_product +#: model_terms:ir.ui.view,arch_db:product_info_screen.view_product_information_read_only_form +#: model_terms:ir.ui.view,arch_db:product_info_screen.view_product_information_read_only_tree +msgid "Products" +msgstr "" + diff --git a/product_info_screen/readme/CONTRIBUTORS.rst b/product_info_screen/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..e90159c0a --- /dev/null +++ b/product_info_screen/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Robin Keunen +* Houssine Bakkali diff --git a/product_info_screen/readme/DESCRIPTION.rst b/product_info_screen/readme/DESCRIPTION.rst new file mode 100644 index 000000000..47252d0ef --- /dev/null +++ b/product_info_screen/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Adds a read-only screen to display product information. diff --git a/beesdoo_product_info_screen/readme/USAGE.rst b/product_info_screen/readme/USAGE.rst similarity index 100% rename from beesdoo_product_info_screen/readme/USAGE.rst rename to product_info_screen/readme/USAGE.rst diff --git a/product_info_screen/rename_beesdoo.py b/product_info_screen/rename_beesdoo.py new file mode 100644 index 000000000..d84335fd1 --- /dev/null +++ b/product_info_screen/rename_beesdoo.py @@ -0,0 +1,45 @@ +# Copyright 2022 Coop IT Easy SC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +"""This module was previously beesdoo_product_info_screen before it was moved to +the OCA. beesdoo_product_info_screen is presently an empty module that depends +on this module. When this module is installed, it should convert all data from +the beesdoo_product_info_screen module to be useable by this module. +""" + +import logging + +_logger = logging.getLogger(__name__) + +OLD_MODULE_NAME = "beesdoo_product_info_screen" +NEW_MODULE_NAME = "product_info_screen" + + +def model_to_table(name): + return name.replace(".", "_") + + +def rename_beesdoo(cr): + cr.execute( + "SELECT id FROM ir_module_module " + "WHERE name=%s and state IN ('installed', 'to upgrade')", + (OLD_MODULE_NAME,), + ) + if not cr.fetchone(): + return + + from openupgradelib import openupgrade + + _logger.info( + "transferring ir_model_data from {} to {}".format( + OLD_MODULE_NAME, NEW_MODULE_NAME + ) + ) + openupgrade.logged_query( + cr, + """ + UPDATE ir_model_data SET module = %s + WHERE module = %s AND name NOT IN + (SELECT name FROM ir_model_data WHERE module = %s)""", + (NEW_MODULE_NAME, OLD_MODULE_NAME, NEW_MODULE_NAME), + ) diff --git a/beesdoo_product_info_screen/security/groups.xml b/product_info_screen/security/groups.xml similarity index 100% rename from beesdoo_product_info_screen/security/groups.xml rename to product_info_screen/security/groups.xml diff --git a/beesdoo_product_info_screen/security/ir.model.access.csv b/product_info_screen/security/ir.model.access.csv similarity index 100% rename from beesdoo_product_info_screen/security/ir.model.access.csv rename to product_info_screen/security/ir.model.access.csv diff --git a/beesdoo_product_info_screen/security/ir_rules.xml b/product_info_screen/security/ir_rules.xml similarity index 100% rename from beesdoo_product_info_screen/security/ir_rules.xml rename to product_info_screen/security/ir_rules.xml diff --git a/beesdoo_product_info_screen/static/description/icon.png b/product_info_screen/static/description/icon.png similarity index 100% rename from beesdoo_product_info_screen/static/description/icon.png rename to product_info_screen/static/description/icon.png diff --git a/beesdoo_product_info_screen/static/description/index.html b/product_info_screen/static/description/index.html similarity index 95% rename from beesdoo_product_info_screen/static/description/index.html rename to product_info_screen/static/description/index.html index c1d759e19..4328df741 100644 --- a/beesdoo_product_info_screen/static/description/index.html +++ b/product_info_screen/static/description/index.html @@ -367,7 +367,7 @@

Product Information Screen

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 beescoop/obeesdoo

+

Beta License: AGPL-3 beescoop/obeesdoo

Adds a read-only screen to display product information.

Table of contents

@@ -395,7 +395,7 @@

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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -415,7 +415,7 @@

Contributors

Maintainers

-

This module is part of the beescoop/obeesdoo project on GitHub.

+

This module is part of the beescoop/obeesdoo project on GitHub.

You are welcome to contribute.

diff --git a/beesdoo_product_info_screen/views/menus.xml b/product_info_screen/views/menus.xml similarity index 87% rename from beesdoo_product_info_screen/views/menus.xml rename to product_info_screen/views/menus.xml index ec8652bf3..02c05cb3e 100644 --- a/beesdoo_product_info_screen/views/menus.xml +++ b/product_info_screen/views/menus.xml @@ -10,7 +10,7 @@ id="menu_main_product" sequence="40" groups="group_product_info_user" - web_icon="beesdoo_product_info_screen,static/description/icon.png" + web_icon="product_info_screen,static/description/icon.png" />