odoo-addon-openupgrade-scripts 18.0.1.0.0.343__py3-none-any.whl → 18.0.1.0.0.346__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.
@@ -0,0 +1,47 @@
1
+ from openupgradelib import openupgrade
2
+
3
+ from odoo import Command
4
+
5
+
6
+ def _set_survey_recruitment(env):
7
+ """
8
+ Set the survey_type to 'recruitment' for all surveys linked to HR jobs.
9
+ """
10
+ openupgrade.logged_query(
11
+ env.cr,
12
+ """
13
+ UPDATE survey_survey survey
14
+ SET survey_type = 'recruitment'
15
+ FROM hr_job job
16
+ WHERE job.survey_id = survey.id
17
+ """,
18
+ )
19
+
20
+
21
+ def _normalize_res_groups_implied(env):
22
+ """
23
+ Remove the implied_ids from group_hr_recruitment_interviewer
24
+ according to the changes in Odoo 18.0.
25
+ https://github.com/odoo/odoo/commit/027a2a66d63225abbfaef425448188007f573ac5
26
+ """
27
+ recruitment_interviewer = env.ref("hr_recruitment.group_hr_recruitment_interviewer")
28
+ group_survey_user = env.ref("survey.group_survey_user")
29
+ recruitment_interviewer.write(
30
+ {
31
+ "implied_ids": [(Command.unlink, group_survey_user.id)],
32
+ "comment": "", # Set to blank, in the hr_recruitment module it is not set.
33
+ }
34
+ )
35
+
36
+
37
+ @openupgrade.migrate()
38
+ def migrate(env, version):
39
+ openupgrade.load_data(env, "hr_recruitment_survey", "18.0.1.0/noupdate_changes.xml")
40
+ _set_survey_recruitment(env)
41
+ _normalize_res_groups_implied(env)
42
+ openupgrade.delete_record_translations(
43
+ env.cr,
44
+ "hr_recruitment",
45
+ ["group_hr_recruitment_interviewer"],
46
+ ["comment"],
47
+ )
@@ -0,0 +1,45 @@
1
+ ---Models in module 'hr_recruitment_survey'---
2
+ ---Fields in module 'hr_recruitment_survey'---
3
+ hr_recruitment_survey / survey.survey / hr_job_ids (one2many) : NEW relation: hr.job
4
+ # NOTHING TO DO: one2many (handled by ORM)
5
+
6
+ hr_recruitment_survey / survey.survey / survey_type (False) : NEW selection_keys: ['assessment', 'custom', 'live_session', 'recruitment', 'survey'], mode: modify
7
+ # DONE: post-migration: Set `recruitment` in surveys where it is set in a recruitment
8
+
9
+ ---XML records in module 'hr_recruitment_survey'---
10
+ NEW ir.actions.act_window: hr_recruitment_survey.survey_survey_action_recruitment
11
+ NEW ir.model.access: hr_recruitment_survey.access_survey_invite_recruitment_interviewer
12
+ NEW ir.model.access: hr_recruitment_survey.access_survey_invite_recruitment_user
13
+ NEW ir.model.access: hr_recruitment_survey.access_survey_question_answer_recruitment_manager
14
+ NEW ir.model.access: hr_recruitment_survey.access_survey_question_recruitment_interviewer
15
+ NEW ir.model.access: hr_recruitment_survey.access_survey_question_recruitment_manager
16
+ NEW ir.model.access: hr_recruitment_survey.access_survey_survey_recruitment_interviewer
17
+ NEW ir.model.access: hr_recruitment_survey.access_survey_survey_recruitment_manager
18
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_line_recruitment_interviewer
19
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_line_recruitment_manager
20
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_line_recruitment_user
21
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_recruitment_interviewer
22
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_recruitment_manager
23
+ NEW ir.model.access: hr_recruitment_survey.access_survey_user_input_recruitment_user
24
+ NEW ir.rule: hr_recruitment_survey.survey_invite_recruitment_interviewer (noupdate)
25
+ NEW ir.rule: hr_recruitment_survey.survey_invite_recruitment_manager (noupdate)
26
+ NEW ir.rule: hr_recruitment_survey.survey_invite_recruitment_user (noupdate)
27
+ NEW ir.rule: hr_recruitment_survey.survey_question_answer_rule_recruitment_manager (noupdate)
28
+ NEW ir.rule: hr_recruitment_survey.survey_question_recruitment_interviewer (noupdate)
29
+ NEW ir.rule: hr_recruitment_survey.survey_question_rule_recruitment_manager (noupdate)
30
+ NEW ir.rule: hr_recruitment_survey.survey_survey_recruitment_interviewer (noupdate)
31
+ NEW ir.rule: hr_recruitment_survey.survey_survey_rule_recruitment_manager (noupdate)
32
+ NEW ir.rule: hr_recruitment_survey.survey_user_input_line_rule_recruitment_interviewer (noupdate)
33
+ NEW ir.rule: hr_recruitment_survey.survey_user_input_line_rule_recruitment_manager (noupdate)
34
+ NEW ir.rule: hr_recruitment_survey.survey_user_input_line_rule_recruitment_user (noupdate)
35
+ NEW ir.rule: hr_recruitment_survey.survey_user_input_rule_recruitment_manager (noupdate)
36
+ NEW ir.rule: hr_recruitment_survey.survey_user_input_rule_recruitment_user (noupdate)
37
+ # NOTHING TO DO: Specific survey access rules for recruitment, see https://github.com/odoo/odoo/commit/027a2a66d63225abbfaef425448188007f573ac5
38
+ # The group_hr_recruitment_manager can manage surveys with full CRUD permissions.
39
+ # The group_hr_recruitment_user can read and invite participants to surveys.
40
+
41
+ NEW ir.ui.menu: hr_recruitment_survey.menu_hr_recruitment_config_surveys
42
+ NEW ir.ui.view: hr_recruitment_survey.hr_recruitment_survey_button_form_view
43
+ NEW ir.ui.view: hr_recruitment_survey.survey_survey_view_form
44
+ NEW ir.ui.view: hr_recruitment_survey.survey_survey_view_kanban
45
+ # NOTHING TO DO: New menu and views specific to creating surveys
@@ -20,6 +20,29 @@ field_renames = [
20
20
  ]
