odoo-addon-openupgrade-scripts 16.0.1.0.3.143__py3-none-any.whl → 16.0.1.0.3.155__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.
Files changed (18) hide show
  1. odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/post-migration.py +6 -0
  2. odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/upgrade_analysis_work.txt +16 -0
  3. odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/noupdate_changes.xml +1 -1
  4. odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/post-migration.py +9 -0
  5. odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/upgrade_analysis_work.txt +23 -0
  6. odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/post-migration.py +73 -0
  7. odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/pre-migration.py +108 -0
  8. odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/upgrade_analysis_work.txt +71 -0
  9. odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/post-migration.py +25 -0
  10. odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/upgrade_analysis_work.txt +44 -0
  11. odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/16.0.1.0/upgrade_analysis_work.txt +6 -0
  12. odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/post-migration.py +24 -0
  13. odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/pre-migration.py +14 -0
  14. odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/upgrade_analysis_work.txt +48 -0
  15. {odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info}/METADATA +1 -1
  16. {odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info}/RECORD +18 -5
  17. {odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info}/WHEEL +0 -0
  18. {odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,6 @@
1
+ from openupgradelib import openupgrade
2
+
3
+
4
+ @openupgrade.migrate()
5
+ def migrate(env, version):
6
+ openupgrade.load_data(env.cr, "hr_attendance", "16.0.2.0/noupdate_changes.xml")
@@ -0,0 +1,16 @@
1
+ ---Models in module 'hr_attendance'---
2
+ ---Fields in module 'hr_attendance'---
3
+ hr_attendance / res.company / attendance_barcode_source (selection): NEW selection_keys: ['back', 'front', 'scanner'], hasdefault: default
4
+ # NOTHING TO DO: Value only used in enterprise
5
+
6
+ hr_attendance / res.company / attendance_kiosk_delay (integer): NEW hasdefault: default
7
+ # NOTHING TO DO: In v15, this parameter was fixed to 5 seconds. Now it's configurable and set by default in 10. It's reasonable to let the new default as a better default value.
8
+
9
+ hr_attendance / res.company / attendance_kiosk_mode (selection): NEW selection_keys: ['barcode', 'barcode_manual', 'manual'], hasdefault: default
10
+ # NOTHING TO DO: With the default value `barcode_manual`, we get the same behavior as v15
11
+
12
+ ---XML records in module 'hr_attendance'---
13
+ NEW ir.model.access: hr_attendance.access_hr_attendance_officer
14
+ DEL ir.ui.view: hr_attendance.hr_attendance_view_form_inherit
15
+ DEL ir.ui.view: hr_attendance.view_attendance_tree_inherit
16
+ # NOTHING TO DO: noupdate=0 records handled by ORM.
@@ -4,6 +4,6 @@
4
4
  <field name="description">Enable the user to see and manage the contracts from Employee application.</field>
5
5
  </record>
6
6
  <record id="group_hr_contract_manager" model="res.groups">
7
- <field name="implied_ids" eval="[(4, ref('hr_contract.group_hr_contract_employee_manager'))]"/>
7
+ <field name="implied_ids" eval="[(5, ), (4, ref('hr_contract.group_hr_contract_employee_manager'))]"/>
8
8
  </record>
9
9
  </odoo>
@@ -0,0 +1,9 @@
1
+ # Copyright 2023 Coop IT Easy (https://coopiteasy.be)
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.load_data(env.cr, "hr_contract", "16.0.1.0/noupdate_changes.xml")
@@ -0,0 +1,23 @@
1
+ ---Models in module 'hr_contract'---
2
+ model hr.contract.type (moved to hr)
3
+ # DONE: in migration script of module hr
4
+
5
+ ---Fields in module 'hr_contract'---
6
+ hr_contract / hr.contract.type / __last_update (datetime) : module is now 'hr' ('hr_contract')
7
+ hr_contract / hr.contract.type / _order : _order is now 'sequence' ('id')
8
+ hr_contract / hr.contract.type / _order : module is now 'hr' ('hr_contract')
9
+ hr_contract / hr.contract.type / display_name (char) : module is now 'hr' ('hr_contract')
10
+ hr_contract / hr.contract.type / name (char) : module is now 'hr' ('hr_contract')
11
+ # DONE: in migration script of module hr
12
+
13
+ ---XML records in module 'hr_contract'---
14
+ NEW ir.model.access: hr_contract.access_hr_contract_hr_employee_manager
15
+ # NOTHING TO DO: New role with less privilege. No need to move user to this group in migration script. See: https://github.com/odoo/odoo/commit/9e14c112eef3b4098c0756b8da17a7253ea0c4d3
16
+
17
+ DEL ir.model.access: hr_contract.access_hr_contract_type_manager [renamed to hr module]
18
+ # DONE: in migration script of module hr
19
+
20
+ NEW ir.rule: hr_contract.ir_rule_hr_contract_employee_manager (noupdate)
21
+ NEW ir.rule: hr_contract.ir_rule_hr_contract_manager (noupdate)
22
+ NEW res.groups: hr_contract.group_hr_contract_employee_manager (noupdate)
23
+ # NOTHING TO DO
@@ -0,0 +1,73 @@
1
+ # Copyright 2023 Tecnativa - Víctor Martínez
2
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
3
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def _hr_expense_process(env):
8
+ """Set amount_tax_company by ORM only when different currency."""
9
+ env.cr.execute(
10
+ """
11
+ SELECT he.id
12
+ FROM hr_expense he
13
+ JOIN res_company rc ON rc.id = he.company_id
14
+ WHERE rc.currency_id = he.currency_id
15
+ """
16
+ )
17
+ env["hr.expense"].browse([x[0] for x in env.cr.fetchall()])._compute_amount_tax()
18
+
19
+
20
+ def _hr_expense_sheet_process(env):
21
+ """With the hr.expense values already defined, we can now set the missing data."""
22
+ openupgrade.logged_query(
23
+ env.cr,
24
+ """
25
+ UPDATE hr_expense_sheet SET total_amount_taxes = (
26
+ SELECT SUM(amount_tax_company)
27
+ FROM hr_expense
28
+ WHERE sheet_id = hr_expense_sheet.id
29
+ )
30
+ """,
31
+ )
32
+ openupgrade.logged_query(
33
+ env.cr,
34
+ """
35
+ UPDATE hr_expense_sheet
36
+ SET untaxed_amount = (total_amount - total_amount_taxes)
37
+ """,
38
+ )
39
+
40
+
41
+ def _hr_expense_analytic_tag(env):
42
+ """If table exists and there are any record with no distribution (used just as tag),
43
+ we set the module hr_expense_analytic_tag to be installed.
44
+ """
45
+ if openupgrade.table_exists(env.cr, "account_analytic_tag_hr_expense_rel"):
46
+ env.cr.execute(
47
+ """SELECT COUNT(*)
48
+ FROM account_analytic_tag_hr_expense_rel rel
49
+ JOIN account_analytic_tag aat ON rel.account_analytic_tag_id = aat.id
50
+ WHERE NOT aat.active_analytic_distribution
51
+ """,
52
+ )
53
+ if env.cr.fetchone()[0]:
54
+ openupgrade.logged_query(
55
+ env.cr,
56
+ """UPDATE ir_module_module
57
+ SET state = 'to install'
58
+ WHERE name = 'hr_expense_analytic_tag'""",
59
+ )
60
+
61
+
62
+ @openupgrade.migrate()
63
+ def migrate(env, version):
64
+ openupgrade.load_data(env.cr, "hr_expense", "16.0.2.0/noupdate_changes.xml")
65
+ _hr_expense_process(env)
66
+ _hr_expense_sheet_process(env)
67
+ _hr_expense_analytic_tag(env)
68
+ openupgrade.set_xml_ids_noupdate_value(
69
+ env,
70
+ "hr_expense",
71
+ ["product_product_no_cost"],
72
+ True,
73
+ )
@@ -0,0 +1,108 @@
1
+ # Copyright 2023 Tecnativa - Víctor Martínez
2
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
3
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
+ from openupgradelib import openupgrade, openupgrade_160
5
+
6
+
7
+ def _hr_expense_table_new_columns(env):
8
+ """Custom process to create new columns:
9
+ - amount_tax: (total_amount - untaxed_amount). It will be similar enough.
10
+ - amount_tax_company: the same value as amount_tax if same currency, and let
11
+ for post-migration for different currency.
12
+ """
13
+ if not openupgrade.column_exists(env.cr, "hr_expense", "amount_tax"):
14
+ openupgrade.logged_query(
15
+ env.cr,
16
+ "ALTER TABLE hr_expense ADD COLUMN amount_tax numeric",
17
+ )
18
+ openupgrade.logged_query(
19
+ env.cr, "UPDATE hr_expense SET amount_tax = (total_amount - untaxed_amount)"
20
+ )
21
+ if not openupgrade.column_exists(env.cr, "hr_expense", "amount_tax_company"):
22
+ openupgrade.logged_query(
23
+ env.cr,
24
+ "ALTER TABLE hr_expense ADD COLUMN amount_tax_company numeric",
25
+ )
26
+ openupgrade.logged_query(
27
+ env.cr,
28
+ """UPDATE hr_expense he
29
+ SET amount_tax_company = amount_tax
30
+ FROM res_company rc
31
+ WHERE rc.id = he.company_id AND rc.currency_id = he.currency_id
32
+ """,
33
+ )
34
+
35
+
36
+ def _hr_expense_sheet_table_new_columns(env):
37
+ """Pre-create columns to be processed on post-migration."""
38
+ openupgrade.logged_query(
39
+ env.cr,
40
+ """ALTER TABLE hr_expense_sheet
41
+ ADD COLUMN IF NOT EXISTS total_amount_taxes numeric""",
42
+ )
43
+ openupgrade.logged_query(
44
+ env.cr,
45
+ """ALTER TABLE hr_expense_sheet
46
+ ADD COLUMN IF NOT EXISTS untaxed_amount numeric""",
47
+ )
48
+
49
+
50
+ def _fast_fill_analytic_distribution_on_hr_expense(env):
51
+ if not openupgrade.column_exists(env.cr, "hr_expense", "analytic_distribution"):
52
+ openupgrade.logged_query(
53
+ env.cr,
54
+ """
55
+ ALTER TABLE hr_expense
56
+ ADD COLUMN IF NOT EXISTS analytic_distribution jsonb;
57
+ """,
58
+ )
59
+ openupgrade_160.fill_analytic_distribution(
60
+ env,
61
+ table="hr_expense",
62
+ m2m_rel="account_analytic_tag_hr_expense_rel",
63
+ m2m_column1="hr_expense_id",
64
+ )
65
+
66
+
67
+ def _convert_expense_sheet_entries_to_invoices(env):
68
+ """From v16 onwards, account_move related to hr_expense_sheet are created with
69
+ move_type = "in_invoice" as per
70
+ https://github.com/odoo/odoo/blob/87f4667d81f7d8a40dcf225f3daf1a9e2795680d/
71
+ addons/hr_expense/models/hr_expense.py#L1297
72
+ on contrary than on v15, which was "entry".
73
+
74
+ Then, in _compute_payment_state from account.move it will check if the move_type is
75
+ "entry", putting payment_state = "not_paid" for that cases, no matter the
76
+ reconcilation:
77
+ https://github.com/odoo/odoo/blob/87f4667d81f7d8a40dcf225f3daf1a9e2795680d/
78
+ addons/account/models/account_move.py#L926
79
+
80
+ As the sheet payment state is taken from the move's payment_state, we need to
81
+ switch all the existing expenses entries to "in_invoice".
82
+ """
83
+ openupgrade.logged_query(
84
+ env.cr,
85
+ """
86
+ UPDATE account_move am
87
+ SET move_type = 'in_invoice'
88
+ FROM hr_expense_sheet hes
89
+ WHERE hes.account_move_id = am.id AND am.move_type <> 'in_invoice'
90
+ """,
91
+ )
92
+
93
+
94
+ _xmlid_renames = [
95
+ (
96
+ "hr_expense.product_product_zero_cost",
97
+ "hr_expense.product_product_no_cost",
98
+ ),
99
+ ]
100
+
101
+
102
+ @openupgrade.migrate()
103
+ def migrate(env, version):
104
+ _hr_expense_table_new_columns(env)
105
+ _hr_expense_sheet_table_new_columns(env)
106
+ _fast_fill_analytic_distribution_on_hr_expense(env)
107
+ _convert_expense_sheet_entries_to_invoices(env)
108
+ openupgrade.rename_xmlids(env.cr, _xmlid_renames)
@@ -0,0 +1,71 @@
1
+ ---Models in module 'hr_expense'---
2
+ new model hr.expense.split [transient]
3
+ new model hr.expense.split.wizard [transient]
4
+ # NOTHING TO DO
5
+
6
+ ---Fields in module 'hr_expense'---
7
+
8
+ hr_expense / hr.expense / amount_tax (float) : NEW isfunction: function, stored
9
+ # DONE: pre-migration: set value
10
+
11
+ hr_expense / hr.expense / amount_tax_company (float) : NEW isfunction: function, stored
12
+ # DONE: pre-migration: pre-create column for same currency
13
+ # DONE: post-migration: set value by ORM for different currency
14
+
15
+ hr_expense / hr.expense / analytic_account_id (many2one): DEL relation: account.analytic.account
16
+ hr_expense / hr.expense / analytic_distribution_stored_char (char): NEW isfunction: function, stored
17
+ # DONE: pre-migration: fast fill analytic_distribution
18
+
19
+ hr_expense / hr.expense / analytic_tag_ids (many2many) : DEL relation: account.analytic.tag
20
+ # DONE: post-migration: if there are tags with no distribution, we plan OCA module hr_expense_analytic_tag to be installed
21
+
22
+ hr_expense / hr.expense.sheet / total_amount_taxes (float) : NEW isfunction: function, stored
23
+ hr_expense / hr.expense.sheet / untaxed_amount (float) : NEW isfunction: function, stored
24
+ # DONE: pre-migration: pre-create columns
25
+ # DONE: post-migration: set values by SQL
26
+
27
+ hr_expense / account.analytic.applicability / business_domain (False) : NEW selection_keys: ['bill', 'expense', 'general', 'invoice'], mode: modify
28
+ hr_expense / account.move / expense_sheet_id (one2many) : NEW relation: hr.expense.sheet
29
+ hr_expense / hr.expense / name (char) : not a function anymore
30
+ hr_expense / hr.expense / unit_amount (float) : not a function anymore
31
+ hr_expense / hr.expense.sheet / payment_state (selection) : selection_keys is now 'function' ('['in_payment', 'invoicing_legacy', 'not_paid', 'paid', 'partial', 'reversed']')
32
+ # NOTHING TO DO
33
+
34
+ hr_expense / res.company / company_expense_journal_id (many2one): NEW relation: account.journal
35
+ hr_expense / res.company / expense_journal_id (many2one) : NEW relation: account.journal
36
+ # NOTHING TO DO: Preference values for being set by company, but if none selected, the previous default ones are used.
37
+
38
+ ---XML records in module 'hr_expense'---
39
+ DEL ir.actions.act_window: hr_expense.action_hr_expense_sheet_all_to_approve
40
+ DEL ir.actions.act_window: hr_expense.action_hr_expense_sheet_all_to_pay
41
+ DEL ir.actions.act_window: hr_expense.action_hr_expense_sheet_all_to_post
42
+ DEL ir.actions.act_window: hr_expense.hr_expense_actions_my_unsubmitted
43
+ DEL ir.actions.act_window.view: hr_expense.hr_expense_actions_all_kanban
44
+ DEL ir.actions.act_window.view: hr_expense.hr_expense_actions_my_unsubmitted_kanban
45
+ DEL ir.actions.act_window.view: hr_expense.hr_expense_actions_my_unsubmitted_tree
46
+ NEW ir.model.access: hr_expense.access_hr_expense_split_manager
47
+ NEW ir.model.access: hr_expense.access_hr_expense_split_wizard_manager
48
+ NEW ir.rule: hr_expense.ir_rule_hr_expense_sheet_employee_not_draft (noupdate)
49
+ DEL ir.ui.menu: hr_expense.menu_hr_expense_my_expenses_to_submit
50
+ DEL ir.ui.menu: hr_expense.menu_hr_expense_sheet_all
51
+ DEL ir.ui.menu: hr_expense.menu_hr_expense_sheet_all_to_approve
52
+ DEL ir.ui.menu: hr_expense.menu_hr_expense_sheet_all_to_pay
53
+ DEL ir.ui.menu: hr_expense.menu_hr_expense_sheet_all_to_post
54
+ NEW ir.ui.view: hr_expense.hr_expense_sheet_view_search_with_panel
55
+ NEW ir.ui.view: hr_expense.hr_expense_split
56
+ NEW ir.ui.view: hr_expense.product_product_expense_categories_tree_view
57
+ NEW ir.ui.view: hr_expense.view_move_form_inherit_expense
58
+ NEW ir.ui.view: hr_expense.view_product_hr_expense_form
59
+ DEL ir.ui.view: hr_expense.view_hr_expense_sheet_dashboard_tree
60
+ NEW product.product: hr_expense.expense_product_communication (noupdate)
61
+ NEW product.product: hr_expense.expense_product_gift (noupdate)
62
+ NEW product.product: hr_expense.expense_product_meal (noupdate)
63
+ NEW product.product: hr_expense.expense_product_mileage (noupdate)
64
+ NEW product.product: hr_expense.expense_product_travel_accommodation (noupdate)
65
+ DEL product.product: hr_expense.product_product_fixed_cost (noupdate)
66
+ # NOTHING TO DO
67
+
68
+ DEL product.product: hr_expense.product_product_zero_cost
69
+ NEW product.product: hr_expense.product_product_no_cost (noupdate)
70
+ # DONE: pre-migration: renamed product_product_zero_cost -> product_product_no_cost
71
+ # DONE: post-migration: switch noupdate after updating new data
@@ -0,0 +1,25 @@
1
+ # Copyright 2023 Coop IT Easy (https://coopiteasy.be)
2
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
3
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
+
5
+ from openupgradelib import openupgrade
6
+
7
+
8
+ def _set_allocation_validation_type(env):
9
+ """Convert the previous `set` value to `officer` as it's mostly the same. The only
10
+ difference is that previously if set is selected, the responsible could be empty,
11
+ and thus the own user was selected as approver - which was incorrect -.
12
+ """
13
+ openupgrade.logged_query(
14
+ env.cr,
15
+ """UPDATE hr_leave_type
16
+ SET allocation_validation_type = 'officer'
17
+ WHERE allocation_validation_type = 'set'
18
+ """,
19
+ )
20
+
21
+
22
+ @openupgrade.migrate()
23
+ def migrate(env, version):
24
+ _set_allocation_validation_type(env)
25
+ openupgrade.load_data(env.cr, "hr_holidays", "16.0.1.5/noupdate_changes.xml")
@@ -0,0 +1,44 @@
1
+ ---Models in module 'hr_holidays'---
2
+ new model hr.holidays.cancel.leave [transient]
3
+ # NOTHING TO DO: transient model
4
+
5
+ new model hr.leave.stress.day
6
+ # NOTHING TO DO: new feature
7
+
8
+ ---Fields in module 'hr_holidays'---
9
+ hr_holidays / hr.leave / active (boolean) : NEW
10
+ # NOTHING TO DO: default value is True.
11
+
12
+ hr_holidays / hr.leave / request_unit_custom (boolean) : DEL
13
+ # NOTHING TO DO: not needed anymore. See : https://github.com/odoo/odoo/commit/81c8a0564d54c981e65a6ed3b2c70dd792d59a46
14
+
15
+ hr_holidays / hr.leave.accrual.level / postpone_max_days (integer) : NEW
16
+ hr_holidays / hr.leave.stress.day / color (integer) : NEW hasdefault: default
17
+ hr_holidays / hr.leave.stress.day / company_id (many2one) : NEW relation: res.company, required, hasdefault: default
18
+ hr_holidays / hr.leave.stress.day / department_ids (many2many) : NEW relation: hr.department
19
+ hr_holidays / hr.leave.stress.day / end_date (date) : NEW required
20
+ hr_holidays / hr.leave.stress.day / name (char) : NEW required
21
+ hr_holidays / hr.leave.stress.day / resource_calendar_id (many2one): NEW relation: resource.calendar
22
+ hr_holidays / hr.leave.stress.day / start_date (date) : NEW required
23
+ # NOTHING TO DO: new feature
24
+
25
+ hr_holidays / hr.leave.type / allocation_validation_type (selection): selection_keys is now '['no', 'officer']' ('['no', 'officer', 'set']')
26
+ # DONE: post-migration: convert previous `set` values to `officer`. They acted the same except the responsible_id is not set. In that case, the user was selected as approver, which was incorrect.
27
+
28
+ ---XML records in module 'hr_holidays'---
29
+ NEW ir.actions.act_window: hr_holidays.hr_leave_stress_day_action
30
+ DEL ir.actions.act_window.view: hr_holidays.hr_leave_action_my_view_form
31
+ DEL ir.actions.act_window.view: hr_holidays.hr_leave_action_my_view_tree
32
+ NEW ir.model.access: hr_holidays.access_hr_holidays_cancel_leave
33
+ NEW ir.model.access: hr_holidays.access_hr_leave_stress_day_manager
34
+ NEW ir.model.access: hr_holidays.access_hr_leave_stress_day_user
35
+ NEW ir.model.constraint: hr_holidays.constraint_hr_leave_stress_day_date_from_after_day_to
36
+ NEW ir.rule: hr_holidays.hr_leave_stress_day_rule_multi_company (noupdate)
37
+ NEW ir.ui.menu: hr_holidays.hr_holidays_stress_day_menu_configuration
38
+ NEW ir.ui.view: hr_holidays.hr_holidays_cancel_leave_form
39
+ NEW ir.ui.view: hr_holidays.hr_leave_report_view_form
40
+ NEW ir.ui.view: hr_holidays.hr_leave_stress_day_view_form
41
+ NEW ir.ui.view: hr_holidays.hr_leave_stress_day_view_list
42
+ NEW ir.ui.view: hr_holidays.hr_leave_stress_day_view_search
43
+ NEW ir.ui.view: hr_holidays.hr_leave_view_kanban_approve_department
44
+ # NOTHING TO DO: managed by the ORM
@@ -0,0 +1,6 @@
1
+ ---Models in module 'hr_recruitment_survey'---
2
+ ---Fields in module 'hr_recruitment_survey'---
3
+ ---XML records in module 'hr_recruitment_survey'---
4
+ ---nothing has changed in this module--
5
+
6
+ # NOTHING TO DO
@@ -0,0 +1,24 @@
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
+
6
+ def _empty_images_on_answers(env):
7
+ """Clean images on those answers that had the check unmarked on the question, as
8
+ they didn't show the image in v15 even if they have one loaded. Now, not having the
9
+ check, the image will be displayed always.
10
+ """
11
+ env.cr.execute("SELECT id FROM survey_question WHERE NOT allow_value_image")
12
+ question_ids = env.cr.fetchall()
13
+ answers = env["survey.question.answer"].search(
14
+ [("value_image", "!=", False), ("question_id", "in", question_ids)]
15
+ )
16
+ answers.value_image = False
17
+
18
+
19
+ @openupgrade.migrate()
20
+ def migrate(env, version):
21
+ _empty_images_on_answers(env)
22
+ openupgrade.delete_records_safely_by_xml_id(
23
+ env, ["survey.survey_action_server_clean_test_answers"]
24
+ )
@@ -0,0 +1,14 @@
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
+ _xmlids_renames = [
6
+ ("survey.survey_form", "survey.survey_survey_view_form"),
7
+ ("survey.survey_kanban", "survey.survey_survey_view_kanban"),
8
+ ("survey.survey_tree", "survey.survey_survey_view_tree"),
9
+ ]
10
+
11
+
12
+ @openupgrade.migrate()
13
+ def migrate(env, version):
14
+ openupgrade.rename_xmlids(env.cr, _xmlids_renames)
@@ -0,0 +1,48 @@
1
+ ---Models in module 'survey'---
2
+ ---Fields in module 'survey'---
3
+ survey / survey.question / allow_value_image (boolean) : DEL
4
+ # DONE: post-migration: Empty value_image on answers that had this check unmarked on the question. Now images are displayed always if they are present.
5
+
6
+ survey / survey.question / background_image (binary) : NEW attachment: True, hasdefault: compute
7
+ # NOTHING TO DO: New feature. The first computation on the existing records is not perfomance-drainer.
8
+
9
+ survey / survey.question / column_nb (selection) : DEL selection_keys: ['12', '2', '3', '4', '6']
10
+ # NOTHING TO DO: Feature already hidden in previous version
11
+
12
+ survey / survey.question / question_placeholder (char) : NEW hasdefault: compute
13
+ # NOTHING TO DO: New feature. The first computation on the existing records is not perfomance-drainer.
14
+
15
+ survey / survey.question.answer / value_image_filename (char) : NEW
16
+ # NOTHING TO DO: New helper field for storing the image filename (only as reference, no other reflection). Existing uploaded images won't have that name, but that was the case in v15.
17
+
18
+ survey / survey.survey / _order : _order is now 'create_date DESC' ('id')
19
+ # NOTHING TO DO: New model sorting criteria
20
+
21
+ survey / survey.user_input / activity_ids (one2many) : NEW relation: mail.activity
22
+ survey / survey.user_input / message_follower_ids (one2many): NEW relation: mail.followers
23
+ survey / survey.user_input / message_ids (one2many) : NEW relation: mail.message
24
+ survey / survey.user_input / message_main_attachment_id (many2one): NEW relation: ir.attachment
25
+ survey / survey.user_input / website_message_ids (one2many): NEW relation: mail.message
26
+ # NOTHING TO DO: New feature in the answers to have its own chatter.
27
+
28
+ ---XML records in module 'survey'---
29
+ DEL ir.actions.server: survey.survey_action_server_clean_test_answers (noupdate)
30
+ # DONE: Try to delete the record.
31
+
32
+ DEL ir.ui.menu: survey.survey_menu_user_inputs
33
+ NEW ir.ui.view: survey.question_result_number_or_date_or_datetime
34
+ NEW ir.ui.view: survey.survey_question_answer_view_form
35
+ NEW ir.ui.view: survey.survey_remove_unnecessary_decimals
36
+ NEW ir.ui.view: survey.survey_results_filters
37
+ NEW ir.ui.view: survey.survey_survey_view_graph
38
+ NEW ir.ui.view: survey.survey_survey_view_pivot
39
+ DEL ir.ui.view: survey.question_result_number_or_date
40
+ # NOTHING TO DO: noupdate=0 records hanlded by ORM.
41
+
42
+ DEL ir.ui.view: survey.survey_form
43
+ NEW ir.ui.view: survey.survey_survey_view_form
44
+ DEL ir.ui.view: survey.survey_kanban
45
+ NEW ir.ui.view: survey.survey_survey_view_kanban
46
+ DEL ir.ui.view: survey.survey_tree
47
+ NEW ir.ui.view: survey.survey_survey_view_tree
48
+ # DONE: Just for completion and double safety, rename XML-IDs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade-scripts
3
- Version: 16.0.1.0.3.143
3
+ Version: 16.0.1.0.3.155
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)
@@ -135,16 +135,25 @@ odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/tests/__init__.py,sha256=qa6
135
135
  odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/tests/data.py,sha256=LswyfUF0owjdxQaiJGxY2wqCzFfthhDApb-v9r2VgBA,9908
