odoo-addon-openupgrade-scripts 17.0.1.0.1.69__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
@@ -0,0 +1,14 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2
+ from openupgradelib import openupgrade
3
+
4
+
5
+ def _discuss_channel_computation(env):
6
+ rating_last_discuss = (
7
+ env["discuss.channel"].with_context(active_test=False).search([])
8
+ )
9
+ rating_last_discuss._compute_rating_last_value()
10
+
11
+
12
+ @openupgrade.migrate()
13
+ def migrate(env, version):
14
+ _discuss_channel_computation(env)
@@ -0,0 +1,18 @@
1
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
2
+
3
+ from openupgradelib import openupgrade
4
+
5
+
6
+ @openupgrade.migrate()
7
+ def migrate(env, version):
8
+ openupgrade.load_data(env, "im_livechat", "17.0.1.0/noupdate_changes.xml")
9
+ openupgrade.delete_record_translations(
10
+ env.cr,
11
+ "im_livechat",
12
+ [
13
+ "livechat_email_template",
14
+ ],
15
+ )
16
+ openupgrade.delete_records_safely_by_xml_id(
17
+ env, ["im_livechat.im_livechat_rule_manager_read_all_mail_channel"]
18
+ )
@@ -0,0 +1,26 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2
+ from openupgradelib import openupgrade
3
+
4
+
5
+ def _discuss_channel_create_column(env):
6
+ openupgrade.logged_query(
7
+ env.cr,
8
+ """
9
+ ALTER TABLE discuss_channel
10
+ ADD COLUMN IF NOT EXISTS rating_last_value NUMERIC;
11
+ """,
12
+ )
13
+
14
+
15
+ @openupgrade.migrate()
16
+ def migrate(env, version):
17
+ _discuss_channel_create_column(env)
18
+ # cannot use openupgrade.delete_sql_constraint_safely
19
+ openupgrade.logged_query(
20
+ env.cr,
21
+ """ALTER TABLE discuss_channel
22
+ DROP CONSTRAINT IF EXISTS mail_channel_livechat_operator_id""",
23
+ )
24
+ openupgrade.delete_records_safely_by_xml_id(
25
+ env, ["im_livechat.constraint_mail_channel_livechat_operator_id"]
26
+ )
@@ -0,0 +1,86 @@
1
+ ---Models in module 'im_livechat'---
2
+ # NOTHING TO DO
3
+
4
+ ---Fields in module 'im_livechat'---
5
+ im_livechat / chatbot.message / discuss_channel_id (many2one) : NEW relation: discuss.channel, required
6
+ im_livechat / chatbot.message / mail_channel_id (many2one) : DEL relation: mail.channel, required
7
+ im_livechat / discuss.channel / anonymous_name (char) : NEW
8
+ im_livechat / discuss.channel / channel_type (False) : NEW selection_keys: ['channel', 'chat', 'group', 'livechat'], mode: modify
9
+ im_livechat / discuss.channel / chatbot_current_step_id (many2one): NEW relation: chatbot.script.step
10
+ im_livechat / discuss.channel / chatbot_message_ids (one2many): NEW relation: chatbot.message
11
+ im_livechat / discuss.channel / country_id (many2one) : NEW relation: res.country
12
+ im_livechat / discuss.channel / livechat_active (boolean) : NEW
13
+ im_livechat / discuss.channel / livechat_channel_id (many2one): NEW relation: im_livechat.channel
14
+ im_livechat / discuss.channel / livechat_operator_id (many2one): NEW relation: res.partner
15
+ # NOTHING TO DO
16
+
17
+ im_livechat / discuss.channel / rating_last_value (float) : NEW isfunction: function, stored
18
+ # DONE create column in pre-migration and compute using orm in end-migration
19
+
20
+ im_livechat / im_livechat.channel / channel_ids (one2many) : relation is now 'discuss.channel' ('mail.channel') [nothing to do]
21
+ im_livechat / mail.channel / anonymous_name (char) : DEL
22
+ im_livechat / mail.channel / channel_type (False) : DEL selection_keys: ['channel', 'chat', 'group', 'livechat'], mode: modify
23
+ im_livechat / mail.channel / chatbot_current_step_id (many2one): DEL relation: chatbot.script.step
24
+ im_livechat / mail.channel / chatbot_message_ids (one2many): DEL relation: chatbot.message
25
+ im_livechat / mail.channel / country_id (many2one) : DEL relation: res.country
26
+ im_livechat / mail.channel / livechat_active (boolean) : DEL
27
+ im_livechat / mail.channel / livechat_channel_id (many2one): DEL relation: im_livechat.channel
28
+ im_livechat / mail.channel / livechat_operator_id (many2one): DEL relation: res.partner
29
+ im_livechat / mail.channel / rating_ids (one2many) : DEL relation: rating.rating
30
+ im_livechat / mail.channel / rating_last_value (float) : DEL
31
+ im_livechat / res.users / livechat_username (char) : not stored anymore
32
+ im_livechat / res.users / livechat_username (char) : now a function
33
+ im_livechat / res.users.settings / livechat_lang_ids (many2many) : NEW relation: res.lang
34
+ im_livechat / res.users.settings / livechat_username (char) : NEW
35
+ # NOTHING TO DO
36
+
37
+ ---XML records in module 'im_livechat'---
38
+ NEW ir.actions.act_window: im_livechat.discuss_channel_action
39
+ NEW ir.actions.act_window: im_livechat.discuss_channel_action_from_livechat_channel
40
+ DEL ir.actions.act_window: im_livechat.im_livechat_canned_response_action
41
+ DEL ir.actions.act_window: im_livechat.mail_channel_action
42
+ DEL ir.actions.act_window: im_livechat.mail_channel_action_from_livechat_channel
43
+ NEW ir.actions.act_window.view: im_livechat.discuss_channel_action_form
44
+ NEW ir.actions.act_window.view: im_livechat.discuss_channel_action_livechat_form
45
+ NEW ir.actions.act_window.view: im_livechat.discuss_channel_action_livechat_tree
46
+ NEW ir.actions.act_window.view: im_livechat.discuss_channel_action_tree
47
+ NEW ir.actions.act_window.view: im_livechat.rating_rating_action_livechat_view_tree
48
+ DEL ir.actions.act_window.view: im_livechat.mail_channel_action_form
49
+ DEL ir.actions.act_window.view: im_livechat.mail_channel_action_livechat_form
50
+ DEL ir.actions.act_window.view: im_livechat.mail_channel_action_livechat_tree
51
+ DEL ir.actions.act_window.view: im_livechat.mail_channel_action_tree
52
+ NEW ir.model.access: im_livechat.access_livechat_channel_employee
53
+ NEW ir.model.access: im_livechat.access_livechat_channel_portal
54
+ NEW ir.model.access: im_livechat.access_livechat_channel_public
55
+ NEW ir.model.access: im_livechat.access_livechat_channel_rule_employee
56
+ NEW ir.model.access: im_livechat.access_livechat_channel_rule_portal
57
+ NEW ir.model.access: im_livechat.access_livechat_channel_rule_public
58
+ DEL ir.model.access: im_livechat.access_chatbot_message_all
59
+ DEL ir.model.access: im_livechat.access_chatbot_script
60
+ DEL ir.model.access: im_livechat.access_chatbot_script_step
61
+ DEL ir.model.access: im_livechat.access_livechat_channel
62
+ DEL ir.model.access: im_livechat.access_livechat_channel_rule
63
+ # NOTHING TO DO
64
+
65
+ NEW ir.model.constraint: im_livechat.constraint_discuss_channel_livechat_operator_id
66
+ DEL ir.model.constraint: im_livechat.constraint_mail_channel_livechat_operator_id
67
+ # DONE: pre-migration: deleted safely old constraint (we don't have renaming mechanism)
68
+
69
+ NEW ir.rule: im_livechat.ir_rule_discuss_channel_group_im_livechat_group_manager (noupdate)
70
+ NEW ir.rule: im_livechat.ir_rule_discuss_channel_member_group_im_livechat_group_manager (noupdate)
71
+ # NOTHING TO DO
72
+
73
+ DEL ir.rule: im_livechat.im_livechat_rule_manager_read_all_mail_channel (noupdate)
74
+ # DONE: post-migration: deleted safely
75
+
76
+ NEW ir.ui.view: im_livechat.discuss_channel_view_form
77
+ NEW ir.ui.view: im_livechat.discuss_channel_view_search
78
+ NEW ir.ui.view: im_livechat.discuss_channel_view_tree
79
+ NEW ir.ui.view: im_livechat.qunit_embed_suite
80
+ NEW ir.ui.view: im_livechat.rating_rating_view_kanban
81
+ NEW ir.ui.view: im_livechat.rating_rating_view_tree
82
+ DEL ir.ui.view: im_livechat.im_livechat_canned_response_view_tree
83
+ DEL ir.ui.view: im_livechat.mail_channel_view_form
84
+ DEL ir.ui.view: im_livechat.mail_channel_view_search
85
+ DEL ir.ui.view: im_livechat.mail_channel_view_tree
86
+ # NOTHING TO DO
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 17.0.1.0.1.69
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
@@ -138,8 +141,12 @@ odoo/addons/openupgrade_scripts/scripts/hr_work_entry_holidays/17.0.1.0/upgrade_
138
141
  odoo/addons/openupgrade_scripts/scripts/iap/17.0.1.1/upgrade_analysis.txt,sha256=AvYS4Q0MRIMGV99LTKJdHZLv6qN8ItMupPDQCOLB8LQ,485