21
21
 
22
22
 
23
+ def create_imd_entry_for_config_param(env):
24
+ """
25
+ If database has config parameter mail.restrict.template.rendering already
26
+ set, create an ir.model.data entry for it to avoid trying to create it a
27
+ second time
28
+ """
29
+ param = env["ir.config_parameter"].search(
30
+ [("key", "=", "mail.restrict.template.rendering")]
31
+ )
32
+ if param and not env.ref(
33
+ "mail.restrict_template_rendering", raise_if_not_found=False
34
+ ):
35
+ env["ir.model.data"].create(
36
+ {
37
+ "name": "restrict_template_rendering",
38
+ "module": "mail",
39
+ "model": param._name,
40
+ "res_id": param.id,
41
+ "noupdate": True,
42
+ }
43
+ )
44
+
45
+
23
46
  @openupgrade.migrate()
24
47
  def migrate(env, version):
25
48
  openupgrade.rename_models(env.cr, model_renames)
@@ -34,3 +57,4 @@ def migrate(env, version):
34
57
  )
35
58
  ],
36
59
  )
60
+ create_imd_entry_for_config_param(env)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 18.0.1.0.0.343
3
+ Version: 18.0.1.0.0.346
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo==18.0.*
6
6
  Requires-Dist: openupgradelib