136
136
  odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/tests/test_hr_migration.py,sha256=a8LNu8hi7cVc4xmuuz4_qpjZ-f2LDb_uELWPUAjlApI,2142
137
137
  odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/noupdate_changes.xml,sha256=nU-PUX2tc-1kcCkKJHQjMHRrhxhT1IagEMvaC3jUjv0,439
138
+ odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/post-migration.py,sha256=xGeFaLZifgKwYW-ah2gswd6O-N066mnmP_G1dmPa1CY,175
138
139
  odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/upgrade_analysis.txt,sha256=Q01smh269EHWk6UvEn2QC3nOuyE24BYRaQMiUCNKrH0,719
139
- odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/noupdate_changes.xml,sha256=ON6XfbktyjXtO385zNyyhmKcPJivlgSbGPaamtG1pF0,442
140
+ odoo/addons/openupgrade_scripts/scripts/hr_attendance/16.0.2.0/upgrade_analysis_work.txt,sha256=_j-bbcB5Iy78MpvJw0d_kfrqGufDA_FHFy5u51wWe2k,1089
141
+ odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/noupdate_changes.xml,sha256=mnl3pmPfX06TNYbs7uxv8X2XsH-6ZqP-s2g9PceDQLE,449
142
+ odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/post-migration.py,sha256=ByGJfZQ1-CBQ9ORoX_ABDvcqXBWuXkoAGNZX95tYAaU,297
140
143
  odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/upgrade_analysis.txt,sha256=mJOLGScbyvtjLYM5H6dnlqyKL-F5rQYWF9zvqyXZYh0,1066