139
142
  odoo/addons/openupgrade_scripts/scripts/iap/17.0.1.1/upgrade_analysis_work.txt,sha256=R3HVGCvxYey0MBbdjElIel-86kMfaNCiEEzaSSk067U,535
140
143
  odoo/addons/openupgrade_scripts/scripts/iap_crm/17.0.1.0/upgrade_analysis.txt,sha256=Qxdh9V6HQd4HpmXsmxEMxN3Vu7y8Q6v0NWL3ZrRK1oA,144
144
+ odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/end-migration.py,sha256=ofbTgCec52Io5BU-VcF_zh4TPnO53Mf3fht2ad-EPd0,396
141
145
  odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/noupdate_changes.xml,sha256=-372YONcPdPXb_gO-f__yMRXgt8inppIexZSzTip_z0,6371
146
+ odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/post-migration.py,sha256=zfO1FqSmze9AJAHB72cDiwsLVDgUCDyVK-AQjaFrcz4,520
147
+ odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/pre-migration.py,sha256=xUtXDPVOGu0yq3KKXpX8LbO0l597sVZS6p2sgMbhF2Q,769
142
148
  odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/upgrade_analysis.txt,sha256=AcJuXqDSUAnuAn_BRAmBYSR5LGBaHuAG_4EgD7DEzsE,5505
