odoo-addon-openupgrade-scripts 18.0.1.0.0.121__py3-none-any.whl → 18.0.1.0.0.131__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/auth_oauth/18.0.1.0/upgrade_analysis_work.txt +5 -0
- odoo/addons/openupgrade_scripts/scripts/hr_gamification/18.0.1.0/upgrade_analysis_work.txt +5 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/post-migration.py +31 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/pre-migration.py +36 -0
- odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/upgrade_analysis_work.txt +103 -0
- odoo/addons/openupgrade_scripts/scripts/mrp_account/18.0.1.0/post-migration.py +11 -0
- odoo/addons/openupgrade_scripts/scripts/mrp_account/18.0.1.0/upgrade_analysis_work.txt +53 -0
- odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/post-migration.py +17 -0
- odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/pre-migration.py +97 -0
- odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/upgrade_analysis_work.txt +20 -0
- odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/post-migration.py +14 -0
- odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/pre-migration.py +13 -0
- odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/upgrade_analysis_work.txt +6 -0
- {odoo_addon_openupgrade_scripts-18.0.1.0.0.121.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-18.0.1.0.0.121.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info}/RECORD +17 -4
- {odoo_addon_openupgrade_scripts-18.0.1.0.0.121.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-18.0.1.0.0.121.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright 2025 Hunki Enterprises BV
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
|
7
|
+
def mrp_document_to_product_document(env):
|
8
|
+
"""
|
9
|
+
mrp.document has been replaced by product.document.
|
10
|
+
copy all records of mrp_document to product_document, keep a link
|
11
|
+
"""
|
12
|
+
link_column = openupgrade.get_legacy_name("mrp_document_id")
|
13
|
+
openupgrade.add_columns(
|
14
|
+
env,
|
15
|
+
[("product.document", link_column, "integer")],
|
16
|
+
)
|
17
|
+
openupgrade.logged_query(
|
18
|
+
env.cr,
|
19
|
+
f"""
|
20
|
+
INSERT INTO product_document
|
21
|
+
(ir_attachment_id, active, sequence, {link_column})
|
22
|
+
SELECT
|
23
|
+
ir_attachment_id, active, 10-COALESCE(priority, '0')::int, id
|
24
|
+
FROM mrp_document
|
25
|
+
""",
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
@openupgrade.migrate()
|
30
|
+
def migrate(env, version):
|
31
|
+
mrp_document_to_product_document(env)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2025 Hunki Enterprises BV
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
add_columns = [
|
7
|
+
("product.document", "attached_on_mrp", "char", "hidden"),
|
8
|
+
]
|
9
|
+
|
10
|
+
copy_columns = {
|
11
|
+
"mrp_production": [
|
12
|
+
("location_dest_id", "location_final_id", "integer"),
|
13
|
+
],
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
def mrp_workorder_sequence(env):
|
18
|
+
"""
|
19
|
+
Precreate sequence field and fill with operation_id.sequence or 100
|
20
|
+
"""
|
21
|
+
openupgrade.add_columns(env, [("mrp.workorder", "sequence", "integer", 100)])
|
22
|
+
env.cr.execute(
|
23
|
+
"""
|
24
|
+
UPDATE mrp_workorder
|
25
|
+
SET sequence=COALESCE(mrp_routing_workcenter.sequence, mrp_workorder.sequence)
|
26
|
+
FROM mrp_routing_workcenter
|
27
|
+
WHERE mrp_workorder.operation_id=mrp_routing_workcenter.id
|
28
|
+
"""
|
29
|
+
)
|
30
|
+
|
31
|
+
|
32
|
+
@openupgrade.migrate()
|
33
|
+
def migrate(env, version):
|
34
|
+
openupgrade.add_columns(env, add_columns)
|
35
|
+
openupgrade.copy_columns(env.cr, copy_columns)
|
36
|
+
mrp_workorder_sequence(env)
|
@@ -0,0 +1,103 @@
|
|
1
|
+
---Models in module 'mrp'---
|
2
|
+
obsolete model mrp.document (merged to product.document)
|
3
|
+
|
4
|
+
# DONE: copy records from mrp_document to product_document
|
5
|
+
|
6
|
+
new model mrp.batch.produce [transient]
|
7
|
+
|
8
|
+
# NOTHING TO DO
|
9
|
+
|
10
|
+
---Fields in module 'mrp'---
|
11
|
+
mrp / mrp.document / _inherits : DEL _inherits: {'ir.attachment': 'ir_attachment_id'}, stored: False
|
12
|
+
mrp / mrp.document / active (boolean) : DEL
|
13
|
+
mrp / mrp.document / ir_attachment_id (many2one) : DEL relation: ir.attachment, required
|
14
|
+
mrp / mrp.document / priority (selection) : DEL selection_keys: ['0', '1', '2', '3']
|
15
|
+
|
16
|
+
# DONE: see above
|
17
|
+
|
18
|
+
mrp / mrp.production / location_final_id (many2one) : NEW relation: stock.location
|
19
|
+
|
20
|
+
# DONE: copy from location_dest_id
|
21
|
+
|
22
|
+
mrp / mrp.production / never_product_template_attribute_value_ids (many2many): NEW relation: product.template.attribute.value
|
23
|
+
|
24
|
+
# NOTHING TO DO: new feature
|
25
|
+
|
26
|
+
mrp / mrp.production / search_date_category (selection): NEW selection_keys: ['after', 'before', 'day_1', 'day_2', 'today', 'yesterday'], stored: False
|
27
|
+
|
28
|
+
# NOTHING TO DO: virtual search field
|
29
|
+
|
30
|
+
mrp / mrp.routing.workcenter / activity_ids (one2many) : NEW relation: mail.activity
|
31
|
+
mrp / mrp.routing.workcenter / message_follower_ids (one2many): NEW relation: mail.followers
|
32
|
+
mrp / mrp.routing.workcenter / message_ids (one2many) : NEW relation: mail.message
|
33
|
+
mrp / mrp.routing.workcenter / rating_ids (one2many) : NEW relation: rating.rating
|
34
|
+
mrp / mrp.routing.workcenter / website_message_ids (one2many): NEW relation: mail.message
|
35
|
+
|
36
|
+
# NOTHING TO DO: mail/activity mixin added, new feature
|
37
|
+
|
38
|
+
mrp / mrp.unbuild / bom_id (many2one) : now a function
|
39
|
+
mrp / mrp.unbuild / lot_id (many2one) : now a function
|
40
|
+
|
41
|
+
# NOTHING TO DO: function are defaults
|
42
|
+
|
43
|
+
mrp / mrp.workcenter / message_follower_ids (one2many): NEW relation: mail.followers
|
44
|
+
mrp / mrp.workcenter / message_ids (one2many) : NEW relation: mail.message
|
45
|
+
mrp / mrp.workcenter / rating_ids (one2many) : NEW relation: rating.rating
|
46
|
+
mrp / mrp.workcenter / website_message_ids (one2many): NEW relation: mail.message
|
47
|
+
|
48
|
+
# NOTHING TO DO: mail mixin added, new feature
|
49
|
+
|
50
|
+
mrp / mrp.workorder / _order : _order is now 'sequence, leave_id, date_start, id' ('leave_id, date_start, id')
|
51
|
+
|
52
|
+
# DONE: set from operation_id.sequence
|
53
|
+
|
54
|
+
mrp / mrp.workorder / production_date (datetime) : not related anymore
|
55
|
+
mrp / mrp.workorder / production_date (datetime) : now a function
|
56
|
+
|
57
|
+
# NOTHING TO DO
|
58
|
+
|
59
|
+
mrp / mrp.workorder / sequence (integer) : NEW hasdefault: default
|
60
|
+
|
61
|
+
# DONE: see above
|
62
|
+
|
63
|
+
mrp / product.document / attached_on_mrp (selection) : NEW required, selection_keys: ['bom', 'hidden'], hasdefault: default
|
64
|
+
|
65
|
+
# NOTHING TO DO: we can't detect if a document has been attached via the bom or the product itself, so we keep the default 'hidden'
|
66
|
+
|
67
|
+
mrp / stock.move / manual_consumption (boolean) : not a function anymore
|
68
|
+
|
69
|
+
# NOTHING TO DO: can be edited manually now
|
70
|
+
|
71
|
+
mrp / stock.picking.type / use_auto_consume_components_lots (boolean): DEL
|
72
|
+
|
73
|
+
# NOTHING TO DO: replaced by manual_consumption being manually editable above
|
74
|
+
|
75
|
+
---XML records in module 'mrp'---
|
76
|
+
NEW ir.actions.act_window: mrp.action_mrp_batch_produce
|
77
|
+
NEW ir.actions.act_window: mrp.action_picking_tree_mrp_operation_graph
|
78
|
+
DEL ir.actions.act_window: mrp.act_assign_serial_numbers_production
|
79
|
+
NEW ir.actions.server: mrp.action_pause_workorders
|
80
|
+
NEW ir.actions.server: mrp.action_print_labels
|
81
|
+
NEW ir.actions.server: mrp.action_production_order_lock_unlock
|
82
|
+
NEW ir.actions.server: mrp.action_production_order_scrap
|
83
|
+
NEW ir.actions.server: mrp.action_start_workorders
|
84
|
+
NEW ir.model.access: mrp.access_mrp_batch_produce
|
85
|
+
NEW ir.model.access: mrp.access_stock_move_mrp_user
|
86
|
+
NEW ir.ui.view: mrp.mrp_production_workorder_tree_editable_view_mo_form
|
87
|
+
NEW ir.ui.view: mrp.product_document_form
|
88
|
+
NEW ir.ui.view: mrp.product_view_search_catalog
|
89
|
+
NEW ir.ui.view: mrp.view_mrp_batch_produce_form
|
90
|
+
NEW ir.ui.view: mrp.view_mrp_stock_move_operations
|
91
|
+
NEW ir.ui.view: mrp.view_stock_rule_form
|
92
|
+
DEL ir.ui.view: mrp.mrp_workorder_view_gantt
|
93
|
+
DEL ir.ui.view: mrp.view_assign_serial_numbers_production
|
94
|
+
DEL ir.ui.view: mrp.view_document_file_kanban_mrp
|
95
|
+
DEL ir.ui.view: mrp.view_mrp_document_form
|
96
|
+
DEL ir.ui.view: mrp.workcenter_line_gantt_production
|
97
|
+
NEW mail.message.subtype: mrp.mrp_mo_in_cancelled (noupdate)
|
98
|
+
NEW mail.message.subtype: mrp.mrp_mo_in_confirmed (noupdate)
|
99
|
+
NEW mail.message.subtype: mrp.mrp_mo_in_done (noupdate)
|
100
|
+
NEW mail.message.subtype: mrp.mrp_mo_in_progress (noupdate)
|
101
|
+
NEW mail.message.subtype: mrp.mrp_mo_in_to_close (noupdate)
|
102
|
+
|
103
|
+
# NOTHING TO DO
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Copyright 2025 Hunki Enterprises BV
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade, openupgrade_180
|
5
|
+
|
6
|
+
|
7
|
+
@openupgrade.migrate()
|
8
|
+
def migrate(env, version):
|
9
|
+
openupgrade_180.convert_company_dependent(
|
10
|
+
env, "product.category", "property_stock_account_production_cost_id"
|
11
|
+
)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---Models in module 'mrp_account'---
|
2
|
+
new model mrp.account.wip.accounting [transient]
|
3
|
+
new model mrp.account.wip.accounting.line [transient]
|
4
|
+
|
5
|
+
# NOTHING TO DO
|
6
|
+
|
7
|
+
---Fields in module 'mrp_account'---
|
8
|
+
mrp_account / account.analytic.applicability / business_domain (False) : selection_keys is now '['bill', 'expense', 'general', 'invoice', 'manufacturing_order', 'purchase_order', 'timesheet']' ('['bill', 'expense', 'general', 'invoice', 'manufacturing_order', 'purchase_order']')
|
9
|
+
|
10
|
+
# NOTHING TO DO: key added not connected to this module
|
11
|
+
|
12
|
+
mrp_account / account.move / wip_production_ids (many2many): NEW relation: mrp.production
|
13
|
+
|
14
|
+
# NOTHING TO DO: new functionality
|
15
|
+
|
16
|
+
mrp_account / mrp.bom / analytic_distribution_search (json): DEL stored: False
|
17
|
+
mrp_account / mrp.bom / analytic_distribution_text (text): DEL stored: False
|
18
|
+
mrp_account / mrp.bom / analytic_precision (integer) : DEL stored: False
|
19
|
+
|
20
|
+
# NOTHING TO DO: removed functionality
|
21
|
+
|
22
|
+
mrp_account / mrp.production / analytic_account_ids (many2many): DEL relation: account.analytic.account
|
23
|
+
|
24
|
+
# NOTHING TO DO: informational field derived from analytic distribution
|
25
|
+
|
26
|
+
mrp_account / mrp.production / analytic_distribution (json) : DEL
|
27
|
+
mrp_account / mrp.production / analytic_distribution_search (json): DEL stored: False
|
28
|
+
mrp_account / mrp.production / analytic_precision (integer) : DEL stored: False
|
29
|
+
mrp_account / mrp.workcenter / analytic_distribution_search (json): DEL stored: False
|
30
|
+
|
31
|
+
# NOTHING TO DO: changes of the analytic mixin
|
32
|
+
|
33
|
+
mrp_account / mrp.workcenter / expense_account_id (many2one) : NEW relation: account.account
|
34
|
+
mrp_account / mrp.workcenter.productivity / account_move_line_id (many2one): NEW relation: account.move.line
|
35
|
+
|
36
|
+
# NOTHING TO DO: new functionality
|
37
|
+
|
38
|
+
mrp_account / product.category / property_stock_account_production_cost_id (many2one): needs conversion to v18-style company dependent
|
39
|
+
|
40
|
+
# DONE in post-migration
|
41
|
+
|
42
|
+
---XML records in module 'mrp_account'---
|
43
|
+
NEW ir.actions.act_window: mrp_account.action_wip_accounting
|
44
|
+
NEW ir.model.access: mrp_account.access_mrp_wip_accounting
|
45
|
+
NEW ir.model.access: mrp_account.access_mrp_wip_accounting_line
|
46
|
+
NEW ir.model.constraint: mrp_account.constraint_mrp_account_wip_accounting_line_check_debit_credit
|
47
|
+
NEW ir.ui.view: mrp_account.mrp_workcenter_view_inherit
|
48
|
+
NEW ir.ui.view: mrp_account.view_move_form_inherit_mrp_account
|
49
|
+
NEW ir.ui.view: mrp_account.view_wip_accounting_form
|
50
|
+
DEL ir.ui.view: mrp_account.mrp_bom_form_view_inherited
|
51
|
+
DEL ir.ui.view: mrp_account.view_production_tree_view_inherit
|
52
|
+
|
53
|
+
# NOTHING TO DO
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade, openupgrade_180
|
4
|
+
|
5
|
+
|
6
|
+
def convert_company_dependent(env):
|
7
|
+
openupgrade_180.convert_company_dependent(
|
8
|
+
env, "product.category", "property_account_creditor_price_difference_categ"
|
9
|
+
)
|
10
|
+
openupgrade_180.convert_company_dependent(
|
11
|
+
env, "product.template", "property_account_creditor_price_difference"
|
12
|
+
)
|
13
|
+
|
14
|
+
|
15
|
+
@openupgrade.migrate()
|
16
|
+
def migrate(env, version):
|
17
|
+
convert_company_dependent(env)
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade
|
4
|
+
|
5
|
+
_new_columns = [
|
6
|
+
("purchase.order.line", "group_id", "many2one"),
|
7
|
+
("purchase.order.line", "location_final_id", "many2one"),
|
8
|
+
("stock.warehouse.orderpoint", "product_supplier_id", "many2one"),
|
9
|
+
]
|
10
|
+
|
11
|
+
|
12
|
+
def fill_purchase_order_line_group_id(env):
|
13
|
+
openupgrade.logged_query(
|
14
|
+
env.cr,
|
15
|
+
"""
|
16
|
+
UPDATE purchase_order_line pol
|
17
|
+
SET group_id = sr.group_id
|
18
|
+
FROM stock_move sm
|
19
|
+
JOIN stock_rule sr ON sm.rule_id = sr.id AND
|
20
|
+
sr.group_propagation_option = 'propagate'
|
21
|
+
WHERE sm.purchase_line_id = pol.id
|
22
|
+
AND pol.group_id IS NULL AND sr.group_id IS NOT NULL
|
23
|
+
""",
|
24
|
+
)
|
25
|
+
openupgrade.logged_query(
|
26
|
+
env.cr,
|
27
|
+
"""
|
28
|
+
UPDATE purchase_order_line pol
|
29
|
+
SET group_id = po.group_id
|
30
|
+
FROM purchase_order po
|
31
|
+
JOIN stock_rule sr ON po.group_id = sr.group_id AND
|
32
|
+
sr.group_propagation_option = 'propagate'
|
33
|
+
WHERE pol.order_id = po.id AND pol.group_id IS NULL
|
34
|
+
""",
|
35
|
+
)
|
36
|
+
if openupgrade.table_exists(env.cr, "sale_order_line"):
|
37
|
+
openupgrade.logged_query(
|
38
|
+
env.cr,
|
39
|
+
"""
|
40
|
+
UPDATE purchase_order_line pol
|
41
|
+
SET group_id = pg.id
|
42
|
+
FROM sale_order_line sol
|
43
|
+
JOIN procurement_group pg ON pg.sale_id = sol.order_id
|
44
|
+
JOIN stock_rule sr ON pg.id = sr.group_id AND
|
45
|
+
sr.group_propagation_option = 'propagate'
|
46
|
+
WHERE pol.sale_line_id = sol.id AND pol.group_id IS NULL
|
47
|
+
""",
|
48
|
+
)
|
49
|
+
openupgrade.logged_query(
|
50
|
+
env.cr,
|
51
|
+
"""
|
52
|
+
UPDATE purchase_order_line pol
|
53
|
+
SET group_id = sm.group_id
|
54
|
+
FROM stock_move sm
|
55
|
+
WHERE sm.purchase_line_id = pol.id AND pol.group_id IS NULL
|
56
|
+
""",
|
57
|
+
)
|
58
|
+
|
59
|
+
|
60
|
+
def fill_purchase_order_line_location_final_id(env):
|
61
|
+
openupgrade.logged_query(
|
62
|
+
env.cr,
|
63
|
+
"""
|
64
|
+
UPDATE purchase_order_line pol
|
65
|
+
SET location_final_id = sm.location_final_id
|
66
|
+
FROM stock_move sm
|
67
|
+
WHERE sm.purchase_line_id = pol.id
|
68
|
+
""",
|
69
|
+
)
|
70
|
+
|
71
|
+
|
72
|
+
def fill_stock_warehouse_orderpoint_product_supplier_id(env):
|
73
|
+
openupgrade.logged_query(
|
74
|
+
env.cr,
|
75
|
+
"""
|
76
|
+
UPDATE stock_warehouse_orderpoint swo
|
77
|
+
SET product_supplier_id = sub.partner_id
|
78
|
+
FROM product_product pp
|
79
|
+
JOIN product_template pt ON pp.product_tmpl_id = pt.id
|
80
|
+
JOIN LATERAL (
|
81
|
+
SELECT ps.partner_id
|
82
|
+
FROM product_supplierinfo ps
|
83
|
+
WHERE ps.product_tmpl_id = pt.id
|
84
|
+
ORDER BY ps.sequence
|
85
|
+
LIMIT 1
|
86
|
+
) sub ON TRUE
|
87
|
+
WHERE swo.product_id = pp.id
|
88
|
+
""",
|
89
|
+
)
|
90
|
+
|
91
|
+
|
92
|
+
@openupgrade.migrate()
|
93
|
+
def migrate(env, version=None):
|
94
|
+
openupgrade.add_columns(env, _new_columns)
|
95
|
+
fill_purchase_order_line_group_id(env)
|
96
|
+
fill_purchase_order_line_location_final_id(env)
|
97
|
+
fill_stock_warehouse_orderpoint_product_supplier_id(env)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---Models in module 'purchase_stock'---
|
2
|
+
---Fields in module 'purchase_stock'---
|
3
|
+
purchase_stock / procurement.group / purchase_line_ids (one2many) : NEW relation: purchase.order.line
|
4
|
+
purchase_stock / purchase.order.line / group_id (many2one) : NEW relation: procurement.group
|
5
|
+
# DONE: pre-migration: pre-create and filled heuristically
|
6
|
+
|
7
|
+
purchase_stock / product.category / property_account_creditor_price_difference_categ (many2one): needs conversion to v18-style company dependent
|
8
|
+
purchase_stock / product.template / property_account_creditor_price_difference (many2one): needs conversion to v18-style company dependent
|
9
|
+
# DONE: post-migration: used openupgrade_180.convert_company_dependent
|
10
|
+
|
11
|
+
purchase_stock / purchase.order.line / location_final_id (many2one) : NEW relation: stock.location
|
12
|
+
# DONE: pre-migration: pre-created and filled using stock move location_final_id
|
13
|
+
|
14
|
+
purchase_stock / stock.warehouse.orderpoint / product_supplier_id (many2one): NEW relation: res.partner, isfunction: function, stored
|
15
|
+
# DONE: pre-migration: pre-create and filled
|
16
|
+
|
17
|
+
---XML records in module 'purchase_stock'---
|
18
|
+
NEW ir.ui.view: purchase_stock.purchase_help_message_template
|
19
|
+
NEW ir.ui.view: purchase_stock.warehouse_orderpoint_search_inherit
|
20
|
+
# NOTHING TO DO
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade, openupgrade_180
|
4
|
+
|
5
|
+
|
6
|
+
def convert_company_dependent(env):
|
7
|
+
openupgrade_180.convert_company_dependent(
|
8
|
+
env, "product.template", "service_to_purchase"
|
9
|
+
)
|
10
|
+
|
11
|
+
|
12
|
+
@openupgrade.migrate()
|
13
|
+
def migrate(env, version):
|
14
|
+
convert_company_dependent(env)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade
|
4
|
+
|
5
|
+
|
6
|
+
@openupgrade.migrate()
|
7
|
+
def migrate(env, version):
|
8
|
+
if openupgrade.column_exists(env.cr, "product_template", "service_to_purchase"):
|
9
|
+
# in v15, the field was not company_dependent
|
10
|
+
openupgrade.rename_columns(
|
11
|
+
env.cr,
|
12
|
+
{"product_template": [("service_to_purchase", None)]},
|
13
|
+
)
|
@@ -0,0 +1,6 @@
|
|
1
|
+
---Models in module 'sale_purchase'---
|
2
|
+
---Fields in module 'sale_purchase'---
|
3
|
+
sale_purchase / product.template / service_to_purchase (boolean) : needs conversion to v18-style company dependent
|
4
|
+
# DONE: post-migration: used openupgrade_180.convert_company_dependent
|
5
|
+
|
6
|
+
---XML records in module 'sale_purchase'---
|
@@ -33,6 +33,7 @@ odoo/addons/openupgrade_scripts/scripts/analytic/18.0.1.2/upgrade_analysis.txt,s
|
|
33
33
|
odoo/addons/openupgrade_scripts/scripts/analytic/18.0.1.2/upgrade_analysis_work.txt,sha256=7oWo0-jGzZVCVdEhOTldukvAZXzxhYb2WEniZir4Exc,641
|
34
34
|
odoo/addons/openupgrade_scripts/scripts/auth_ldap/18.0.1.0/upgrade_analysis.txt,sha256=QB9DfdWzmE0oR4fsd-qPQ9JF5W_uZFNYpvKmNVs_TZw,150
|
35
35
|
odoo/addons/openupgrade_scripts/scripts/auth_oauth/18.0.1.0/upgrade_analysis.txt,sha256=FxJ3tHzlvJtzEN8spiXAXZf7832DrzQ71MkfayvDt_o,153
|
36
|
+
odoo/addons/openupgrade_scripts/scripts/auth_oauth/18.0.1.0/upgrade_analysis_work.txt,sha256=6gGo3rKrSrYgG4ngmQ5rztBPcUoNzGXXYeX-LqfmX7g,169
|
36
37
|
odoo/addons/openupgrade_scripts/scripts/auth_passkey/18.0.1.0/upgrade_analysis.txt,sha256=CE9cEC8ZldW27BH45L62L-5POMKFZl2xytGfVts9NsY,1367
|
37
38
|
odoo/addons/openupgrade_scripts/scripts/auth_signup/18.0.1.0/noupdate_changes.xml,sha256=LkB-Lp9udKh2B_oKfLkxQv2-aIqPtixDSI3RzDEn_k8,7183
|
38
39
|
odoo/addons/openupgrade_scripts/scripts/auth_signup/18.0.1.0/post-migration.py,sha256=YgSGL5Nunqk-dfnsGqko-1RLXF0-O0CLJ3RsQD7EUeE,461
|
@@ -128,6 +129,7 @@ odoo/addons/openupgrade_scripts/scripts/hr_expense/18.0.2.0/noupdate_changes.xml
|
|
128
129
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/18.0.2.0/upgrade_analysis.txt,sha256=Qrjl5gnNqOj221tNq5pYuhBlIzIf5qSRRYpQfPtxYKM,1045
|
129
130
|
odoo/addons/openupgrade_scripts/scripts/hr_fleet/18.0.1.0/upgrade_analysis.txt,sha256=4AtSOtDSSQqYwX6Js1HXoSQpgb0gslWUXgfp8PnUsdk,381
|
130
131
|
odoo/addons/openupgrade_scripts/scripts/hr_gamification/18.0.1.0/upgrade_analysis.txt,sha256=dGMSZcYGhQ8X9UxpabftmfyBei4-mTWjsXpY5MLVSZM,205
|
132
|
+
odoo/addons/openupgrade_scripts/scripts/hr_gamification/18.0.1.0/upgrade_analysis_work.txt,sha256=oSFbmry-ZHC6woVmqO7_1wG95gy-H_kdPsReRk00mmw,221
|
131
133
|
odoo/addons/openupgrade_scripts/scripts/hr_holidays/18.0.1.6/noupdate_changes.xml,sha256=E-oKUt2VpNCp5PBeS5ObcIhTYZWC2C7nWPwOuz19LCg,3401
|
132
134
|
odoo/addons/openupgrade_scripts/scripts/hr_holidays/18.0.1.6/upgrade_analysis.txt,sha256=jzHi5IPuB1PjUEqQ34wkUJGKjJde1jVwkqmPrBNsJLk,7781
|
133
135
|
odoo/addons/openupgrade_scripts/scripts/hr_holidays_attendance/18.0.1.0/noupdate_changes.xml,sha256=sWWTZMos_-pK34q9IbuuGBm_SlViQgwBjOdUOK89Gr4,170
|
@@ -325,8 +327,13 @@ odoo/addons/openupgrade_scripts/scripts/membership/18.0.1.0/upgrade_analysis.txt
|
|
325
327
|
odoo/addons/openupgrade_scripts/scripts/microsoft_account/18.0.1.0/upgrade_analysis.txt,sha256=A-hAfz4jaf1_-Uw2-6JP4inCGDe6LXPvVvXb7Dk9Nyc,174
|
326
328
|
odoo/addons/openupgrade_scripts/scripts/microsoft_calendar/18.0.1.0/upgrade_analysis.txt,sha256=zXEF6tSbLrHHge5W0qcIcJ1aefiiYSb7TNSoNf5ODuI,1883
|
327
329
|
odoo/addons/openupgrade_scripts/scripts/microsoft_outlook/18.0.1.1/upgrade_analysis.txt,sha256=z2Avhmp69lxCI-2aP3WRa-FuJ0AIAwjSuGokMGfjdnc,174
|
330
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/post-migration.py,sha256=UuKg8nXUFarrAiv54JNn2LPx8HCh2VGmiwBerH9qdi0,879
|
331
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/pre-migration.py,sha256=450099gEMOVlFM1gKMeMXwqftfG3263w9PHJtTAO2Ks,993
|
328
332
|
odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/upgrade_analysis.txt,sha256=rD8AG_fwSd3-D7NWWzddgWgHMlILtVjpc0VlHtA3CDE,4331
|
333
|
+
odoo/addons/openupgrade_scripts/scripts/mrp/18.0.2.0/upgrade_analysis_work.txt,sha256=ZZkT7u1tb4eCWzzGlGoS4o7CrdWDgmTTth92ZKAdt9E,5042
|
334
|
+
odoo/addons/openupgrade_scripts/scripts/mrp_account/18.0.1.0/post-migration.py,sha256=BM4HCDe1p3XEWLPikXX51k9n7HZoL7RBiR7qgVnEBm8,342
|
329
335
|
odoo/addons/openupgrade_scripts/scripts/mrp_account/18.0.1.0/upgrade_analysis.txt,sha256=k9H_jP_VqI1Pd5_qEOXfHJB8XRM9_AhN_WympXbEbaE,2303
|
336
|
+
odoo/addons/openupgrade_scripts/scripts/mrp_account/18.0.1.0/upgrade_analysis_work.txt,sha256=8LrZqi_o-UYOOuqGYUlgl8EJ5nyKyGECjUVDJbKFFAs,2661
|
330
337
|
odoo/addons/openupgrade_scripts/scripts/mrp_landed_costs/18.0.1.0/upgrade_analysis.txt,sha256=5nXyL4HwISqtYoWtiWaRdUNUoUOIK0JpvbyhG2vN-qo,171
|
331
338
|
odoo/addons/openupgrade_scripts/scripts/mrp_repair/18.0.1.0/upgrade_analysis.txt,sha256=ICBUe-FXLre45wPdDKC1TWOIV7VqO7-Z0EPFOILdO6E,231
|
332
339
|
odoo/addons/openupgrade_scripts/scripts/mrp_subcontracting/18.0.0.1/upgrade_analysis.txt,sha256=UuQxSe5FyRK_My7e32YMXJuGhftHVEpsfUSqHKYhG9Q,438
|
@@ -428,7 +435,10 @@ odoo/addons/openupgrade_scripts/scripts/purchase_product_matrix/18.0.1.0/upgrade
|
|
428
435
|
odoo/addons/openupgrade_scripts/scripts/purchase_repair/18.0.1.0/upgrade_analysis.txt,sha256=iQamur62Z-T4-RlUG4l31Er9KvdxzIhY69VDA8O6mYo,251
|
429
436
|
odoo/addons/openupgrade_scripts/scripts/purchase_requisition/18.0.0.1/upgrade_analysis.txt,sha256=8dva3E-XBZfz4gtNxogvK_yUO7vycVQp8lugsS1s_us,3092
|
430
437
|
odoo/addons/openupgrade_scripts/scripts/purchase_requisition_stock/18.0.1.2/upgrade_analysis.txt,sha256=VBgWrgfN-tlD1isnEjx1DbRhTjvxqZIleJCKlwtjLNo,201
|
438
|
+
odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/post-migration.py,sha256=h7R_a75LRIE9_1Zm8nOcO92eGM33BT4W55Z_yJZMp_8,574
|
439
|
+
odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/pre-migration.py,sha256=l6Redm8UsoWxf7rElvuDtQH9fghMe1Nt2LZG6Qr7VCI,3072
|
431
440
|
odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/upgrade_analysis.txt,sha256=bKN4Lj4npFdtZEb-tEXGwtud6jzfEJq01t5PYrr8VUk,1011
|
441
|
+
odoo/addons/openupgrade_scripts/scripts/purchase_stock/18.0.1.2/upgrade_analysis_work.txt,sha256=VNynpx2lCaa1blribMIHODB_e6Vl_WsZBse1qLngFtw,1287
|
432
442
|
odoo/addons/openupgrade_scripts/scripts/rating/18.0.1.1/upgrade_analysis.txt,sha256=qW5H3qcAfhOJGRtKOksLYVTMUWRwhEdz61oHa9nagi0,467
|
433
443
|
odoo/addons/openupgrade_scripts/scripts/rating/18.0.1.1/upgrade_analysis_work.txt,sha256=OeCuYPxiMWcK8zJnxwe99VhNUnJ_xEYFboxEHNpH7V0,526
|
434
444
|
odoo/addons/openupgrade_scripts/scripts/repair/18.0.1.0/upgrade_analysis.txt,sha256=AK-tIsgeIf2mAupSeih2oWn5KLMwR1zh5tFEwsmBDT0,1678
|
@@ -462,7 +472,10 @@ odoo/addons/openupgrade_scripts/scripts/sale_mrp/18.0.1.0/upgrade_analysis.txt,s
|
|
462
472
|
odoo/addons/openupgrade_scripts/scripts/sale_pdf_quote_builder/18.0.1.0/upgrade_analysis.txt,sha256=O8MU6zGcF-Pq3g1jwu-qC6somKfHLtRePtxmlcnbRpM,4660
|
463
473
|
odoo/addons/openupgrade_scripts/scripts/sale_product_matrix/18.0.1.0/upgrade_analysis.txt,sha256=-_99R6PnRJKHWr1zvrruy5m0RYjMSSK-QIlU_CNEJjk,180
|
464
474
|
odoo/addons/openupgrade_scripts/scripts/sale_project/18.0.1.0/upgrade_analysis.txt,sha256=9KgSX5UNQHVbLInxyNxStXas-JmCv98hub3wWM9x-jo,2646
|
475
|
+
odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/post-migration.py,sha256=i5FVu5NOXeR8SW5jjNZT3yVwIF5su0njQgfowjERf3Y,414
|
476
|
+
odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/pre-migration.py,sha256=swQJXIYbOZpTAWSg6iQNepYmmtlRS2pF46fuUxb_OVQ,488
|
465
477
|
odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/upgrade_analysis.txt,sha256=vuc0cBM74XVqfBQyb7Ncpr4U3FEs7bY5FUqXHzXPm7I,245
|
478
|
+
odoo/addons/openupgrade_scripts/scripts/sale_purchase/18.0.1.0/upgrade_analysis_work.txt,sha256=jjQqMeZT1T8nigXM8QxMzOH3c8SuClfXgG6-obSBafk,317
|
466
479
|
odoo/addons/openupgrade_scripts/scripts/sale_service/18.0.1.0/upgrade_analysis.txt,sha256=aZz8BN0dfotG8o04pLNWHZW-SOa8fWI4iNfbSjV8mgI,159
|
467
480
|
odoo/addons/openupgrade_scripts/scripts/sale_stock/18.0.1.0/post-migration.py,sha256=QhAGk_EYZXHBa4iw5kZ5WXrpMTzVRjcyys6XpQ39lFE,395
|
468
481
|
odoo/addons/openupgrade_scripts/scripts/sale_stock/18.0.1.0/pre-migration.py,sha256=uck-mNWhW_y1XN3G1HGSQpNBpBHYVwZezt_fD8zADrU,2116
|
@@ -564,7 +577,7 @@ odoo/addons/openupgrade_scripts/scripts/website_slides_survey/18.0.1.0/upgrade_a
|
|
564
577
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
565
578
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
566
579
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=Jc0qAThlH5WnoSq6vPamjC8WyMkdo_9zkhDuU1qW1VI,12722
|
567
|
-
odoo_addon_openupgrade_scripts-18.0.1.0.0.
|
568
|
-
odoo_addon_openupgrade_scripts-18.0.1.0.0.
|
569
|
-
odoo_addon_openupgrade_scripts-18.0.1.0.0.
|
570
|
-
odoo_addon_openupgrade_scripts-18.0.1.0.0.
|
580
|
+
odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info/METADATA,sha256=2-0WQpugY80L1_RAOufnA5CrkE3rWpaP2giDLg46qD8,3775
|
581
|
+
odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
582
|
+
odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
583
|
+
odoo_addon_openupgrade_scripts-18.0.1.0.0.131.dist-info/RECORD,,
|
File without changes
|