@@ -194,7 +194,9 @@ odoo/addons/openupgrade_scripts/scripts/hr_recruitment_skills/18.0.1.0/noupdate_
194
194
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_skills/18.0.1.0/upgrade_analysis.txt,sha256=iQF7k6CQCDXQyyh_TWqqn4ktJK7xEfgy4Q8xyo1acbk,2114
195
195
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_sms/18.0.1.0/upgrade_analysis.txt,sha256=FJI1P9IcBHW7GjFk1x8zkxu1yfA99EiujiWfva0QWxc,212
196
196
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/18.0.1.0/noupdate_changes.xml,sha256=cfrhcI415EqNbAoWuR36rd77cmbKyJKAOxCbKnRs3a0,503
197
+ odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/18.0.1.0/post-migration.py,sha256=px6qmnv3sWeO4qDo5B_iV2NJqe16_NzyY4FyT59Awew,1396
197
198
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/18.0.1.0/upgrade_analysis.txt,sha256=aPNHVDFQ2Kqf4vwA_j7ZqyWrs85MIzte97F6gaNydIU,3081
199
+ odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/18.0.1.0/upgrade_analysis_work.txt,sha256=5mNoRZ2Q7RK0h2UD6fGZj0qGbc7DaAHjHRfuRJ61TOU,3581
198
200
  odoo/addons/openupgrade_scripts/scripts/hr_skills/18.0.1.0/post-migration.py,sha256=ETyBTgUrVnpXDJfqNPQcYxduWl4kIRcb3_UM8ZcMbIQ,410
199
201
  odoo/addons/openupgrade_scripts/scripts/hr_skills/18.0.1.0/pre-migration.py,sha256=FEVhsx34mxMFD2mz0-_krKfvBzQLVpGmtJXvMBTweBU,285
200
202
  odoo/addons/openupgrade_scripts/scripts/hr_skills/18.0.1.0/upgrade_analysis.txt,sha256=CaDTiFS5E04Wiy3b-qbUCYVe8BCWciRf8H-4igaXQh8,3772
@@ -376,7 +378,7 @@ odoo/addons/openupgrade_scripts/scripts/loyalty/18.0.1.0/upgrade_analysis_work.t
376
378
  odoo/addons/openupgrade_scripts/scripts/lunch/18.0.1.0/upgrade_analysis.txt,sha256=I00Bu3CtG_X-c_-KpU7MGC0uZI306Mb6of6dMyB7nFg,283
377
379
  odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/noupdate_changes.xml,sha256=nHtVWU3RSjfpW7QN8N0Mt0qqVqHBC3-Pz7_po695_bs,4391
378
380
  odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/post-migration.py,sha256=ioQQmxrPDZC2D2WYZKDIFwRbxUx8muupRpk1hdmFFb4,2172
379
- odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/pre-migration.py,sha256=fIUsCJauN-HFI43SF3zKVyxvUBfbaXnx7eu7XJk6498,991
381
+ odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/pre-migration.py,sha256=rXGAyXr6fT0EDjXHac2p7QSB14kM9lssaL8VnmmGsLw,1757
380
382
  odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/upgrade_analysis.txt,sha256=9CQ14swPYLRX5H66iN0Tb0IYLAU-WjiMZFbBvyYFGFw,7039
381
383
  odoo/addons/openupgrade_scripts/scripts/mail/18.0.1.18/upgrade_analysis_work.txt,sha256=mWWnzMB8PnizxTYJfFkS0EhMzzKaiT2V4CxqxkPDEWQ,9864
382
384
  odoo/addons/openupgrade_scripts/scripts/mail/tests/data.py,sha256=Jd66WgwKgh_X3RLtCG2G-rLdrS5HyL4SjOwdjHIWuwk,218
@@ -746,7 +748,7 @@ odoo/addons/openupgrade_scripts/scripts/website_slides_survey/18.0.1.0/upgrade_a
746
748
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
747
749
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
748
750
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=Jc0qAThlH5WnoSq6vPamjC8WyMkdo_9zkhDuU1qW1VI,12722
749
- odoo_addon_openupgrade_scripts-18.0.1.0.0.343.dist-info/METADATA,sha256=YUUpbcQya5CxFj0ywx6_flHhnce1Y0yqGiVBmBnR3Oo,3812
750
- odoo_addon_openupgrade_scripts-18.0.1.0.0.343.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
751
- odoo_addon_openupgrade_scripts-18.0.1.0.0.343.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
752
- odoo_addon_openupgrade_scripts-18.0.1.0.0.343.dist-info/RECORD,,
751
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.346.dist-info/METADATA,sha256=xiUYwoc_kMdmZckyVTyWA2U2r71UA6xikaPy1_BjxKg,3812
752
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.346.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
753
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.346.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
754
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.346.dist-info/RECORD,,