Skip to content

Commit

Permalink
[MIG] website_forum
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Jun 22, 2022
1 parent 7527e70 commit cdceb30
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|website_form_project | |
+--------------------------------------------+-------------------------------------------------+
|website_forum | |
|website_forum | Done |
+--------------------------------------------+-------------------------------------------------+
| |del| website_gengo | |
+--------------------------------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,115 +2,115 @@
<odoo>
<record id="challenge_chief_commentator" model="gamification.challenge">
<field name="reward_id" ref="badge_p_4"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_commentator" model="gamification.challenge">
<field name="reward_id" ref="badge_p_2"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_configure_profile" model="gamification.challenge">
<field name="reward_id" ref="badge_p_1"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_critic" model="gamification.challenge">
<field name="reward_id" ref="badge_5"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_disciplined" model="gamification.challenge">
<field name="reward_id" ref="badge_6"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_editor" model="gamification.challenge">
<field name="reward_id" ref="badge_7"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_enlightened" model="gamification.challenge">
<field name="reward_id" ref="badge_a_5"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_famous_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_3"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_favorite_question_1" model="gamification.challenge">
<field name="reward_id" ref="badge_q_4"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_favorite_question_5" model="gamification.challenge">
<field name="reward_id" ref="badge_q_5"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_good_answer" model="gamification.challenge">
<field name="reward_id" ref="badge_a_3"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_good_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_9"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_great_answer" model="gamification.challenge">
<field name="reward_id" ref="badge_a_4"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_great_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_10"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_guru" model="gamification.challenge">
<field name="reward_id" ref="badge_a_6"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_nice_answer" model="gamification.challenge">
<field name="reward_id" ref="badge_a_2"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_nice_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_8"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_notable_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_2"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_peer_pressure" model="gamification.challenge">
<field name="reward_id" ref="badge_23"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_popular_question" model="gamification.challenge">
<field name="reward_id" ref="badge_q_1"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_pundit" model="gamification.challenge">
<field name="reward_id" ref="badge_25"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_scholar" model="gamification.challenge">
<field name="reward_id" ref="badge_26"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_self_learner" model="gamification.challenge">
<field name="reward_id" ref="badge_a_8"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_stellar_question_25" model="gamification.challenge">
<field name="reward_id" ref="badge_q_6"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_student" model="gamification.challenge">
<field name="reward_id" ref="badge_q_7"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_supporter" model="gamification.challenge">
<field name="reward_id" ref="badge_31"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_taxonomist" model="gamification.challenge">
<field name="reward_id" ref="badge_32"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="challenge_teacher" model="gamification.challenge">
<field name="reward_id" ref="badge_a_1"/>
<field name="challenge_category">forum</field>
<!-- <field name="challenge_category">forum</field>-->
</record>
<record id="definition_commentator" model="gamification.goal.definition">
<field name="batch_distinctive_field" ref="mail.field_mail_message__author_id"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env.cr, "website_forum", "14.0.1.0/noupdate_changes.xml")
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade

_field_renames = [
(
"gamification.challenge",
"gamification_challenge",
"category",
"challenge_category",
),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---Models in module 'website_forum'---
---Fields in module 'website_forum'---
website_forum / forum.forum / authorized_group_id (many2one): NEW relation: res.groups
website_forum / forum.forum / menu_id (many2one) : NEW relation: website.menu
website_forum / forum.forum / privacy (selection) : NEW selection_keys: ['connected', 'private', 'public'], hasdefault
# NOTHING TO DO: new features

website_forum / forum.forum / teaser (text) : NEW isfunction: function, stored
website_forum / forum.forum / seo_name (char) : NEW
website_forum / forum.post / seo_name (char) : NEW
website_forum / forum.tag / seo_name (char) : NEW
# NOTHING TO DO: new features

website_forum / forum.post.reason / reason_type (char) : selection_keys is now '['basic', 'offensive']' ('False')
website_forum / forum.post.reason / reason_type (char) : type is now 'selection' ('char')
# NOTHING TO DO

website_forum / gamification.challenge / category (False) : DEL selection_keys: ['certification', 'forum', 'hr', 'other'], mode: modify
website_forum / gamification.challenge / challenge_category (False) : NEW selection_keys: ['certification', 'forum', 'hr', 'other'], mode: modify
# DONE: pre-migration: renamed field

website_forum / website / forums_count (integer) : is now stored
website_forum / website / forums_count (integer) : not a function anymore
# NOTHING TO DO: will be automatically filled

---XML records in module 'website_forum'---
NEW ir.actions.act_window: website_forum.action_forum_favorites
NEW ir.actions.act_window: website_forum.action_forum_posts
NEW ir.actions.act_window: website_forum.forum_post_reasons_action
NEW ir.rule: website_forum.website_forum_connected (noupdate)
NEW ir.rule: website_forum.website_forum_connected_post (noupdate)
NEW ir.rule: website_forum.website_forum_connected_tag (noupdate)
NEW ir.rule: website_forum.website_forum_create_website_designer (noupdate)
NEW ir.rule: website_forum.website_forum_private (noupdate)
NEW ir.rule: website_forum.website_forum_private_post (noupdate)
NEW ir.rule: website_forum.website_forum_private_tag (noupdate)
NEW ir.rule: website_forum.website_forum_public (noupdate)
NEW ir.rule: website_forum.website_forum_public_post (noupdate)
NEW ir.rule: website_forum.website_forum_public_tag (noupdate)
NEW ir.ui.menu: website_forum.menu_forum_badges
NEW ir.ui.menu: website_forum.menu_forum_post_reasons
NEW ir.ui.view: website_forum.default_faq
NEW ir.ui.view: website_forum.faq_karma
NEW ir.ui.view: website_forum.forum_filter_tag
NEW ir.ui.view: website_forum.forum_post_options
NEW ir.ui.view: website_forum.forum_post_reason_view_list
NEW ir.ui.view: website_forum.opt_last_post
NEW ir.ui.view: website_forum.opt_list_view
NEW ir.ui.view: website_forum.opt_post_count
# NOTHING TO DO: new features

0 comments on commit cdceb30

Please sign in to comment.