odoo-addon-openupgrade-scripts 17.0.1.0.1.71__py3-none-any.whl → 17.0.1.0.1.73__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,6 +101,10 @@
101
101
  </table>
102
102
  </field>
103
103
  </record>
104
+ <record id="ir_cron_consolidate" model="ir.cron">
105
+ <!-- manually added -->
106
+ <field name="code">model._consolidate_cron()</field>
107
+ </record>
104
108
  <record id="mail_template_data_new_rank_reached" model="mail.template">
105
109
  <field name="body_html" type="html">
106
110
  <div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
@@ -0,0 +1,36 @@
1
+ # Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def update_tracking_date(env):
8
+ openupgrade.date_to_datetime_tz(
9
+ env.cr,
10
+ "gamification_karma_tracking",
11
+ "user_id",
12
+ openupgrade.get_legacy_name("tracking_date"),
13
+ "tracking_date",
14
+ )
15
+ openupgrade.logged_query(
16
+ env.cr,
17
+ f"""
18
+ UPDATE gamification_karma_tracking
19
+ SET tracking_date = create_date
20
+ WHERE {openupgrade.get_legacy_name("tracking_date")} IS NULL;
21
+ """,
22
+ )
23
+
24
+
25
+ @openupgrade.migrate()
26
+ def migrate(env, version):
27
+ update_tracking_date(env)
28
+ openupgrade.load_data(env, "gamification", "17.0.1.0/noupdate_changes.xml")
29
+ openupgrade.delete_record_translations(
30
+ env.cr,
31
+ "gamification",
32
+ [
33
+ "email_template_badge_received",
34
+ "mail_template_data_new_rank_reached",
35
+ ],
36
+ )
@@ -0,0 +1,45 @@
1
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+ from openupgradelib import openupgrade
4
+
5
+ _xmlid_renames = [
6
+ (
7
+ "gamification.ir_cron_consolidate_last_month",
8
+ "gamification.ir_cron_consolidate",
9
+ )
10
+ ]
11
+
12
+
13
+ def new_tracking_fields(env):
14
+ openupgrade.logged_query(
15
+ env.cr,
16
+ """
17
+ ALTER TABLE gamification_karma_tracking
18
+ ADD COLUMN IF NOT EXISTS origin_ref varchar;
19
+ UPDATE gamification_karma_tracking
20
+ SET origin_ref = 'res.users,' || create_uid;
21
+ """,
22
+ )
23
+ openupgrade.logged_query(
24
+ env.cr,
25
+ """
26
+ ALTER TABLE gamification_karma_tracking
27
+ ADD COLUMN IF NOT EXISTS origin_ref_model_name varchar;
28
+ UPDATE gamification_karma_tracking
29
+ SET origin_ref_model_name = 'res.users';
30
+ """,
31
+ )
32
+
33
+
34
+ @openupgrade.migrate()
35
+ def migrate(env, version):
36
+ openupgrade.rename_xmlids(env.cr, _xmlid_renames)
37
+ openupgrade.copy_columns(
38
+ env.cr,
39
+ {
40
+ "gamification_karma_tracking": [
41
+ ("tracking_date", None, None),
42
+ ]
43
+ },
44
+ )
45
+ new_tracking_fields(env)
@@ -0,0 +1,37 @@
1
+ ---Models in module 'gamification'---
2
+ ---Fields in module 'gamification'---
3
+ gamification / gamification.badge / message_main_attachment_id (many2one): DEL relation: ir.attachment
4
+ gamification / gamification.challenge / message_main_attachment_id (many2one): DEL relation: ir.attachment
5
+ # NOTHING TO DO: feature removed
6
+
7
+ gamification / gamification.challenge / report_message_group_id (many2one): relation is now 'discuss.channel' ('mail.channel') [nothing to do]
8
+ # NOTHING TO DO: done in mail module
9
+
10
+ gamification / gamification.karma.tracking / _order : _order is now 'tracking_date desc, id desc' ('tracking_date DESC')
11
+ gamification / gamification.karma.tracking / gain (integer) : NEW hasdefault: compute
12
+ # NOTHING TO DO: non-stored fields
13
+
14
+ gamification / gamification.karma.tracking / origin_ref (reference) : NEW hasdefault: default
15
+ gamification / gamification.karma.tracking / origin_ref_model_name (selection): NEW selection_keys: function, isfunction: function, stored
16
+ # DONE: pre-migration: filled with create_uid
17
+
18
+ gamification / gamification.karma.tracking / reason (text) : NEW hasdefault: default
19
+ # NOTHING TO DO: let's use default one. Should we create/fill in pre-migration too?
20
+
21
+ gamification / gamification.karma.tracking / tracking_date (date) : type is now 'datetime' ('date')
22
+ # DONE: post-migration: set to datetime using user_id timezone (and fill missing ones with create_date)
23
+
24
+ ---XML records in module 'gamification'---
25
+ NEW gamification.karma.tracking: gamification.karma_tracking_user_admin (noupdate)
26
+ NEW gamification.karma.tracking: gamification.karma_tracking_user_root (noupdate)
27
+ # NOTHING TO DO: New noupdate="1" records
28
+
29
+ NEW ir.cron: gamification.ir_cron_consolidate (noupdate)
30
+ DEL ir.cron: gamification.ir_cron_consolidate_last_month (noupdate)
31
+ # DONE: pre-migration: XML-ID renamed
32
+
33
+ NEW ir.model.access: gamification.gamification_karma_rank_access_employee
34
+ NEW ir.model.access: gamification.gamification_karma_rank_access_portal
35
+ NEW ir.model.access: gamification.gamification_karma_rank_access_public
36
+ DEL ir.model.access: gamification.gamification_karma_rank_access_all
37
+ # NOTHING TO DO: new feature
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 17.0.1.0.1.71
3
+ Version: 17.0.1.0.1.73
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo>=17.0a,<17.1dev
6
6
  Requires-Dist: openupgradelib
