Skip to content

Commit

Permalink
[14.0][Add] digest: Migration Script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanakya-OSI authored and MiquelRForgeFlow committed Jul 12, 2021
1 parent df05e94 commit 19dfa45
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
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")
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']')
# 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

0 comments on commit 19dfa45

Please sign in to comment.