144
+ odoo/addons/openupgrade_scripts/scripts/hr_contract/16.0.1.0/upgrade_analysis_work.txt,sha256=StrTtd3_ysYjSWOynWGDcnxFaEfr9rLOQPNdl2e2k0g,1395
141
145
  odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/noupdate_changes.xml,sha256=SDRjZLGDKLTmL_xK_a1q9a_8JpXCgJkz27Nt0B1vlMs,1133
146
+ odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/post-migration.py,sha256=eUV3kkrEWFlyAOEH1-z0llJJ6qjKdpPyzYmySEN_q-M,2321
147
+ odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/pre-migration.py,sha256=cxJDD2gBCL0Vd7i4vn4falwON0YOy67OsAbpMqor1lU,3801
142
148
  odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/upgrade_analysis.txt,sha256=jcxZTjMentbGt3vqdFaG_9NX9sb9KHtJyGfZlw6V4us,4453
149
+ odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/upgrade_analysis_work.txt,sha256=fvIrFIWUu-yyxh7PoSfj5EuaXqmVntzftuov5P55fSw,4523
143
150
  odoo/addons/openupgrade_scripts/scripts/hr_fleet/16.0.1.0/upgrade_analysis.txt,sha256=3Z06g4YG8NTmD-qV6to7RhPJbqkUPhxqppzKVzunw0w,492
