odoo-addon-openupgrade-scripts 16.0.1.0.3.214__py3-none-any.whl → 16.0.1.0.3.222__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.
@@ -37,6 +37,27 @@ _columns_copies = {
37
37
  }
38
38
 
39
39
 
40
+ def _avoid_mail_notification_new_constraint(env):
41
+ """Prior to Odoo 16, there is no unique constraint on the mail_notification table,
42
+ so if there's any duplicate, the upgrade will fail.
43
+
44
+ Let's preventively delete the duplicated entries, as at the end, they are not
45
+ needed.
46
+ """
47
+ openupgrade.logged_query(
48
+ env.cr,
49
+ """DELETE FROM mail_notification
50
+ WHERE id IN (
51
+ SELECT id FROM (
52
+ SELECT id, row_number()
53
+ OVER (
54
+ partition BY res_partner_id, mail_message_id ORDER BY id
55
+ ) AS rnum FROM mail_notification
56
+ ) t WHERE t.rnum > 1
57
+ )""",
58
+ )
59
+
60
+
40
61
  def delete_obsolete_constraints(env):
41
62
  openupgrade.delete_sql_constraint_safely(
42
63
  env, "mail", "mail_channel_partner", "partner_or_guest_exists"
@@ -129,6 +150,7 @@ def scheduled_date_set_empty_strings_to_null(env):
129
150
 
130
151
  @openupgrade.migrate()
131
152
  def migrate(env, version):
153
+ _avoid_mail_notification_new_constraint(env)
132
154
  delete_obsolete_constraints(env)
133
155
  openupgrade.rename_fields(env, _fields_renames)
134
156
  openupgrade.rename_models(env.cr, _models_renames)
@@ -124,6 +124,21 @@ def _mig_s_progress_steps_contents(env):
124
124
  view.arch_db = env["ir.ui.view"]._pretty_arch(arch)
125
125
 
126
126
 
127
+ def _reset_customize_show_in_website_views(env):
128
+ """New Odoo website engine doesn't use customize_show=True system to show options
129
+ in the Customize tab, so we preventively reset all of them containing a website* key
130
+ for avoiding showing extra options where they shouldn't (it already happens for
131
+ example in website_sale with "Category Collapsible List" view).
132
+ """
133
+ openupgrade.logged_query(
134
+ env.cr,
135
+ """UPDATE ir_ui_view
136
+ SET customize_show=False
137
+ WHERE key like 'website%' AND customize_show
138
+ """,
139
+ )
140
+
141
+
127
142
  @openupgrade.migrate()
128
143
  def migrate(env, version):
129
144
  _fill_partner_id_if_null(env)
@@ -133,3 +148,4 @@ def migrate(env, version):
133
148
  delete_constraint_website_visitor_partner_uniq(env)
134
149
  _fill_homepage_url(env)
135
150
  _mig_s_progress_steps_contents(env)
151
+ _reset_customize_show_in_website_views(env)
@@ -0,0 +1,22 @@
1
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ @openupgrade.migrate()
8
+ def migrate(env, version):
9
+ openupgrade.add_fields(
10
+ env,
11
+ [
12
+ (
13
+ "is_mandatory_answer",
14
+ "event.question",
15
+ "event_question",
16
+ "boolean",
17
+ False,
18
+ "website_event_questions",
19
+ True,
20
+ )
21
+ ],
22
+ )
@@ -0,0 +1,8 @@
1
+ ---Models in module 'website_event_questions'---
2
+ ---Fields in module 'website_event_questions'---
3
+ website_event_questions / event.question / is_mandatory_answer (boolean) : NEW
4
+ # DONE: pre-migration: Pre-create column with default=True, which preserves v15 behavior
5
+
6
+ ---XML records in module 'website_event_questions'---
7
+ NEW ir.ui.view: website_event_questions.event_registration_view_tree
8
+ # NOTHING TO DO: ir stuff with noupdate=0
@@ -0,0 +1,14 @@
1
+ from openupgradelib import openupgrade
2
+
3
+
4
+ @openupgrade.migrate()
5
+ def migrate(env, version):
6
+ openupgrade.load_data(
7
+ env.cr, "website_event_track", "16.0.1.3/noupdate_changes.xml"
8
+ )
9
+ openupgrade.delete_record_translations(
10
+ env.cr,
11
+ "website_event_track",
12
+ ["mail_template_data_track_confirmation"],
13
+ ["name", "description"],
14
+ )
@@ -0,0 +1,17 @@
1
+ ---Models in module 'website_event_track'---
2
+ ---Fields in module 'website_event_track'---
3
+ website_event_track / event.track.location / _order : _order is now 'sequence, id' ('id')
4
+ # NOTHING TO DO
5
+
6
+ website_event_track / event.track.location / sequence (integer) : NEW hasdefault: default
7
+ # NOTHING TO DO: Default value applied by ORM is OK
8
+
9
+ website_event_track / website.event.menu / menu_type (False) : selection_keys is now '['booth', 'community', 'introduction', 'location', 'register', 'track', 'track_proposal']' ('['booth', 'community', 'exhibitor', 'introduction', 'location', 'meeting_room', 'register', 'track', 'track_proposal']')
10
+ # NOTHING TO DO: nothing change in website.event.menu of module website_event_track
11
+
12
+ ---XML records in module 'website_event_track'---
13
+ NEW ir.ui.view: website_event_track.event_track_content_partner_info
14
+ NEW ir.ui.view: website_event_track.event_track_view_form_quick_create
15
+ NEW ir.ui.view: website_event_track.snippet_options
16
+ DEL ir.ui.view: website_event_track.track_edit_options
17
+ # NOTHING TO DO
@@ -0,0 +1,15 @@
1
+ ---Models in module 'website_forum'---
2
+ ---Fields in module 'website_forum'---
3
+ ---XML records in module 'website_forum'---
4
+ NEW ir.actions.act_window: website_forum.forum_forum_action_add
5
+ NEW ir.ui.menu: website_forum.menu_forum_post_pages
6
+ DEL ir.ui.menu: website_forum.menu_forum_posts
7
+ DEL ir.ui.menu: website_forum.menu_website_forum
8
+ NEW ir.ui.view: website_forum.forum_forum_view_form_add
9
+ NEW ir.ui.view: website_forum.forum_post_view_kanban
10
+ NEW ir.ui.view: website_forum.mark_as_offensive
11
+ NEW ir.ui.view: website_forum.show_flag_validator
12
+ NEW ir.ui.view: website_forum.snippet_options
13
+ DEL ir.ui.view: website_forum.user_navbar_inherit_website_forum
14
+
15
+ # NOTHING TO DO
@@ -32,6 +32,26 @@ _not_noupdate_xml_ids = [
32
32
  ]
33
33
 
34
34
 
35
+ def _remove_view_inheritance(env):
36
+ """On v15, some views were inherited ones, but this it not anymore in v16. As Odoo
37
+ only touches the fields that are present in the definition, and now the `inherit_id`
38
+ field is missing, the inheritance keeps there, provoking a crash.
39
+
40
+ Let's empty them manually by SQL (for avoiding view validation) and using the key,
41
+ for any possible website specific view.
42
+ """
43
+ openupgrade.logged_query(
44
+ env.cr,
45
+ """UPDATE ir_ui_view SET inherit_id=NULL, mode='primary'
46
+ WHERE key IN (
47
+ 'website_sale.sort',
48
+ 'website_sale.add_grid_or_list_option',
49
+ 'website_sale.products_categories',
50
+ 'website_sale.filter_products_price'
51
+ )""",
52
+ )
53
+
54
+
35
55
  def _remove_incorrect_website_sale_extra_field_records(env):
36
56
  openupgrade.logged_query(
37
57
  env.cr,
@@ -46,4 +66,5 @@ def migrate(env, version):
46
66
  openupgrade.set_xml_ids_noupdate_value(
47
67
  env, "website_sale", _not_noupdate_xml_ids, False
48
68
  )
69
+ _remove_view_inheritance(env)
49
70
  _remove_incorrect_website_sale_extra_field_records(env)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade-scripts
3
- Version: 16.0.1.0.3.214
3
+ Version: 16.0.1.0.3.222
4
4
  Summary: Module that contains all the migrations analysis and scripts for migrate Odoo SA modules.
5
5
  Home-page: https://github.com/OCA/OpenUpgrade
6
6
  Author: Odoo Community Association (OCA)
@@ -338,7 +338,7 @@ odoo/addons/openupgrade_scripts/scripts/lunch/16.0.1.0/upgrade_analysis.txt,sha2
338
338
  odoo/addons/openupgrade_scripts/scripts/lunch/16.0.1.0/upgrade_analysis_work.txt,sha256=4szGZDLH6jY7ZNGZq0aSB6ozmAMyMWv47yZYult2gTg,660
339
339
  odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/noupdate_changes.xml,sha256=8b74tz5LRJrf76AuyOTRIl4w3NvwHe9YivwafOnoBdU,1439
340
340
  odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/post-migration.py,sha256=npwS2ylEgDiqM-CY-XzYe1o2tkXCCo3lR_qNhQPCzKM,262
341
- odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/pre-migration.py,sha256=UuBYsKrJ386PYfLAcOXcJXKW4i32Y_QDPCT5D_nKVLo,3972
341
+ odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/pre-migration.py,sha256=8Ca4PL5QlpLEvvNhCnKFbm-CTN_lOfKou9puegiUZgg,4699
342
342
  odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/upgrade_analysis.txt,sha256=ev0yHLx23bmYinSh58rE9PJeF6PTwQHIThk9So-4uag,9744
343
343
  odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/upgrade_analysis_work.txt,sha256=-pirBHtVboB-crq4R1iHSvSj8CGZyNRRBOgeqwCq9EU,11251
344
344
  odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/tests/data.py,sha256=GU_Vcq1F4DWujCx3joNM4MvKAHSFt2b3vhwpbN7oYGo,332
@@ -588,7 +588,7 @@ odoo/addons/openupgrade_scripts/scripts/web_tour/16.0.0.1/upgrade_analysis_work.
588
588
  odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/end-migration.py,sha256=3-OtTMbzmMoogxYi2gxG7AJMYwsJkg9huL4qw39mso0,2869
589
589
  odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/noupdate_changes.xml,sha256=L-3aiHxRTaP4bwEAnpCcb5PmP1DF4HXNTGb70cgsnb0,218
590
590
  odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/post-migration.py,sha256=o6fuzgKXOoamlXNMm9UYMGrWJ7xEnvyNzRNiK-h-ZWA,169
591
- odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/pre-migration.py,sha256=VSn7G5nKzsI3MBT48h3DMUYGZd5AEHQI_VCVDhettFo,4095
591
+ odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/pre-migration.py,sha256=Invtw62qgK3tIwp8vcjNueh9b5pnztTXfmuMsWiyoBU,4709
592
592
  odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/upgrade_analysis.txt,sha256=vCTXx3AvIGrv58lSrTjB-4tKywuc1XtN-tPnhNAuLQo,4942
593
593
  odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/upgrade_analysis_work.txt,sha256=5-CSFPNzO01tICIHE49UYTIWFUZdDdl_JdVVRN7MNGI,5331
594
594
  odoo/addons/openupgrade_scripts/scripts/website_blog/16.0.1.1/upgrade_analysis.txt,sha256=TBOoy8Y-_gtaGTl30JK2pPiofrz-THZHG_iE-LeHaAU,444
@@ -608,14 +608,19 @@ odoo/addons/openupgrade_scripts/scripts/website_event_booth_sale_exhibitor/16.0.
608
608
  odoo/addons/openupgrade_scripts/scripts/website_event_exhibitor/16.0.1.1/upgrade_analysis.txt,sha256=aGPbbYWWU9fh_LPVuiYIT00jtM_bQhbCDm_OgGHaGzw,567
609
609
  odoo/addons/openupgrade_scripts/scripts/website_event_jitsi/16.0.1.0/upgrade_analysis.txt,sha256=CasehKXsDI9yg4KaY1VRAiEsj2zCOJykqzINEm4DC_Y,206
610
610
  odoo/addons/openupgrade_scripts/scripts/website_event_meet/16.0.1.0/upgrade_analysis.txt,sha256=4SKNnHUo2WLtAZYZXlQI81grCcCF6AiHCLmETcOtjes,507
611
+ odoo/addons/openupgrade_scripts/scripts/website_event_questions/16.0.1.2/pre-migration.py,sha256=jogdylGuYmorV6YgylcTjDWhP62IUpDSVpVGHf6b4F0,523
611
612
  odoo/addons/openupgrade_scripts/scripts/website_event_questions/16.0.1.2/upgrade_analysis.txt,sha256=rTx_ZsCPRMLiah1ugyrleFeKW7WJEjrgnkkOV9qs7AM,310
613
+ odoo/addons/openupgrade_scripts/scripts/website_event_questions/16.0.1.2/upgrade_analysis_work.txt,sha256=tXxvbxVZ8C6u_iH84ktNZAQwBbCgB6gxOu9dK8q93_4,442
612
614
  odoo/addons/openupgrade_scripts/scripts/website_event_sale/16.0.1.0/upgrade_analysis.txt,sha256=95AxCK6IhkFRCYEo6sVeZUaZErK8tdjh5JQ1uKFOEOQ,322
613
615
  odoo/addons/openupgrade_scripts/scripts/website_event_sale/16.0.1.0/upgrade_analysis_work.txt,sha256=phoCb5v3Ow-k_0ByUfpuoyJhpVYH-rNCWR3M3wym5eU,339
614
616
  odoo/addons/openupgrade_scripts/scripts/website_event_track/16.0.1.3/noupdate_changes.xml,sha256=_dZ2_vRAtqoqS014ct6-BAarvp2B5vR7F7_hiWkHK0w,325
617
+ odoo/addons/openupgrade_scripts/scripts/website_event_track/16.0.1.3/post-migration.py,sha256=ZV1wRoG8TuhgHecEJCAe1ecHFJSXDdajns6e-ohgoxg,376
615
618
  odoo/addons/openupgrade_scripts/scripts/website_event_track/16.0.1.3/upgrade_analysis.txt,sha256=Jr_Ms0a9UJkqjn9v6QAeM7BDUttdA0bZEHQQbWUc0jU,927
619
+ odoo/addons/openupgrade_scripts/scripts/website_event_track/16.0.1.3/upgrade_analysis_work.txt,sha256=jeSyzaQuHGn8_dfl2Qm0kzv5gMbpHRRlDANJKn99MWE,1098
616
620
  odoo/addons/openupgrade_scripts/scripts/website_event_track_live/16.0.1.0/upgrade_analysis.txt,sha256=nkw3qu5MZkHIEhC1Ysc3gid3fMt8wW0fmhDZs9h8pck,195
617
621
  odoo/addons/openupgrade_scripts/scripts/website_event_track_quiz/16.0.1.0/upgrade_analysis.txt,sha256=UhqqYMoCUY3akNEdgtGeVw35anBJUQjSgit8c1xx_PA,195
618
622
  odoo/addons/openupgrade_scripts/scripts/website_forum/16.0.1.1/upgrade_analysis.txt,sha256=S5ZNLqzGI_Ln672FDj7BiqF6XfaCoZ_X-FQLAzLSiKU,651
623
+ odoo/addons/openupgrade_scripts/scripts/website_forum/16.0.1.1/upgrade_analysis_work.txt,sha256=XOiGXc_poMOdyZ7AC47a8XH_ajIAHQRO2qSxpILpYI8,668
619
624
  odoo/addons/openupgrade_scripts/scripts/website_hr_recruitment/16.0.1.0/pre-migration.py,sha256=n2LJ34O8Jm1OnD7rJbeq9nG8Qug9jY0dqyeUVnss6pg,280
620
625
  odoo/addons/openupgrade_scripts/scripts/website_hr_recruitment/16.0.1.0/upgrade_analysis.txt,sha256=lhIhdS4MVUTqoX-pjKKNA1s23rU4Qsxvrkn-9suGgmI,890
621
626
  odoo/addons/openupgrade_scripts/scripts/website_hr_recruitment/16.0.1.0/upgrade_analysis_work.txt,sha256=pApdCGIFHgzIg_rgFK5Cn4EL3CtgEwtFjVxLePv5l7o,973
@@ -641,7 +646,7 @@ odoo/addons/openupgrade_scripts/scripts/website_profile/16.0.1.0/upgrade_analysi
641
646
  odoo/addons/openupgrade_scripts/scripts/website_profile/16.0.1.0/upgrade_analysis_work.txt,sha256=WBihsSNr9k35K_7xoXbiHmQ3Bq_-Ji1aMfCw9K0n8NU,343
642
647
  odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/noupdate_changes.xml,sha256=nfdIYF9rDxL7mbrU-1rQSinpSkxqmAi6WfmDwGWYfK0,3955
643
648
  odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/post-migration.py,sha256=-c9-4Wzgb_HWaPCT9QdVxjinRtVyscYf4Cj1PFuIcUc,756
644
- odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/pre-migration.py,sha256=sLscIuOFhp9wC5zWd40ePlsAUZZRqaNazFByhFMVHGc,1730
649
+ odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/pre-migration.py,sha256=EZzBrLLRaSHv8Iaw5ORMQMY9-Z91VdjQTkRuTul68bc,2523
645
650
  odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/upgrade_analysis.txt,sha256=PTjOf2WScHZfJVbgKmBDBWTFRkHclbfqkdS86Cvo7Vk,7782
646
651
  odoo/addons/openupgrade_scripts/scripts/website_sale/16.0.1.1/upgrade_analysis_work.txt,sha256=81PNj202WO69bZXkSakWjiBMohG9u0D_7WsDr8aRXTk,9337
647
652
  odoo/addons/openupgrade_scripts/scripts/website_sale_autocomplete/16.0.1.0/upgrade_analysis.txt,sha256=WoSUlwN4UAdoZfohAjNdArdpNBRDyydDCQpK53NIZMg,436
@@ -673,7 +678,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
673
678
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
674
679
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
675
680
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
676
- odoo_addon_openupgrade_scripts-16.0.1.0.3.214.dist-info/METADATA,sha256=xfFUF0rDGFn7zqeNvi_FCmU-AyO6aAnsUbk5ABNQqJY,3810
677
- odoo_addon_openupgrade_scripts-16.0.1.0.3.214.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
678
- odoo_addon_openupgrade_scripts-16.0.1.0.3.214.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
679
- odoo_addon_openupgrade_scripts-16.0.1.0.3.214.dist-info/RECORD,,
681
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.222.dist-info/METADATA,sha256=Mdz3qJ6PJFdcAi84oojXskP_vL4GeQwi_190OnBax5s,3810
682
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.222.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
683
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.222.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
684
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.222.dist-info/RECORD,,