149
+ odoo/addons/openupgrade_scripts/scripts/im_livechat/17.0.1.0/upgrade_analysis_work.txt,sha256=LAL_TN6fwt-zGSz2jJBdskiLk1TdRei5mfDidw08tCA,5813
143
150
  odoo/addons/openupgrade_scripts/scripts/im_livechat_mail_bot/17.0.1.0/upgrade_analysis.txt,sha256=xGhm2WEi7ACkVuwg3tKYA2ItfbahG5H9UENyFMPk78A,183
144
151
  odoo/addons/openupgrade_scripts/scripts/l10n_ae/17.0.1.0/upgrade_analysis.txt,sha256=FKJXw9sFEWcMxRmzINOn2o1q7FqzeNcRYW7zyFEmsBE,12145
145
152
  odoo/addons/openupgrade_scripts/scripts/l10n_anz_ubl_pint/17.0.1.0/upgrade_analysis.txt,sha256=BZQpE7I9djf7u4sZ5rUakSQICN2XjFfjsXRYCI3f7Lk,396
@@ -535,7 +542,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
535
542
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
536
543
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
537
544
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
538
- odoo_addon_openupgrade_scripts-17.0.1.0.1.69.dist-info/METADATA,sha256=XhxY9P-TyX0oUEt3Q9GoX5Y1onhG0GllwHTBzpMREU4,3785
539
- odoo_addon_openupgrade_scripts-17.0.1.0.1.69.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
540
- odoo_addon_openupgrade_scripts-17.0.1.0.1.69.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
541
- odoo_addon_openupgrade_scripts-17.0.1.0.1.69.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,,