144
151
  odoo/addons/openupgrade_scripts/scripts/hr_gamification/16.0.1.0/upgrade_analysis.txt,sha256=cMaEUAXfvHRW3vwIZMIrGROH5eDQjRAbqLkraqvEj-4,168
145
152
  odoo/addons/openupgrade_scripts/scripts/hr_gamification/16.0.1.0/upgrade_analysis_work.txt,sha256=3iBxaIQTm-sWLBp43p9C6sjlz2cEs0Bw8yf-0VOL0LM,185
146
153
  odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/noupdate_changes.xml,sha256=bq3L_KlIGBVh9BSCmAWA-HVg6LhfQ-2sg-Jr2N1Fi0c,1247
154
+ odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/post-migration.py,sha256=7JcDNJ9XUGHfIF_HBlbm2oCpSJcikpORoZDceOzxN9Q,880
147
155
  odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/upgrade_analysis.txt,sha256=dfAqkleufTqu1igQSi5idj9F69YorN3v8Ff5Mg2Ki5s,2281
156
+ odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.5/upgrade_analysis_work.txt,sha256=J-9r6yzuGnja9LCx0CkifNxnZFYDRGpY2jUq5Icy-bc,2771
148
157
  odoo/addons/openupgrade_scripts/scripts/hr_holidays_attendance/16.0.1.0/noupdate_changes.xml,sha256=OzxdaoxV1NybA2Xp2qjTU-nG7auZaqwmpHCYoSLZglk,168
