odoo-addon-openupgrade-scripts 15.0.1.0.0.374__py3-none-any.whl → 15.0.1.0.0.380__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.
- odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py +11 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/post-migration.py +22 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/pre-migration.py +66 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/upgrade_analysis_work.txt +86 -0
- odoo/addons/openupgrade_scripts/scripts/purchase_mrp/15.0.1.0/upgrade_analysis_work.txt +6 -0
- {odoo_addon_openupgrade_scripts-15.0.1.0.0.374.dist-info → odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-15.0.1.0.0.374.dist-info → odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info}/RECORD +9 -5
- {odoo_addon_openupgrade_scripts-15.0.1.0.0.374.dist-info → odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-15.0.1.0.0.374.dist-info → odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,18 @@ def _fill_payment_state(env):
|
|
14
14
|
# v14 these ones were not computed being of type `entry`, which changes now
|
15
15
|
# on v15 if the method `_payment_state_matters` returns True, which is the
|
16
16
|
# case for the expense moves
|
17
|
+
# Disable the reconciliation check to be able to update reconciled moves
|
18
|
+
_check_reconciliation = env["account.move.line"].__class__._check_reconciliation
|
19
|
+
_check_fiscalyear_lock_date = env[
|
20
|
+
"account.move"
|
21
|
+
].__class__._check_fiscalyear_lock_date
|
22
|
+
env["account.move.line"].__class__._check_reconciliation = lambda self: None
|
23
|
+
env["account.move"].__class__._check_fiscalyear_lock_date = lambda self: None
|
17
24
|
env["hr.expense.sheet"].search([]).account_move_id._compute_amount()
|
25
|
+
env["account.move.line"].__class__._check_reconciliation = _check_reconciliation
|
26
|
+
env[
|
27
|
+
"account.move"
|
28
|
+
].__class__._check_fiscalyear_lock_date = _check_fiscalyear_lock_date
|
18
29
|
# Now perform the SQL to transfer the payment_state
|
19
30
|
openupgrade.logged_query(
|
20
31
|
env.cr,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Copyright 2023 ForgeFlow
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
|
7
|
+
def fill_mrp_workorder_costs_hour(env):
|
8
|
+
openupgrade.logged_query(
|
9
|
+
env.cr,
|
10
|
+
"""
|
11
|
+
UPDATE mrp_workorder mwo
|
12
|
+
SET costs_hour = mwc.costs_hour
|
13
|
+
FROM mrp_workcenter mwc
|
14
|
+
WHERE mwo.workcenter_id = mwc.id AND mwo.state = 'done'
|
15
|
+
""",
|
16
|
+
)
|
17
|
+
|
18
|
+
|
19
|
+
@openupgrade.migrate()
|
20
|
+
def migrate(env, version):
|
21
|
+
fill_mrp_workorder_costs_hour(env)
|
22
|
+
openupgrade.load_data(env.cr, "mrp", "15.0.2.0/noupdate_changes.xml")
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Copyright 2023 ForgeFlow
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
|
7
|
+
def fill_mrp_routing_workcenter_active(env):
|
8
|
+
if openupgrade.column_exists(env.cr, "mrp_routing_workcenter", "active"):
|
9
|
+
return
|
10
|
+
openupgrade.add_fields(
|
11
|
+
env,
|
12
|
+
[
|
13
|
+
(
|
14
|
+
"active",
|
15
|
+
"mrp.routing.workcenter",
|
16
|
+
"mrp_routing_workcenter",
|
17
|
+
"boolean",
|
18
|
+
"bool",
|
19
|
+
"mrp",
|
20
|
+
True,
|
21
|
+
)
|
22
|
+
],
|
23
|
+
)
|
24
|
+
|
25
|
+
|
26
|
+
def fill_mrp_routing_workcenter_bom_id(env):
|
27
|
+
openupgrade.logged_query(
|
28
|
+
env.cr,
|
29
|
+
"""
|
30
|
+
UPDATE mrp_routing_workcenter mrw
|
31
|
+
SET bom_id = mbl.bom_id
|
32
|
+
FROM mrp_bom_line mbl
|
33
|
+
WHERE mrw.bom_id IS NULL AND mbl.operation_id = mrw.id
|
34
|
+
""",
|
35
|
+
)
|
36
|
+
openupgrade.logged_query(
|
37
|
+
env.cr,
|
38
|
+
"""
|
39
|
+
UPDATE mrp_routing_workcenter mrw
|
40
|
+
SET bom_id = mbb.bom_id
|
41
|
+
FROM mrp_bom_byproduct mbb
|
42
|
+
WHERE mrw.bom_id IS NULL AND mbb.operation_id = mrw.id
|
43
|
+
""",
|
44
|
+
)
|
45
|
+
openupgrade.logged_query(
|
46
|
+
env.cr,
|
47
|
+
"""
|
48
|
+
UPDATE mrp_routing_workcenter mrw
|
49
|
+
SET bom_id = mp.bom_id
|
50
|
+
FROM stock_move sm
|
51
|
+
JOIN mrp_production mp ON sm.raw_material_production_id = mp.id
|
52
|
+
WHERE mrw.bom_id IS NULL AND sm.operation_id = mrw.id
|
53
|
+
""",
|
54
|
+
)
|
55
|
+
|
56
|
+
|
57
|
+
@openupgrade.migrate()
|
58
|
+
def migrate(env, version):
|
59
|
+
fill_mrp_routing_workcenter_active(env)
|
60
|
+
fill_mrp_routing_workcenter_bom_id(env)
|
61
|
+
openupgrade.convert_field_to_html(
|
62
|
+
env.cr, "mrp_routing_workcenter", "note", "note", verbose=False
|
63
|
+
)
|
64
|
+
openupgrade.convert_field_to_html(
|
65
|
+
env.cr, "mrp_workcenter", "note", "note", verbose=False
|
66
|
+
)
|
@@ -0,0 +1,86 @@
|
|
1
|
+
---Models in module 'mrp'---
|
2
|
+
new model mrp.workcenter.tag
|
3
|
+
# NOTHING TO DO
|
4
|
+
|
5
|
+
---Fields in module 'mrp'---
|
6
|
+
mrp / mrp.bom / _order : _order is now 'sequence, id' ('sequence')
|
7
|
+
mrp / mrp.bom.byproduct / _order : _order is now 'sequence, id' ('id')
|
8
|
+
mrp / mrp.routing.workcenter / _order : _order is now 'bom_id, sequence, id' ('sequence, id')
|
9
|
+
# NOTHING TO DO
|
10
|
+
|
11
|
+
mrp / mrp.bom.byproduct / allowed_operation_ids (many2many): not a function anymore
|
12
|
+
mrp / mrp.bom.byproduct / allowed_operation_ids (many2many): now related
|
13
|
+
mrp / mrp.bom.byproduct / allowed_operation_ids (many2many): type is now 'one2many' ('many2many')
|
14
|
+
mrp / mrp.bom.line / allowed_operation_ids (many2many): not a function anymore
|
15
|
+
mrp / mrp.bom.line / allowed_operation_ids (many2many): now related
|
16
|
+
mrp / mrp.bom.line / allowed_operation_ids (many2many): type is now 'one2many' ('many2many')
|
17
|
+
mrp / mrp.bom.line / possible_bom_product_template_attribute_value_ids (many2many): not a function anymore
|
18
|
+
mrp / mrp.bom.line / possible_bom_product_template_attribute_value_ids (many2many): now related
|
19
|
+
mrp / stock.move / allowed_operation_ids (many2many): not a function anymore
|
20
|
+
mrp / stock.move / allowed_operation_ids (many2many): now related
|
21
|
+
mrp / stock.move / allowed_operation_ids (many2many): type is now 'one2many' ('many2many')
|
22
|
+
mrp / mrp.routing.workcenter / bom_id (many2one) : now required
|
23
|
+
# DONE: pre-migration: filled workcenter bom_id in case is empty
|
24
|
+
|
25
|
+
mrp / mrp.bom.byproduct / bom_product_template_attribute_value_ids (many2many): NEW relation: product.template.attribute.value
|
26
|
+
mrp / mrp.routing.workcenter / bom_product_template_attribute_value_ids (many2many): NEW relation: product.template.attribute.value
|
27
|
+
mrp / mrp.bom.byproduct / cost_share (float) : NEW
|
28
|
+
mrp / mrp.bom.byproduct / sequence (integer) : NEW
|
29
|
+
# NOTHING TO DO: new features
|
30
|
+
|
31
|
+
mrp / mrp.bom.line / product_tmpl_id (many2one) : is now stored
|
32
|
+
mrp / mrp.production / is_planned (boolean) : is now stored
|
33
|
+
# NOTHING TO DO: related/computed fields
|
34
|
+
|
35
|
+
mrp / mrp.routing.workcenter / active (boolean) : NEW hasdefault: default
|
36
|
+
# DONE: pre-migration: set active = true
|
37
|
+
|
38
|
+
mrp / mrp.routing.workcenter / company_id (many2one) : not stored anymore
|
39
|
+
mrp / mrp.routing.workcenter / company_id (many2one) : now related
|
40
|
+
mrp / mrp.workorder / consumption (selection) : not stored anymore
|
41
|
+
mrp / mrp.workorder / consumption (selection) : now related
|
42
|
+
mrp / mrp.workorder / consumption (selection) : selection_keys is now 'function' ('['flexible', 'strict', 'warning']')
|
43
|
+
# NOTHING TO DO
|
44
|
+
|
45
|
+
mrp / mrp.routing.workcenter / note (text) : type is now 'html' ('text')
|
46
|
+
mrp / mrp.workcenter / note (text) : type is now 'html' ('text')
|
47
|
+
mrp / mrp.workorder / operation_note (text) : type is now 'html' ('text')
|
48
|
+
# DONE: pre-migration: converted fields (operation_note is related)
|
49
|
+
|
50
|
+
mrp / mrp.workcenter / tag_ids (many2many) : NEW relation: mrp.workcenter.tag
|
51
|
+
mrp / mrp.workcenter.tag / color (integer) : NEW hasdefault: default
|
52
|
+
mrp / mrp.workcenter.tag / name (char) : NEW required
|
53
|
+
# NOTHING TO DO: mrp.workcenter.tag is new model
|
54
|
+
|
55
|
+
mrp / mrp.workorder / costs_hour (float) : NEW hasdefault: default
|
56
|
+
# DONE: post-migration: put same costs_hour as its workcenter when workorder.state = 'done'
|
57
|
+
|
58
|
+
mrp / stock.move / cost_share (float) : NEW
|
59
|
+
# NOTHING TO DO: new feature
|
60
|
+
|
61
|
+
mrp / mrp.workorder / state (selection) : now a function
|
62
|
+
mrp / mrp.workorder / state (selection) : selection_keys is now '['cancel', 'done', 'pending', 'progress', 'ready', 'waiting']' ('['cancel', 'done', 'pending', 'progress', 'ready']')
|
63
|
+
# NOTHING TO DO: added 'waiting' option
|
64
|
+
|
65
|
+
---XML records in module 'mrp'---
|
66
|
+
NEW ir.actions.act_window: mrp.act_assign_serial_numbers_production
|
67
|
+
NEW ir.actions.report: mrp.label_production_order
|
68
|
+
NEW ir.model.access: mrp.access_mrp_workcenter_tag_group_user
|
69
|
+
NEW ir.model.access: mrp.access_mrp_workcenter_tag_manager
|
70
|
+
NEW ir.model.constraint: mrp.constraint_mrp_workcenter_tag_tag_name_unique
|
71
|
+
NEW ir.ui.view: mrp.mrp_routing_workcenter_bom_tree_view
|
72
|
+
NEW ir.ui.view: mrp.mrp_routing_workcenter_copy_to_bom_tree_view
|
73
|
+
NEW ir.ui.view: mrp.mrp_routing_workcenter_filter
|
74
|
+
NEW ir.ui.view: mrp.report_mrp_byproduct_line
|
75
|
+
NEW ir.ui.view: mrp.report_reception_report_label_mrp
|
76
|
+
NEW ir.ui.view: mrp.stock_scrap_search_view_inherit_mrp
|
77
|
+
NEW ir.ui.view: mrp.view_assign_serial_numbers_production
|
78
|
+
NEW ir.ui.view: mrp.view_picking_form_inherit_mrp
|
79
|
+
NEW ir.ui.view: mrp.view_stock_move_line_detailed_operation_tree_mrp
|
80
|
+
DEL ir.ui.view: mrp.assets_backend
|
81
|
+
DEL ir.ui.view: mrp.assets_common
|
82
|
+
DEL ir.ui.view: mrp.qunit_suite
|
83
|
+
DEL ir.ui.view: mrp.view_production_gantt
|
84
|
+
NEW res.groups: mrp.group_unlocked_by_default
|
85
|
+
DEL res.groups: mrp.group_locked_by_default
|
86
|
+
# NOTHING TO DO
|
@@ -0,0 +1,6 @@
|
|
1
|
+
---Models in module 'purchase_mrp'---
|
2
|
+
---Fields in module 'purchase_mrp'---
|
3
|
+
---XML records in module 'purchase_mrp'---
|
4
|
+
NEW ir.model.access: purchase_mrp.access_mrp_bom_line_purchase_user
|
5
|
+
NEW ir.model.access: purchase_mrp.access_mrp_bom_purchase_user
|
6
|
+
# NOTHING TO DO
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-openupgrade-scripts
|
3
|
-
Version: 15.0.1.0.0.
|
3
|
+
Version: 15.0.1.0.0.380
|
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)
|
@@ -168,7 +168,7 @@ odoo/addons/openupgrade_scripts/scripts/hr_contract/15.0.1.0/pre-migration.py,sh
|
|
168
168
|
odoo/addons/openupgrade_scripts/scripts/hr_contract/15.0.1.0/upgrade_analysis.txt,sha256=9kL-dXhj7ZJUf3ZUiZY2RxSLYLBQVpVDaEhkmN-Kl1o,1677
|
169
169
|
odoo/addons/openupgrade_scripts/scripts/hr_contract/15.0.1.0/upgrade_analysis_work.txt,sha256=sUl4hhfNWmbvyskqR26Meg_g1CxZwoSsn7PVoewjQ7A,1967
|
170
170
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/noupdate_changes.xml,sha256=dMUUfRJ75PVxQYe7pGpE-6hllgKO5DtrEr6_1ki9oW8,1307
|
171
|
-
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py,sha256=
|
171
|
+
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/post-migration.py,sha256=bWIL4UxBmCwiK6lYuGQyImWVQ85q08ZSqOFKO3nK6Sc,1782
|
172
172
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/pre-migration.py,sha256=0jJvJ2FNOm2CLFZQJSi6OEI3Tv-5AXV1Sb1bXO5bd7U,553
|
173
173
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/upgrade_analysis.txt,sha256=Kg3-cC-kvp3E3YTvK4IX5_NCMr32Tq2CNRLebCgUxyk,1664
|
174
174
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/15.0.2.0/upgrade_analysis_work.txt,sha256=6LDJ5RaB8fPhUsebYCJuVHj61Vq4L-cHhI4QjyY_BnI,2042
|
@@ -388,7 +388,10 @@ odoo/addons/openupgrade_scripts/scripts/microsoft_calendar/15.0.1.0/upgrade_anal
|
|
388
388
|
odoo/addons/openupgrade_scripts/scripts/microsoft_calendar/15.0.1.0/upgrade_analysis_work.txt,sha256=D6yIdTmAltFV8HfrXl0tlNqbftXxhDZnS6w07p3a50k,330
|
389
389
|
odoo/addons/openupgrade_scripts/scripts/microsoft_outlook/15.0.1.0/upgrade_analysis.txt,sha256=z2Avhmp69lxCI-2aP3WRa-FuJ0AIAwjSuGokMGfjdnc,174
|
390
390
|
odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/noupdate_changes.xml,sha256=5zeIVENo6PAgwfcu2lgNwi1farn8MOIZnyfG3nedn6U,178
|
391
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/post-migration.py,sha256=bSPHtStoJoZyELfVuar-2_Iaj7MAMi7MiuF2jLNFaaI,585
|
392
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/pre-migration.py,sha256=vLS4ntpPa1IcOd2O5bubFPWwTIs4nLbj4xmhbfcRD8I,1791
|
391
393
|
odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/upgrade_analysis.txt,sha256=6nxSAbYJVkBzSvg9eqhO97JtREWiE8VjK0SQ6k9QA3g,5065
|
394
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/15.0.2.0/upgrade_analysis_work.txt,sha256=yvdxL153XKWmmd6FQv_MtwE6VMnWZdFaFdt3tNiw-pw,5596
|
392
395
|
odoo/addons/openupgrade_scripts/scripts/mrp_account/15.0.1.0/upgrade_analysis.txt,sha256=ux7xgY1d5PKlJSnG1vHYrGz9-E9QMD5NgDi7B2RSMEc,1261
|
393
396
|
odoo/addons/openupgrade_scripts/scripts/mrp_landed_costs/15.0.1.0/upgrade_analysis.txt,sha256=5nXyL4HwISqtYoWtiWaRdUNUoUOIK0JpvbyhG2vN-qo,171
|
394
397
|
odoo/addons/openupgrade_scripts/scripts/mrp_subcontracting/15.0.0.1/noupdate_changes.xml,sha256=Ff0vwjLwPv_ODjLYCCwPmKUh3kExzrCKNkOQok-BM0Q,182
|
@@ -515,6 +518,7 @@ odoo/addons/openupgrade_scripts/scripts/purchase/15.0.1.2/pre-migration.py,sha25
|
|
515
518
|
odoo/addons/openupgrade_scripts/scripts/purchase/15.0.1.2/upgrade_analysis.txt,sha256=o8auGEhgteHx42ogE_XVpaX7DSSAZD5_KL93A4OjfRA,1263
|
516
519
|
odoo/addons/openupgrade_scripts/scripts/purchase/15.0.1.2/upgrade_analysis_work.txt,sha256=3PtOJ2dHTFMqQH6iQHpikX74LPaAY4I5qYnnrvE63cE,1490
|
517
520
|
odoo/addons/openupgrade_scripts/scripts/purchase_mrp/15.0.1.0/upgrade_analysis.txt,sha256=7jv5cJKm-Y377Aw--BWl-nBaxoijKSdI7NtBfJIi3wg,250
|
521
|
+
odoo/addons/openupgrade_scripts/scripts/purchase_mrp/15.0.1.0/upgrade_analysis_work.txt,sha256=nXXWyBjuBGTKEMF6QfE8xz5cX-BzfDYgqDJbJ_0G8Vo,265
|
518
522
|
odoo/addons/openupgrade_scripts/scripts/purchase_product_matrix/15.0.1.0/upgrade_analysis.txt,sha256=SMLzmOiI6H29ad7PDpw6AHte_oHxOLS__Mga7-Y1204,329
|
519
523
|
odoo/addons/openupgrade_scripts/scripts/purchase_requisition/15.0.0.1/post-migration.py,sha256=YAQ4rftWjUosxGEZimkkSHHowXUElGLmwjQCJDO2vU4,269
|
520
524
|
odoo/addons/openupgrade_scripts/scripts/purchase_requisition/15.0.0.1/pre-migration.py,sha256=kCJdoThZczKqmunB6y2of-41-GJ7a3BL-QFshaQLod8,238
|
@@ -761,7 +765,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/15.0.1.0/upgrade_analysi
|
|
761
765
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
762
766
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
763
767
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=s3mIFwyEmmeeUo4Vb8_kg863qPkRF6fgPb4ZemTd06I,12083
|
764
|
-
odoo_addon_openupgrade_scripts-15.0.1.0.0.
|
765
|
-
odoo_addon_openupgrade_scripts-15.0.1.0.0.
|
766
|
-
odoo_addon_openupgrade_scripts-15.0.1.0.0.
|
767
|
-
odoo_addon_openupgrade_scripts-15.0.1.0.0.
|
768
|
+
odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info/METADATA,sha256=-8uVpo-FYbqwYHfFtRFteicyh5pY0P-Dm_p09ldoqyY,3420
|
769
|
+
odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
770
|
+
odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
771
|
+
odoo_addon_openupgrade_scripts-15.0.1.0.0.380.dist-info/RECORD,,
|
File without changes
|