[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
This commit is contained in:
@@ -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': {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
|
||||
<record id="forum_help" model="forum.forum">
|
||||
<field name="name">Help</field>
|
||||
<field name="description">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.</field>
|
||||
</record>
|
||||
|
||||
</data></odoo>
|
||||
-20
@@ -1,26 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Tag -->
|
||||
<record id="tags_0" model="forum.tag">
|
||||
<field name="name">Contract</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_1" model="forum.tag">
|
||||
<field name="name">Action</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_2" model="forum.tag">
|
||||
<field name="name">ecommerce</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_3" model="forum.tag">
|
||||
<field name="name">Development</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
|
||||
<!-- Questions -->
|
||||
<record id="question_0" model="forum.post">
|
||||
<field name="name">How to configure alerts for employee contract expiration</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
-29
@@ -1,35 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="forum_help" model="forum.forum">
|
||||
<field name="name">Help</field>
|
||||
<field name="description">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.</field>
|
||||
</record>
|
||||
|
||||
<record id="menu_website_forums" model="website.menu">
|
||||
<field name="name">Forum</field>
|
||||
<field name="url">/forum</field>
|
||||
<field name="parent_id" ref="website.main_menu"/>
|
||||
<field name="sequence" type="int">35</field>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<function model="ir.config_parameter" name="set_param" eval="('auth_signup.invitation_scope', 'b2c')"/>
|
||||
|
||||
<!-- JUMP TO FORUM AT INSTALL -->
|
||||
<record id="action_open_forum" model="ir.actions.act_url">
|
||||
<field name="name">Forum</field>
|
||||
<field name="target">self</field>
|
||||
<field name="url" eval="'/forum/'+str(ref('website_forum.forum_help'))"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_open_forum"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
<!-- Reasons for closing Post -->
|
||||
<record id="reason_1" model="forum.post.reason">
|
||||
<field name="name">Duplicate post</field>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data>
|
||||
<!-- Tag -->
|
||||
<record id="tags_0" model="forum.tag">
|
||||
<field name="name">Contract</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_1" model="forum.tag">
|
||||
<field name="name">Action</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_2" model="forum.tag">
|
||||
<field name="name">ecommerce</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
<record id="tags_3" model="forum.tag">
|
||||
<field name="name">Development</field>
|
||||
<field name="forum_id" ref="website_forum.forum_help"/>
|
||||
</record>
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
<!-- JUMP TO FORUM AT INSTALL -->
|
||||
<record id="action_open_forum" model="ir.actions.act_url">
|
||||
<field name="name">Forum</field>
|
||||
<field name="target">self</field>
|
||||
<field name="url" eval="'/forum/'+str(ref('website_forum.forum_help'))"/>
|
||||
</record>
|
||||
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_open_forum"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
<function model="ir.config_parameter" name="set_param" eval="('auth_signup.invitation_scope', 'b2c')"/>
|
||||
</data></odoo>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo><data noupdate="1">
|
||||
<record id="menu_website_forums" model="website.menu">
|
||||
<field name="name">Forum</field>
|
||||
<field name="url">/forum</field>
|
||||
<field name="parent_id" ref="website.main_menu"/>
|
||||
<field name="sequence" type="int">35</field>
|
||||
</record>
|
||||
</data></odoo>
|
||||
Reference in New Issue
Block a user