149
158
  odoo/addons/openupgrade_scripts/scripts/hr_holidays_attendance/16.0.1.0/upgrade_analysis.txt,sha256=iIq0WvegXemuojBa9KNPlGlhwcCG_xMgIKgY9pLymmg,273
150
159
  odoo/addons/openupgrade_scripts/scripts/hr_hourly_cost/16.0.1.0/upgrade_analysis.txt,sha256=c8u8sEURXNF87Lt3UWDf9VyrxImSdSqG4OOnoCZDAB4,275
@@ -160,6 +169,7 @@ odoo/addons/openupgrade_scripts/scripts/hr_recruitment/16.0.1.1/upgrade_analysis
160
169
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment/16.0.1.1/upgrade_analysis_work.txt,sha256=c3WHcrrqfsqosx-k1LF1rNkinSa8fMuq3YWbKv-oTQk,3348
161
170
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_skills/16.0.1.0/upgrade_analysis.txt,sha256=M9639cCz-6oKY1NC7XA8u2-k-hf9_1mCdaHAptDOt2c,1529
162
171
  odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/16.0.1.0/upgrade_analysis.txt,sha256=GMRU5w0aGxnHsHkGm4Jhkco0Dq2iGJ5b5DoX8nCamQk,186
172
+ odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/16.0.1.0/upgrade_analysis_work.txt,sha256=_1c4hfHB2K9SFxCDO2N1cNUg_IUJ3AIp7lByQF103lI,203
163
173
  odoo/addons/openupgrade_scripts/scripts/hr_skills/16.0.1.0/noupdate_changes.xml,sha256=ZuJuErC3ewPYGLlOByjzcX3qEo43aQtG8-TQlXrcCBA,456
