From 00a626deb85b6dba7d13770dd3b8ccf39f4eb90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 9 Mar 2023 16:14:53 +0000 Subject: [PATCH] [MOV] website_forum: move, split and rename data files PURPOSE Reorganize website_forum module. This allows to better locate code, understand organization, and prepare future changes. SPECIFICATIONS Split data files / model. It is easier to have a global view of a module organization and content. It also allows to see technical data impacted by the module installation (like ir_actions, mail_message_subtypes, ...) Task-3240082 (Forum: Reorganize and lint module) Part-of: odoo/odoo#114841 --- addons/website_forum/__manifest__.py | 22 +++++++++----- .../website_forum/data/forum_forum_data.xml | 9 ++++++ ...t_faq.xml => forum_forum_template_faq.xml} | 0 .../{forum_demo.xml => forum_post_demo.xml} | 20 ------------- ...um_data.xml => forum_post_reason_data.xml} | 29 ------------------- addons/website_forum/data/forum_tag_demo.xml | 20 +++++++++++++ ...xml => gamification_badge_data_answer.xml} | 0 ...=> gamification_badge_data_moderation.xml} | 0 ...gamification_badge_data_participation.xml} | 0 ...l => gamification_badge_data_question.xml} | 0 addons/website_forum/data/ir_actions_data.xml | 14 +++++++++ .../data/ir_config_parameter_data.xml | 4 +++ .../website_forum/data/website_menu_data.xml | 9 ++++++ 13 files changed, 71 insertions(+), 56 deletions(-) create mode 100644 addons/website_forum/data/forum_forum_data.xml rename addons/website_forum/data/{forum_default_faq.xml => forum_forum_template_faq.xml} (100%) rename addons/website_forum/data/{forum_demo.xml => forum_post_demo.xml} (87%) rename addons/website_forum/data/{forum_data.xml => forum_post_reason_data.xml} (66%) create mode 100644 addons/website_forum/data/forum_tag_demo.xml rename addons/website_forum/data/{badges_answer.xml => gamification_badge_data_answer.xml} (100%) rename addons/website_forum/data/{badges_moderation.xml => gamification_badge_data_moderation.xml} (100%) rename addons/website_forum/data/{badges_participation.xml => gamification_badge_data_participation.xml} (100%) rename addons/website_forum/data/{badges_question.xml => gamification_badge_data_question.xml} (100%) create mode 100644 addons/website_forum/data/ir_actions_data.xml create mode 100644 addons/website_forum/data/ir_config_parameter_data.xml create mode 100644 addons/website_forum/data/website_menu_data.xml diff --git a/addons/website_forum/__manifest__.py b/addons/website_forum/__manifest__.py index 84b315f51ff..adf6ad57eb6 100644 --- a/addons/website_forum/__manifest__.py +++ b/addons/website_forum/__manifest__.py @@ -17,10 +17,15 @@ Ask questions, get answers, no distractions 'website_profile', ], 'data': [ - 'data/forum_default_faq.xml', - 'data/forum_data.xml', + 'data/ir_config_parameter_data.xml', + 'data/forum_forum_template_faq.xml', + 'data/forum_forum_data.xml', + 'data/forum_post_reason_data.xml', + 'data/ir_actions_data.xml', 'data/mail_message_subtype_data.xml', 'data/mail_templates.xml', + 'data/website_menu_data.xml', + 'views/forum.xml', 'views/res_users_views.xml', 'views/website_forum.xml', @@ -30,15 +35,18 @@ Ask questions, get answers, no distractions 'views/website_pages_views.xml', 'views/forum_forum_add.xml', 'views/gamification_karma_tracking_views.xml', + 'security/ir.model.access.csv', 'security/website_forum_security.xml', - 'data/badges_question.xml', - 'data/badges_answer.xml', - 'data/badges_participation.xml', - 'data/badges_moderation.xml', + + 'data/gamification_badge_data_question.xml', + 'data/gamification_badge_data_answer.xml', + 'data/gamification_badge_data_participation.xml', + 'data/gamification_badge_data_moderation.xml', ], 'demo': [ - 'data/forum_demo.xml', + 'data/forum_tag_demo.xml', + 'data/forum_post_demo.xml', ], 'installable': True, 'assets': { diff --git a/addons/website_forum/data/forum_forum_data.xml b/addons/website_forum/data/forum_forum_data.xml new file mode 100644 index 00000000000..00866b0f7d7 --- /dev/null +++ b/addons/website_forum/data/forum_forum_data.xml @@ -0,0 +1,9 @@ + + + + + Help + This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together. + + + diff --git a/addons/website_forum/data/forum_default_faq.xml b/addons/website_forum/data/forum_forum_template_faq.xml similarity index 100% rename from addons/website_forum/data/forum_default_faq.xml rename to addons/website_forum/data/forum_forum_template_faq.xml diff --git a/addons/website_forum/data/forum_demo.xml b/addons/website_forum/data/forum_post_demo.xml similarity index 87% rename from addons/website_forum/data/forum_demo.xml rename to addons/website_forum/data/forum_post_demo.xml index 29643f01dfa..3f6d4e07f38 100644 --- a/addons/website_forum/data/forum_demo.xml +++ b/addons/website_forum/data/forum_post_demo.xml @@ -1,26 +1,6 @@ - - - - Contract - - - - Action - - - - ecommerce - - - - Development - - - - How to configure alerts for employee contract expiration diff --git a/addons/website_forum/data/forum_data.xml b/addons/website_forum/data/forum_post_reason_data.xml similarity index 66% rename from addons/website_forum/data/forum_data.xml rename to addons/website_forum/data/forum_post_reason_data.xml index 888b96ed327..89c7e13e9aa 100644 --- a/addons/website_forum/data/forum_data.xml +++ b/addons/website_forum/data/forum_post_reason_data.xml @@ -1,35 +1,6 @@ - - Help - This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together. - - - - Forum - /forum - - 35 - - - - - - - - Forum - self - - - - - - - - open - - Duplicate post diff --git a/addons/website_forum/data/forum_tag_demo.xml b/addons/website_forum/data/forum_tag_demo.xml new file mode 100644 index 00000000000..e7c639a5c94 --- /dev/null +++ b/addons/website_forum/data/forum_tag_demo.xml @@ -0,0 +1,20 @@ + + + + + Contract + + + + Action + + + + ecommerce + + + + Development + + + diff --git a/addons/website_forum/data/badges_answer.xml b/addons/website_forum/data/gamification_badge_data_answer.xml similarity index 100% rename from addons/website_forum/data/badges_answer.xml rename to addons/website_forum/data/gamification_badge_data_answer.xml diff --git a/addons/website_forum/data/badges_moderation.xml b/addons/website_forum/data/gamification_badge_data_moderation.xml similarity index 100% rename from addons/website_forum/data/badges_moderation.xml rename to addons/website_forum/data/gamification_badge_data_moderation.xml diff --git a/addons/website_forum/data/badges_participation.xml b/addons/website_forum/data/gamification_badge_data_participation.xml similarity index 100% rename from addons/website_forum/data/badges_participation.xml rename to addons/website_forum/data/gamification_badge_data_participation.xml diff --git a/addons/website_forum/data/badges_question.xml b/addons/website_forum/data/gamification_badge_data_question.xml similarity index 100% rename from addons/website_forum/data/badges_question.xml rename to addons/website_forum/data/gamification_badge_data_question.xml diff --git a/addons/website_forum/data/ir_actions_data.xml b/addons/website_forum/data/ir_actions_data.xml new file mode 100644 index 00000000000..00280ad95af --- /dev/null +++ b/addons/website_forum/data/ir_actions_data.xml @@ -0,0 +1,14 @@ + + + + + Forum + self + + + + + + open + + diff --git a/addons/website_forum/data/ir_config_parameter_data.xml b/addons/website_forum/data/ir_config_parameter_data.xml new file mode 100644 index 00000000000..541f4c1526f --- /dev/null +++ b/addons/website_forum/data/ir_config_parameter_data.xml @@ -0,0 +1,4 @@ + + + + diff --git a/addons/website_forum/data/website_menu_data.xml b/addons/website_forum/data/website_menu_data.xml new file mode 100644 index 00000000000..dd424b09d56 --- /dev/null +++ b/addons/website_forum/data/website_menu_data.xml @@ -0,0 +1,9 @@ + + + + Forum + /forum + + 35 + +