Skip to content

Commit

Permalink
Merge pull request #4044 from Tecnativa/15.0-ou_add-mass_mailing_even…
Browse files Browse the repository at this point in the history
…t_track

[15.0][OU-ADD] mass_mailing_event_track: Nothing to do
  • Loading branch information
pedrobaeza authored Jul 5, 2023
2 parents d6684ff + fac44d2 commit fcbfb21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docsource/modules140-150.rst
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Module coverage 14.0 -> 15.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| mass_mailing_event_sms | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| mass_mailing_event_track | | |
| mass_mailing_event_track | Nothing to do | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| mass_mailing_event_track_sms | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ def _check_sponsors(env):
"""If any sponsor found, mark website_event_exhibitor module to be installed, as
this is the new host for such model. Also renamed XML-IDs for commodity.
"""
if openupgrade.logged_query(env.cr, "SELECT id FROM event_sponsor LIMIT 1"):
env.cr.execute("SELECT id FROM event_sponsor LIMIT 1")
has_sponsor = env.cr.fetchone()
env.cr.execute(
"SELECT state FROM ir_module_module WHERE name='website_event_exhibitor'"
)
row = env.cr.fetchone()
module_not_installed = row and row[0] == "uninstalled"
if has_sponsor and module_not_installed:
openupgrade.logged_query(
env.cr,
"UPDATE ir_module_module SET state='to install' "
Expand Down Expand Up @@ -45,30 +52,6 @@ def _check_sponsors(env):
"website_event_track.event_sponsor",
"website_event_exhibitor.event_sponsor",
),
(
"website_event_track.event_sponsor_type_view_form",
"website_event_exhibitor.event_sponsor_type_view_form",
),
(
"website_event_track.event_sponsor_type_view_tree",
"website_event_exhibitor.event_sponsor_type_view_tree",
),
(
"website_event_track.event_sponsor_view_form",
"website_event_exhibitor.event_sponsor_view_form",
),
(
"website_event_track.event_sponsor_view_kanban",
"website_event_exhibitor.event_sponsor_view_kanban",
),
(
"website_event_track.event_sponsor_view_search",
"website_event_exhibitor.event_sponsor_view_search",
),
(
"website_event_track.event_sponsor_view_tree",
"website_event_exhibitor.event_sponsor_view_tree",
),
],
)
else:
Expand Down

0 comments on commit fcbfb21

Please sign in to comment.