164
174
  odoo/addons/openupgrade_scripts/scripts/hr_skills/16.0.1.0/upgrade_analysis.txt,sha256=Oo6V5SlbCldLM72UmYstrO1HKjJbHDoxyG3cP5lLnFs,3033
165
175
  odoo/addons/openupgrade_scripts/scripts/hr_skills_slides/16.0.1.0/upgrade_analysis.txt,sha256=rrtYD2Z3hZU9o7NavHC6-NhEq9c4UT4rWYs1eVtVoxg,186
@@ -523,7 +533,10 @@ odoo/addons/openupgrade_scripts/scripts/stock_dropshipping/16.0.1.0/upgrade_anal
523
533
  odoo/addons/openupgrade_scripts/scripts/stock_landed_costs/16.0.1.1/upgrade_analysis.txt,sha256=WFU81Vt8XuuK9wkxAIUUtohVnUdyOzBtg08-3QGxKh8,177
524
534
  odoo/addons/openupgrade_scripts/scripts/stock_picking_batch/16.0.1.0/upgrade_analysis.txt,sha256=-vWDvtNd94zMYD8LIYGJT_AiaYq4lZvCh4Jv9vL4paE,1327
525
535
  odoo/addons/openupgrade_scripts/scripts/stock_sms/16.0.1.0/upgrade_analysis.txt,sha256=WmtD-QRPZnTjNKvErYIFRz_n-t4C2ttxPz_9eYkTOrw,150