@@ -98,8 +98,11 @@ odoo/addons/openupgrade_scripts/scripts/event_sms/17.0.1.0/noupdate_changes.xml,
98
98
  odoo/addons/openupgrade_scripts/scripts/event_sms/17.0.1.0/upgrade_analysis.txt,sha256=pnGaVYE8aFEgrU4s_krQnKOo6SP1RrkO7AcMnjAJDt8,150
99
99
  odoo/addons/openupgrade_scripts/scripts/fleet/17.0.0.1/upgrade_analysis.txt,sha256=c7bQPAHj7d_apltC_ufIfe_HDuKMIFaOIbb1Q1xnY58,2652
100
100
  odoo/addons/openupgrade_scripts/scripts/fleet/17.0.0.1/upgrade_analysis_work.txt,sha256=EQwagAf8iOiCBWR5kD-ndWIQiHbwmFW7L50T6lYY6x8,2716
101
- odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/noupdate_changes.xml,sha256=hpyPZKPTOBzQGm8fTMLxw-mb6LCxiG78ZvvNQ796JLc,10428
101
+ odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/noupdate_changes.xml,sha256=HtAC9KbtDedpru2qov3fIayeJWJCTpb_4MP4_UJCt8A,10577
102
+ odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/post-migration.py,sha256=KxHp3F0fclRhpnQ9YE3loEt56gQ5Xrd0FAb0ONmUFDo,1004
103
+ odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/pre-migration.py,sha256=B_XVQfLmSZ_QhE1tQa7HQLd5HBwarPPJpaBs6sqFezU,1194
102
104
  odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/upgrade_analysis.txt,sha256=uQ615j87AWn7vqb0D6D72iGJPuHJFm9vx8iasz-jKT4,1754
105
+ odoo/addons/openupgrade_scripts/scripts/gamification/17.0.1.0/upgrade_analysis_work.txt,sha256=KnqT7LdAWSzx4owg-HyZlHeFTEUFi_vm77y8SxXVt4I,2210
103
106
  odoo/addons/openupgrade_scripts/scripts/google_account/17.0.1.0/upgrade_analysis.txt,sha256=hiDG-xTUfbSEAoh1Of3lwHn5UyurLiFn_7cWUcr_MG8,165
104
107
  odoo/addons/openupgrade_scripts/scripts/google_calendar/17.0.1.0/upgrade_analysis.txt,sha256=nQfV_h_moxZ00umo8nRUiUoJaWiASy-cflfLoTDQBIE,377
105
108
  odoo/addons/openupgrade_scripts/scripts/google_gmail/17.0.1.2/upgrade_analysis.txt,sha256=az3DyzT1W7a0qBw78ZDiO5mC3K2ESONVyPJwtakQgIU,296
@@ -539,7 +542,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
539
542
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
540
543
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
541
544
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
542
- odoo_addon_openupgrade_scripts-17.0.1.0.1.71.dist-info/METADATA,sha256=bKaSHjGSG6TElhjSo8CrAFMdyFP1viP_MVAFL9Pkx7I,3785
543
- odoo_addon_openupgrade_scripts-17.0.1.0.1.71.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
544
- odoo_addon_openupgrade_scripts-17.0.1.0.1.71.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
545
- odoo_addon_openupgrade_scripts-17.0.1.0.1.71.dist-info/RECORD,,
545
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.73.dist-info/METADATA,sha256=MmFRZyNp4HN8nUcaO9229a9Jc8XMUAea9s4kqmbUKMc,3785
546
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.73.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
547
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.73.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
548
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.73.dist-info/RECORD,,