Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][Add] digest: Migration Script. #2804

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|delivery | |
+--------------------------------------------+-------------------------------------------------+
|digest | |
|digest | Done |
+--------------------------------------------+-------------------------------------------------+
|event | |
+--------------------------------------------+-------------------------------------------------+
Expand Down
10 changes: 5 additions & 5 deletions openupgrade_scripts/scripts/digest/14.0.1.1/noupdate_changes.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="digest_digest_default" model="digest.digest">
<field name="name">Your Odoo Periodic Digest</field>
<field name="next_run_date" eval="DateTime.now().strftime('%Y-%m-%d')"/>
<field name="periodicity">daily</field>
</record>
<!-- <record id="digest_digest_default" model="digest.digest">-->
<!-- <field name="name">Your Odoo Periodic Digest</field>-->
<!-- <field name="next_run_date" eval="DateTime.now().strftime('%Y-%m-%d')"/>-->
<!-- <field name="periodicity">daily</field>-->
<!-- </record>-->
</odoo>
8 changes: 8 additions & 0 deletions openupgrade_scripts/scripts/digest/14.0.1.1/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (C) 2021 Open Source Integrators
# 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, "digest", "14.0.1.1/noupdate_changes.xml")
MiquelRForgeFlow marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---Models in module 'digest'---
---Fields in module 'digest'---
digest / digest.digest / periodicity (selection) : selection_keys is now '['daily', 'monthly', 'quarterly', 'weekly']' ('['monthly', 'quarterly', 'weekly']')
MiquelRForgeFlow marked this conversation as resolved.
Show resolved Hide resolved
# NOTHING TO DO: New daily option available, but no need to change existing ones.

digest / digest.digest / template_id (many2one) : DEL relation: mail.template, required, req_default: function
digest / digest.tip / name (char) : NEW
# NOTHING TO DO

---XML records in module 'digest'---
NEW digest.tip: digest.digest_tip_digest_0 (noupdate)
NEW digest.tip: digest.digest_tip_digest_1 (noupdate)
NEW digest.tip: digest.digest_tip_digest_2 (noupdate)
NEW digest.tip: digest.digest_tip_digest_3 (noupdate)
NEW digest.tip: digest.digest_tip_digest_4 (noupdate)
DEL digest.tip: digest.digest_tip_mail_0
DEL digest.tip: digest.digest_tip_mail_1
DEL digest.tip: digest.digest_tip_mail_2
NEW ir.actions.act_window: digest.digest_tip_action
NEW ir.ui.menu: digest.digest_tip_menu
NEW ir.ui.view: digest.digest_mail_layout (noupdate)
NEW ir.ui.view: digest.digest_mail_main (noupdate)
NEW ir.ui.view: digest.digest_section_mobile (noupdate)
NEW ir.ui.view: digest.digest_tip_view_form
NEW ir.ui.view: digest.digest_tip_view_search
NEW ir.ui.view: digest.digest_tip_view_tree
NEW ir.ui.view: digest.digest_tool_kpi (noupdate)
DEL mail.template: digest.digest_mail_template
# NOTHING TO DO