536
+ odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/post-migration.py,sha256=6-FUi-2MkJaOtE7qff_gIJBvPHdT6ugIf_ncjfpqatA,906
537
+ odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/pre-migration.py,sha256=CgXlObR_j--DZRjzxdOJhv784bfQCvqmf3l7S_EWCxg,472
526
538
  odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/upgrade_analysis.txt,sha256=PZH-5KdMrPL-ozdlDCC5igHDzfcs7rIHqjdRhACr7mg,1977
539
+ odoo/addons/openupgrade_scripts/scripts/survey/16.0.3.5/upgrade_analysis_work.txt,sha256=S6ua954ALVHqYfzvXjtQ4DegqwWwEVZkdgxbmizW0LY,2849
527
540
  odoo/addons/openupgrade_scripts/scripts/transifex/16.0.1.0/upgrade_analysis.txt,sha256=3vfZSjXSINOH_SE9C8mH77q-t2H8KxatKzbAQ5HY7Uc,1120
528
541
  odoo/addons/openupgrade_scripts/scripts/uom/16.0.1.0/upgrade_analysis.txt,sha256=a5PetNi2DgHpGqqOp4U9sM8bpk7yayokWIU5MOfSTu4,137
529
542
  odoo/addons/openupgrade_scripts/scripts/uom/16.0.1.0/upgrade_analysis_work.txt,sha256=byYT_AMkKr8rU-mX88VuQZjIKKtxltSuL-ph5q5EScE,189
@@ -611,7 +624,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
611
624
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
612
625
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
613
626
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
614
- odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info/METADATA,sha256=eNfbBmKiBtBSjz2opuCRs0Vav1RKBIdO5uxIxqLPGz4,3810
615
- odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
616
- odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
617
- odoo_addon_openupgrade_scripts-16.0.1.0.3.143.dist-info/RECORD,,
627
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info/METADATA,sha256=9YkD_SZhpY8K7O5IrM86EbLONApbMaMNoqm1MJA7Wv0,3810
628
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
629
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
630
+ odoo_addon_openupgrade_scripts-16.0.1.0.3.155.dist-info/RECORD,,