odoo-addon-openupgrade-scripts 17.0.1.0.1.358__py3-none-any.whl → 17.0.1.0.1.362__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/analytic/17.0.1.2/post-migration.py +5 -12
- odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/pre-migration.py +4 -0
- odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/noupdate_changes.xml +12 -0
- odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/post-migration.py +280 -0
- odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/pre-migration.py +117 -0
- odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/upgrade_analysis_work.txt +143 -0
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info}/RECORD +10 -7
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info}/top_level.txt +0 -0
@@ -60,19 +60,12 @@ def _analytic_plan_update_applicability_into_property(env):
|
|
60
60
|
in all companies as the company_id field was shifted from account.analytic.plan
|
61
61
|
to account.analytic.applicability
|
62
62
|
"""
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
""
|
63
|
+
openupgrade.convert_to_company_dependent(
|
64
|
+
env,
|
65
|
+
"account.analytic.plan",
|
66
|
+
openupgrade.get_legacy_name("default_applicability"),
|
67
|
+
"default_applicability",
|
68
68
|
)
|
69
|
-
values = dict(env.cr.fetchall())
|
70
|
-
for company in env["res.company"].search([]):
|
71
|
-
env["ir.property"].with_company(company)._set_multi(
|
72
|
-
"default_applicability",
|
73
|
-
"account.analytic.plan",
|
74
|
-
values,
|
75
|
-
)
|
76
69
|
|
77
70
|
|
78
71
|
@openupgrade.migrate()
|
@@ -55,3 +55,7 @@ def migrate(env, version):
|
|
55
55
|
openupgrade.copy_columns(
|
56
56
|
env.cr, {"account_analytic_plan": [("company_id", None, None)]}
|
57
57
|
)
|
58
|
+
# Rename default_applicability which is going to become a property
|
59
|
+
openupgrade.rename_columns(
|
60
|
+
env.cr, {"account_analytic_plan": [("default_applicability", None)]}
|
61
|
+
)
|
@@ -1,5 +1,17 @@
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
2
2
|
<odoo>
|
3
|
+
<!-- Add this record because it is not loaded by Odoo due to noupdate=True and forcecreate=0 -->
|
4
|
+
<record id="picking_type_warehouse0_repair" model="stock.picking.type" forcecreate="0">
|
5
|
+
<field name="name">Repairs</field>
|
6
|
+
<field name="code">repair_operation</field>
|
7
|
+
<field name="company_id" ref="base.main_company"/>
|
8
|
+
<field name="default_location_src_id" ref="stock.stock_location_stock"/>
|
9
|
+
<field name="default_location_dest_id" model="stock.location" search="[('usage', '=', 'production'), ('company_id', '=', obj().env.ref('base.main_company').id)]"/>
|
10
|
+
<field name="default_remove_location_dest_id" model="stock.location" search="[('scrap_location', '=', True), ('company_id', '=', obj().env.ref('base.main_company').id)]"/>
|
11
|
+
<field name="default_recycle_location_dest_id" ref="stock.stock_location_stock"/>
|
12
|
+
<field name="sequence_code">RO</field>
|
13
|
+
<field name="warehouse_id" ref="stock.warehouse0"/>
|
14
|
+
</record>
|
3
15
|
<record id="stock.warehouse0" model="stock.warehouse">
|
4
16
|
<field name="repair_type_id" ref="repair.picking_type_warehouse0_repair"/>
|
5
17
|
</record>
|
@@ -0,0 +1,280 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# Copyright 2025 Tecnativa - Carlos Lopez
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
|
8
|
+
def fill_product_template_create_repair(env):
|
9
|
+
# If fees where created for some service,
|
10
|
+
# they should create repair orders automatically
|
11
|
+
openupgrade.logged_query(
|
12
|
+
env.cr,
|
13
|
+
"""
|
14
|
+
UPDATE product_template pt
|
15
|
+
SET create_repair = TRUE
|
16
|
+
FROM repair_fee rf
|
17
|
+
JOIN product_product pp ON rf.product_id = pp.id
|
18
|
+
WHERE pp.product_tmpl_id = pt.id""",
|
19
|
+
)
|
20
|
+
|
21
|
+
|
22
|
+
def fill_stock_move_repair_line_type(env):
|
23
|
+
# Set the repair_line_type in stock moves
|
24
|
+
# to link them to the repair order through the move_ids field.
|
25
|
+
openupgrade.logged_query(
|
26
|
+
env.cr,
|
27
|
+
"""
|
28
|
+
UPDATE stock_move sm
|
29
|
+
SET repair_line_type = rl.type,
|
30
|
+
description_picking = rl.name
|
31
|
+
FROM repair_line rl
|
32
|
+
WHERE rl.move_id = sm.id
|
33
|
+
""",
|
34
|
+
)
|
35
|
+
|
36
|
+
|
37
|
+
def fill_stock_move_repair_lines_in_process(env):
|
38
|
+
"""
|
39
|
+
Insert moves for repairs lines not done yet
|
40
|
+
- Set the default values for the new fields, as defined in the field declarations.
|
41
|
+
- Set the state according to the repair's state to maintain consistency.
|
42
|
+
- Set the quantity to 0 because in V16
|
43
|
+
the reservation is not done until the repair is completed,
|
44
|
+
so no reservation should be made on the stock move.
|
45
|
+
"""
|
46
|
+
openupgrade.logged_query(
|
47
|
+
env.cr,
|
48
|
+
"""
|
49
|
+
INSERT INTO stock_move (
|
50
|
+
old_repair_line_id,
|
51
|
+
sequence, priority,
|
52
|
+
propagate_cancel,
|
53
|
+
additional,
|
54
|
+
picked,
|
55
|
+
create_uid, create_date, write_uid, write_date,
|
56
|
+
repair_id, repair_line_type,
|
57
|
+
picking_type_id, location_id, location_dest_id,
|
58
|
+
product_id, product_uom,
|
59
|
+
product_uom_qty, product_qty, quantity,
|
60
|
+
name, description_picking,
|
61
|
+
date, company_id,
|
62
|
+
origin, reference,
|
63
|
+
procure_method,
|
64
|
+
scrapped,
|
65
|
+
state
|
66
|
+
)
|
67
|
+
SELECT rl.id,
|
68
|
+
10 AS sequence, '0' AS priority,
|
69
|
+
true AS propagate_cancel,
|
70
|
+
false AS additional,
|
71
|
+
false AS picked,
|
72
|
+
rl.create_uid, rl.create_date, rl.write_uid, rl.write_date,
|
73
|
+
rl.repair_id, rl.type AS repair_line_type,
|
74
|
+
ro.picking_type_id, rl.location_id, rl.location_dest_id,
|
75
|
+
rl.product_id, rl.product_uom,
|
76
|
+
rl.product_uom_qty,
|
77
|
+
ROUND(
|
78
|
+
((rl.product_uom_qty / rl_uom.factor) * pt_uom.factor),
|
79
|
+
SCALE(pt_uom.rounding)
|
80
|
+
) AS product_qty,
|
81
|
+
0 AS quantity,
|
82
|
+
ro.name, rl.name AS description_picking,
|
83
|
+
ro.schedule_date AS date, rl.company_id,
|
84
|
+
ro.name AS origin, ro.name AS reference,
|
85
|
+
'make_to_stock' AS procure_method,
|
86
|
+
sld.scrap_location AS scrapped,
|
87
|
+
CASE WHEN ro.state IN ('draft', 'cancel')
|
88
|
+
THEN ro.state ELSE 'confirmed'
|
89
|
+
END AS state
|
90
|
+
FROM repair_line rl
|
91
|
+
JOIN repair_order ro ON rl.repair_id = ro.id
|
92
|
+
JOIN stock_location sld ON sld.id = rl.location_dest_id
|
93
|
+
JOIN product_product pp ON pp.id = rl.product_id
|
94
|
+
JOIN product_template pt ON pt.id = pp.product_tmpl_id
|
95
|
+
JOIN uom_uom rl_uom ON rl_uom.id = rl.product_uom
|
96
|
+
JOIN uom_uom pt_uom ON pt_uom.id = pt.uom_id
|
97
|
+
WHERE rl.move_id IS NULL AND rl.type IS NOT NULL
|
98
|
+
""",
|
99
|
+
)
|
100
|
+
|
101
|
+
|
102
|
+
def create_default_repair_type_for_all_warehouses(env):
|
103
|
+
# method mainly based on _create_or_update_sequences_and_picking_types()
|
104
|
+
all_warehouses = (
|
105
|
+
env["stock.warehouse"]
|
106
|
+
.with_context(active_test=False)
|
107
|
+
.search([("repair_type_id", "=", False)])
|
108
|
+
)
|
109
|
+
for wh in all_warehouses:
|
110
|
+
# choose the next available color for the operation types of this warehouse
|
111
|
+
all_used_colors = [
|
112
|
+
res["color"]
|
113
|
+
for res in env["stock.picking.type"]
|
114
|
+
.with_context(active_test=False)
|
115
|
+
.search_read(
|
116
|
+
[("warehouse_id", "!=", False), ("color", "!=", False)],
|
117
|
+
["color"],
|
118
|
+
order="color",
|
119
|
+
)
|
120
|
+
]
|
121
|
+
available_colors = [zef for zef in range(0, 12) if zef not in all_used_colors]
|
122
|
+
color = available_colors[0] if available_colors else 0
|
123
|
+
sequence_data = wh._get_sequence_values()
|
124
|
+
# suit for each warehouse: reception, internal, pick, pack, ship
|
125
|
+
max_sequence = (
|
126
|
+
env["stock.picking.type"]
|
127
|
+
.with_context(active_test=False)
|
128
|
+
.search_read(
|
129
|
+
[("sequence", "!=", False)],
|
130
|
+
["sequence"],
|
131
|
+
limit=1,
|
132
|
+
order="sequence desc",
|
133
|
+
)
|
134
|
+
)
|
135
|
+
max_sequence = max_sequence and max_sequence[0]["sequence"] or 0
|
136
|
+
values = wh._get_picking_type_update_values()["repair_type_id"]
|
137
|
+
create_data, _ = wh._get_picking_type_create_values(max_sequence)
|
138
|
+
values.update(create_data["repair_type_id"])
|
139
|
+
sequence = env["ir.sequence"].create(sequence_data["repair_type_id"])
|
140
|
+
values.update(
|
141
|
+
warehouse_id=wh.id,
|
142
|
+
color=color,
|
143
|
+
sequence_id=sequence.id,
|
144
|
+
sequence=max_sequence + 1,
|
145
|
+
company_id=wh.company_id.id,
|
146
|
+
active=wh.active,
|
147
|
+
)
|
148
|
+
# create repair picking type
|
149
|
+
repair_type_id = env["stock.picking.type"].create(values).id
|
150
|
+
# update repair picking type for warehouse
|
151
|
+
wh.write({"repair_type_id": repair_type_id})
|
152
|
+
|
153
|
+
|
154
|
+
def repair_map_state(env):
|
155
|
+
"""
|
156
|
+
Map the states of the repair orders to the new ones.
|
157
|
+
The mapping is as follows:
|
158
|
+
- ready -> confirmed. Order not repaired but already invoiced.
|
159
|
+
TODO: Decide how to handle the invoice
|
160
|
+
when it has been created before the repair is completed.
|
161
|
+
- 2binvoiced and not repaired -> confirmed. Order not repaired and not invoiced
|
162
|
+
- 2binvoiced and repaired -> done. Order repaired but not invoiced
|
163
|
+
"""
|
164
|
+
state_legacy = openupgrade.get_legacy_name("state")
|
165
|
+
openupgrade.map_values(
|
166
|
+
env.cr,
|
167
|
+
state_legacy,
|
168
|
+
"state",
|
169
|
+
[("ready", "confirmed")],
|
170
|
+
table="repair_order",
|
171
|
+
)
|
172
|
+
openupgrade.logged_query(
|
173
|
+
env.cr,
|
174
|
+
f"""
|
175
|
+
UPDATE repair_order
|
176
|
+
SET state = 'confirmed'
|
177
|
+
WHERE {state_legacy} = '2binvoiced' AND (not repaired OR repaired IS NULL)
|
178
|
+
""",
|
179
|
+
)
|
180
|
+
openupgrade.logged_query(
|
181
|
+
env.cr,
|
182
|
+
f"""
|
183
|
+
UPDATE repair_order
|
184
|
+
SET state = 'done'
|
185
|
+
WHERE {state_legacy} = '2binvoiced' AND repaired
|
186
|
+
""",
|
187
|
+
)
|
188
|
+
|
189
|
+
|
190
|
+
def fill_repair_picking_type(env):
|
191
|
+
"""
|
192
|
+
Update the picking type of the repair orders
|
193
|
+
to the one defined in the warehouse.
|
194
|
+
Set the related fields from picking_type_id
|
195
|
+
"""
|
196
|
+
openupgrade.logged_query(
|
197
|
+
env.cr,
|
198
|
+
"""
|
199
|
+
UPDATE repair_order ro
|
200
|
+
SET picking_type_id = sw.repair_type_id,
|
201
|
+
location_dest_id = spt.default_location_dest_id,
|
202
|
+
parts_location_id = spt.default_remove_location_dest_id,
|
203
|
+
recycle_location_id = spt.default_recycle_location_dest_id
|
204
|
+
FROM stock_location sl
|
205
|
+
JOIN stock_warehouse sw ON sw.id = sl.warehouse_id
|
206
|
+
JOIN stock_picking_type spt ON spt.id = sw.repair_type_id
|
207
|
+
WHERE ro.location_id = sl.id
|
208
|
+
""",
|
209
|
+
)
|
210
|
+
# Remove the temporary location and picking type
|
211
|
+
# created during the migration
|
212
|
+
env["stock.location"].search(
|
213
|
+
[("name", "=", "Temporary Location OpenUpgrade")]
|
214
|
+
).unlink()
|
215
|
+
env["stock.picking.type"].search([("name", "=", "SPT Repair OpenUpgrade")]).unlink()
|
216
|
+
|
217
|
+
|
218
|
+
def fill_repair_procurement_group(env):
|
219
|
+
"""
|
220
|
+
Insert the procurement group for the repair orders
|
221
|
+
and assign it to the stock moves,
|
222
|
+
similar to what is done in the create method of stock.move.
|
223
|
+
"""
|
224
|
+
openupgrade.logged_query(
|
225
|
+
env.cr,
|
226
|
+
"""
|
227
|
+
INSERT INTO procurement_group (
|
228
|
+
create_uid, create_date, write_uid, write_date,
|
229
|
+
name, move_type
|
230
|
+
)
|
231
|
+
SELECT
|
232
|
+
ro.create_uid, ro.create_date, ro.write_uid, ro.write_date,
|
233
|
+
ro.name, 'direct' AS move_type
|
234
|
+
FROM repair_order ro
|
235
|
+
WHERE ro.procurement_group_id IS NULL
|
236
|
+
""",
|
237
|
+
)
|
238
|
+
openupgrade.logged_query(
|
239
|
+
env.cr,
|
240
|
+
"""
|
241
|
+
UPDATE repair_order ro
|
242
|
+
SET procurement_group_id = pg.id
|
243
|
+
FROM procurement_group pg
|
244
|
+
WHERE pg.name = ro.name
|
245
|
+
""",
|
246
|
+
)
|
247
|
+
openupgrade.logged_query(
|
248
|
+
env.cr,
|
249
|
+
"""
|
250
|
+
UPDATE stock_move sm
|
251
|
+
SET group_id = ro.procurement_group_id,
|
252
|
+
picking_type_id = ro.picking_type_id
|
253
|
+
FROM repair_order ro
|
254
|
+
WHERE sm.repair_id = ro.id
|
255
|
+
""",
|
256
|
+
)
|
257
|
+
|
258
|
+
|
259
|
+
@openupgrade.migrate()
|
260
|
+
def migrate(env, version):
|
261
|
+
openupgrade.load_data(env, "repair", "17.0.1.0/noupdate_changes.xml")
|
262
|
+
create_default_repair_type_for_all_warehouses(env)
|
263
|
+
# Ensure the repair_type_id field is sent to the database
|
264
|
+
# before using this field in SQL queries.
|
265
|
+
env["stock.warehouse"].flush_model(["repair_type_id"])
|
266
|
+
fill_product_template_create_repair(env)
|
267
|
+
fill_stock_move_repair_line_type(env)
|
268
|
+
fill_stock_move_repair_lines_in_process(env)
|
269
|
+
repair_map_state(env)
|
270
|
+
fill_repair_picking_type(env)
|
271
|
+
fill_repair_procurement_group(env)
|
272
|
+
openupgrade.delete_records_safely_by_xml_id(
|
273
|
+
env,
|
274
|
+
[
|
275
|
+
"repair.repair_fee_rule",
|
276
|
+
"repair.repair_line_rule",
|
277
|
+
"repair.seq_repair",
|
278
|
+
"repair.mail_template_repair_quotation",
|
279
|
+
],
|
280
|
+
)
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
|
2
|
+
# Copyright 2025 Tecnativa - Carlos Lopez
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
from odoo.tools import sql
|
7
|
+
|
8
|
+
|
9
|
+
def add_helper_repair_move_rel(env):
|
10
|
+
openupgrade.logged_query(
|
11
|
+
env.cr,
|
12
|
+
"""
|
13
|
+
ALTER TABLE stock_move
|
14
|
+
ADD COLUMN old_repair_line_id integer""",
|
15
|
+
)
|
16
|
+
openupgrade.logged_query(
|
17
|
+
env.cr,
|
18
|
+
"""
|
19
|
+
UPDATE stock_move sm
|
20
|
+
SET old_repair_line_id = rl.id
|
21
|
+
FROM repair_line rl
|
22
|
+
WHERE sm.id = rl.move_id
|
23
|
+
""",
|
24
|
+
)
|
25
|
+
# Create index for these columns, as they are going to be accessed frequently
|
26
|
+
index_name = "stock_move_old_repair_line_id_index"
|
27
|
+
sql.create_index(env.cr, index_name, "stock_move", ['"old_repair_line_id"'])
|
28
|
+
|
29
|
+
|
30
|
+
def stock_warehouse_create_columns(env):
|
31
|
+
"""
|
32
|
+
Add the repair_type_id column to the stock_warehouse table
|
33
|
+
before the default value for the picking_type_id field in repair.order is executed.
|
34
|
+
This is necessary because the field is required.
|
35
|
+
Even if the field exists, Odoo will execute the default,
|
36
|
+
and due to the import order in the repair module,
|
37
|
+
the stock.warehouse model has not been processed yet
|
38
|
+
and the field does not exist at that point.
|
39
|
+
"""
|
40
|
+
openupgrade.add_columns(
|
41
|
+
env, [(False, "repair_type_id", "many2one", None, "stock_warehouse")]
|
42
|
+
)
|
43
|
+
|
44
|
+
|
45
|
+
def repair_create_columns(env):
|
46
|
+
"""Add columns to the repair_order table
|
47
|
+
before the default value for the picking_type_id field in repair.order is executed.
|
48
|
+
Set a dummy value for the new columns.
|
49
|
+
The correct values will be assigned during the post-migration step.
|
50
|
+
This is necessary because the fields are required,
|
51
|
+
but due to the model loading order,
|
52
|
+
the repair_type_id field in the warehouse is still empty.
|
53
|
+
"""
|
54
|
+
openupgrade.add_columns(
|
55
|
+
env,
|
56
|
+
[
|
57
|
+
(False, "picking_type_id", "many2one", None, "repair_order"),
|
58
|
+
(False, "location_dest_id", "many2one", None, "repair_order"),
|
59
|
+
(False, "parts_location_id", "many2one", None, "repair_order"),
|
60
|
+
(False, "recycle_location_id", "many2one", None, "repair_order"),
|
61
|
+
],
|
62
|
+
)
|
63
|
+
temporal_location = env["stock.location"].create(
|
64
|
+
{
|
65
|
+
"name": "Temporary Location OpenUpgrade",
|
66
|
+
"usage": "transit",
|
67
|
+
"company_id": False,
|
68
|
+
}
|
69
|
+
)
|
70
|
+
# Create the picking type
|
71
|
+
picking_type = env["stock.picking.type"].create(
|
72
|
+
{
|
73
|
+
"name": "SPT Repair OpenUpgrade",
|
74
|
+
"code": "internal",
|
75
|
+
"default_location_src_id": temporal_location.id,
|
76
|
+
"default_location_dest_id": temporal_location.id,
|
77
|
+
"sequence": 1000,
|
78
|
+
"sequence_code": "OU",
|
79
|
+
}
|
80
|
+
)
|
81
|
+
openupgrade.logged_query(
|
82
|
+
env.cr,
|
83
|
+
"""
|
84
|
+
UPDATE repair_order
|
85
|
+
SET picking_type_id = %(picking_type_id)s,
|
86
|
+
location_dest_id = %(location_id)s,
|
87
|
+
parts_location_id = %(location_id)s,
|
88
|
+
recycle_location_id = %(location_id)s
|
89
|
+
""",
|
90
|
+
{"picking_type_id": picking_type.id, "location_id": temporal_location.id},
|
91
|
+
)
|
92
|
+
|
93
|
+
|
94
|
+
def fill_repair_order_schedule_date(env):
|
95
|
+
"""
|
96
|
+
Set the schedule_date for repair orders where it is currently null.
|
97
|
+
The field was not required before, but now it is required,
|
98
|
+
to prevent it from defaulting to now(), assign the create_date instead.
|
99
|
+
"""
|
100
|
+
openupgrade.logged_query(
|
101
|
+
env.cr,
|
102
|
+
"""
|
103
|
+
UPDATE repair_order
|
104
|
+
SET schedule_date = create_date
|
105
|
+
WHERE schedule_date IS NULL
|
106
|
+
""",
|
107
|
+
)
|
108
|
+
|
109
|
+
|
110
|
+
@openupgrade.migrate()
|
111
|
+
def migrate(env, version=None):
|
112
|
+
openupgrade.remove_tables_fks(env.cr, ["repair_line", "repair_fee"])
|
113
|
+
openupgrade.copy_columns(env.cr, {"repair_order": [("state", None, None)]})
|
114
|
+
add_helper_repair_move_rel(env)
|
115
|
+
stock_warehouse_create_columns(env)
|
116
|
+
repair_create_columns(env)
|
117
|
+
fill_repair_order_schedule_date(env)
|
@@ -0,0 +1,143 @@
|
|
1
|
+
---Models in module 'repair'---
|
2
|
+
obsolete model repair.fee
|
3
|
+
obsolete model repair.line
|
4
|
+
obsolete model repair.order.make_invoice [transient]
|
5
|
+
new model repair.warn.uncomplete.move [transient]
|
6
|
+
# NOTHING TO DO
|
7
|
+
|
8
|
+
---Fields in module 'repair'---
|
9
|
+
repair / product.template / create_repair (boolean) : NEW
|
10
|
+
# DONE: post-migration: new feature. We can assure at least that this field is TRUE if repair fee were created for this product
|
11
|
+
|
12
|
+
repair / account.move / repair_ids (one2many) : DEL relation: repair.order
|
13
|
+
repair / account.move.line / repair_fee_ids (one2many) : DEL relation: repair.fee
|
14
|
+
repair / account.move.line / repair_line_ids (one2many) : DEL relation: repair.line
|
15
|
+
repair / repair.fee / company_id (many2one) : DEL relation: res.company
|
16
|
+
repair / repair.fee / invoice_line_id (many2one) : DEL relation: account.move.line
|
17
|
+
repair / repair.fee / invoiced (boolean) : DEL
|
18
|
+
repair / repair.fee / name (text) : DEL required
|
19
|
+
repair / repair.fee / price_subtotal (float) : DEL
|
20
|
+
repair / repair.fee / price_total (float) : DEL
|
21
|
+
repair / repair.fee / price_unit (float) : DEL required
|
22
|
+
repair / repair.fee / product_id (many2one) : DEL relation: product.product
|
23
|
+
repair / repair.fee / product_uom (many2one) : DEL relation: uom.uom, required
|
24
|
+
repair / repair.fee / product_uom_qty (float) : DEL required
|
25
|
+
repair / repair.fee / repair_id (many2one) : DEL relation: repair.order, required
|
26
|
+
repair / repair.fee / tax_id (many2many) : DEL relation: account.tax
|
27
|
+
repair / repair.line / invoice_line_id (many2one) : DEL relation: account.move.line
|
28
|
+
repair / repair.line / invoiced (boolean) : DEL
|
29
|
+
repair / repair.line / price_subtotal (float) : DEL
|
30
|
+
repair / repair.line / price_total (float) : DEL
|
31
|
+
repair / repair.line / price_unit (float) : DEL required
|
32
|
+
repair / repair.line / tax_id (many2many) : DEL relation: account.tax
|
33
|
+
repair / repair.order / fees_lines (one2many) : DEL relation: repair.fee
|
34
|
+
repair / repair.order / operations (one2many) : DEL relation: repair.line
|
35
|
+
repair / repair.order / activity_user_id (many2one) : not related anymore
|
36
|
+
repair / repair.order / activity_user_id (many2one) : now a function
|
37
|
+
repair / repair.order / address_id (many2one) : DEL relation: res.partner
|
38
|
+
repair / repair.order / amount_tax (float) : DEL
|
39
|
+
repair / repair.order / amount_total (float) : DEL
|
40
|
+
repair / repair.order / amount_untaxed (float) : DEL
|
41
|
+
repair / repair.order / description (char) : DEL
|
42
|
+
repair / repair.order / guarantee_limit (date) : DEL
|
43
|
+
repair / repair.order / invoice_id (many2one) : DEL relation: account.move
|
44
|
+
repair / repair.order / invoice_method (selection) : DEL required, selection_keys: ['after_repair', 'b4repair', 'none']
|
45
|
+
repair / repair.order / invoiced (boolean) : DEL
|
46
|
+
repair / repair.order / repaired (boolean) : DEL
|
47
|
+
repair / repair.order / message_main_attachment_id (many2one): DEL relation: ir.attachment
|
48
|
+
repair / repair.order / partner_invoice_id (many2one) : DEL relation: res.partner
|
49
|
+
repair / repair.order / pricelist_id (many2one) : DEL relation: product.pricelist
|
50
|
+
repair / repair.order / quotation_notes (html) : DEL
|
51
|
+
# NOTHING TO DO: These fields and models were removed in this PR https://github.com/odoo/odoo/pull/106911
|
52
|
+
|
53
|
+
repair / repair.line / company_id (many2one) : DEL relation: res.company
|
54
|
+
repair / repair.line / location_dest_id (many2one) : DEL relation: stock.location, required
|
55
|
+
repair / repair.line / location_id (many2one) : DEL relation: stock.location, required
|
56
|
+
repair / repair.line / lot_id (many2one) : DEL relation: stock.lot
|
57
|
+
repair / repair.line / move_id (many2one) : DEL relation: stock.move
|
58
|
+
repair / repair.line / name (text) : DEL required
|
59
|
+
repair / repair.line / product_id (many2one) : DEL relation: product.product, required
|
60
|
+
repair / repair.line / product_uom (many2one) : DEL relation: uom.uom, required
|
61
|
+
repair / repair.line / product_uom_qty (float) : DEL required
|
62
|
+
repair / repair.line / repair_id (many2one) : DEL relation: repair.order, required
|
63
|
+
repair / repair.line / state (selection) : DEL required, selection_keys: ['cancel', 'confirmed', 'done', 'draft']
|
64
|
+
repair / repair.line / type (selection) : DEL required, selection_keys: ['add', 'remove']
|
65
|
+
repair / stock.move / repair_line_type (selection) : NEW selection_keys: ['add', 'recycle', 'remove']
|
66
|
+
repair / repair.order / move_ids (one2many) : NEW relation: stock.move
|
67
|
+
# DONE: post-migration: merged into stock.move using repair_line_type
|
68
|
+
|
69
|
+
repair / repair.order / is_parts_available (boolean) : NEW isfunction: function, stored
|
70
|
+
repair / repair.order / is_parts_late (boolean) : NEW isfunction: function, stored
|
71
|
+
# NOTHING TO DO: Handled by the ORM
|
72
|
+
|
73
|
+
repair / repair.order / location_dest_id (many2one) : NEW relation: stock.location, required, isrelated: related, stored
|
74
|
+
repair / repair.order / parts_location_id (many2one) : NEW relation: stock.location, required, isrelated: related, stored
|
75
|
+
repair / repair.order / picking_type_id (many2one) : NEW relation: stock.picking.type, required, hasdefault: default
|
76
|
+
repair / repair.order / recycle_location_id (many2one): NEW relation: stock.location, required, hasdefault: compute
|
77
|
+
# DONE: post-migration: filled picking_type_id from the warehouse of the location and populated other related fields from picking_type_id.
|
78
|
+
|
79
|
+
repair / repair.order / location_id (many2one) : not a function anymore
|
80
|
+
# NOTHING TO DO: the field definition not change
|
81
|
+
|
82
|
+
repair / repair.order / lot_id (many2one) : now a function
|
83
|
+
# NOTHING TO DO: Converted to a computed field with store=True.
|
84
|
+
|
85
|
+
repair / repair.order / procurement_group_id (many2one): NEW relation: procurement.group
|
86
|
+
# DONE: post-migration: create the procurement records and assign it to the stock moves
|
87
|
+
|
88
|
+
repair / repair.order / rating_ids (one2many) : NEW relation: rating.rating
|
89
|
+
# NOTHING TO DO:
|
90
|
+
|
91
|
+
repair / repair.order / schedule_date (date) : now required
|
92
|
+
repair / repair.order / schedule_date (date) : type is now 'datetime' ('date')
|
93
|
+
# DONE: pre-migration: Assign the create_date to schedule_date for records where the field is null.
|
94
|
+
# The type cast from date to datetime is handled by PostgreSQL
|
95
|
+
|
96
|
+
repair / repair.order / under_warranty (boolean) : NEW
|
97
|
+
repair / repair.order / sale_order_line_id (many2one) : NEW relation: sale.order.line
|
98
|
+
repair / sale.order / repair_order_ids (one2many) : NEW relation: repair.order
|
99
|
+
# NOTHING TO DO: New feature that does not impact current behavior.
|
100
|
+
|
101
|
+
repair / stock.picking / is_repairable (boolean) : not related anymore
|
102
|
+
repair / stock.picking / is_repairable (boolean) : now a function
|
103
|
+
# NOTHING TO DO: Handled by the ORM. It's just a non-storable related field converted to a non-storable computed field.
|
104
|
+
|
105
|
+
repair / repair.order / state (selection) : selection_keys is now '['cancel', 'confirmed', 'done', 'draft', 'under_repair']' ('['2binvoiced', 'cancel', 'confirmed', 'done', 'draft', 'ready', 'under_repair']')
|
106
|
+
# DONE: post-migration: ready -> confirmed. 2binvoiced and not repaired -> confirmed. - 2binvoiced and repaired -> done.
|
107
|
+
|
108
|
+
repair / stock.picking.type / code (False) : NEW selection_keys: ['incoming', 'internal', 'mrp_operation', 'outgoing', 'repair_operation'], mode: modify
|
109
|
+
repair / stock.picking.type / default_recycle_location_dest_id (many2one): NEW relation: stock.location, hasdefault: compute
|
110
|
+
repair / stock.picking.type / default_remove_location_dest_id (many2one): NEW relation: stock.location, hasdefault: compute
|
111
|
+
# NOTHING TO DO: Handled by the ORM
|
112
|
+
|
113
|
+
repair / stock.warehouse / repair_type_id (many2one) : NEW relation: stock.picking.type
|
114
|
+
# DONE: post-migration: assure every warehouse has new repair type
|
115
|
+
|
116
|
+
---XML records in module 'repair'---
|
117
|
+
NEW ir.actions.act_window: repair.action_picking_repair
|
118
|
+
NEW ir.actions.act_window: repair.action_repair_order_form
|
119
|
+
DEL ir.actions.act_window: repair.act_repair_invoice
|
120
|
+
NEW ir.model.access: repair.access_repair_warn_uncomplete_move
|
121
|
+
DEL ir.model.access: repair.access_account_tax_user
|
122
|
+
DEL ir.model.access: repair.access_repair_fee_user
|
123
|
+
DEL ir.model.access: repair.access_repair_line_user
|
124
|
+
DEL ir.model.access: repair.access_repair_order_make_invoice
|
125
|
+
DEL ir.model.constraint: repair.constraint_repair_order_name
|
126
|
+
# NOTHING TO DO
|
127
|
+
|
128
|
+
DEL ir.rule: repair.repair_fee_rule (noupdate)
|
129
|
+
DEL ir.rule: repair.repair_line_rule (noupdate)
|
130
|
+
DEL ir.sequence: repair.seq_repair (noupdate)
|
131
|
+
DEL mail.template: repair.mail_template_repair_quotation (noupdate)
|
132
|
+
# DONE: post-migration: safely remove
|
133
|
+
|
134
|
+
NEW ir.ui.menu: repair.repair_order_menu
|
135
|
+
NEW ir.ui.view: repair.repair_order_view_activity
|
136
|
+
NEW ir.ui.view: repair.stock_repair_type_kanban
|
137
|
+
NEW ir.ui.view: repair.view_product_template_form_inherit_repair
|
138
|
+
NEW ir.ui.view: repair.view_repair_warn_uncomplete_move
|
139
|
+
NEW ir.ui.view: repair.view_sale_order_form_inherit_repair
|
140
|
+
NEW ir.ui.view: repair.view_warehouse_inherit_repair
|
141
|
+
DEL ir.ui.view: repair.view_make_invoice
|
142
|
+
NEW stock.picking.type: repair.picking_type_warehouse0_repair (noupdate)
|
143
|
+
# NOTHING TO DO
|
@@ -39,8 +39,8 @@ odoo/addons/openupgrade_scripts/scripts/account_qr_code_emv/17.0.1.0/upgrade_ana
|
|
39
39
|
odoo/addons/openupgrade_scripts/scripts/account_tax_python/17.0.1.0/upgrade_analysis.txt,sha256=71VQVnwf1DecQpUjgJWr_6BPWXRJmEjT63S8AtDpHRM,469
|
40
40
|
odoo/addons/openupgrade_scripts/scripts/account_update_tax_tags/17.0.1.0/upgrade_analysis.txt,sha256=JK79MYmDfZhdQU0d4LeMewZo2CpE01ltPRTZdFZHM-k,192
|
41
41
|
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/noupdate_changes.xml,sha256=-CxzojBA5uxpeYi2roC1KYP_ROFVQjqDix7GdZAgxY8,421
|
42
|
-
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/post-migration.py,sha256=
|
43
|
-
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/pre-migration.py,sha256=
|
42
|
+
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/post-migration.py,sha256=90GlvofSVZVfmGzrCbHL9cxYeRW3qOWdiZOI44MPfRY,2677
|
43
|
+
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/pre-migration.py,sha256=TetIbdo9_ITv-3oRBUeJ3sK2RpHA2iJwUMwAy1jEpU0,2328
|
44
44
|
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/upgrade_analysis.txt,sha256=QvqEqA2DKpDqb3U2ZI27zTnIBBUGG3TZFqE4jSjYGlQ,1252
|
45
45
|
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.2/upgrade_analysis_work.txt,sha256=Lnz-_Rry2F973-auNcXzj2QvXdgpCxG3ndUmeOvZaZ4,1867
|
46
46
|
odoo/addons/openupgrade_scripts/scripts/auth_ldap/17.0.1.0/upgrade_analysis.txt,sha256=QB9DfdWzmE0oR4fsd-qPQ9JF5W_uZFNYpvKmNVs_TZw,150
|
@@ -578,8 +578,11 @@ odoo/addons/openupgrade_scripts/scripts/purchase_stock/17.0.1.2/upgrade_analysis
|
|
578
578
|
odoo/addons/openupgrade_scripts/scripts/purchase_stock/17.0.1.2/upgrade_analysis_work.txt,sha256=VJnF5yVWxBRXS4RnCEEh89m1pUdRSdKZxzkotL2tFiA,1569
|
579
579
|
odoo/addons/openupgrade_scripts/scripts/rating/17.0.1.1/upgrade_analysis.txt,sha256=IcRo-FnC7iydnkmJqJQWtWFHJ_PXpVlvNB2tvxkxKH0,1964
|
580
580
|
odoo/addons/openupgrade_scripts/scripts/rating/17.0.1.1/upgrade_analysis_work.txt,sha256=AG_gRxWXjup776lKThpZ4499ojtMVej_7cT_1LN9xr0,1990
|
581
|
-
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/noupdate_changes.xml,sha256=
|
581
|
+
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/noupdate_changes.xml,sha256=6SXKMncyCT91vd4RbCOyBQNFy4_3PKpa9_rzbUp6mpg,1169
|
582
|
+
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/post-migration.py,sha256=N-seXF_ZkoKneZHAfhqZZT-2KBAliNW1VgXwgoFtPcY,9782
|
583
|
+
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/pre-migration.py,sha256=_Ml69--Ls00fE_lBAhia6alhhhCdyl-aMaVHSRYp_qk,4019
|
582
584
|
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/upgrade_analysis.txt,sha256=NY60xZCM0zBCPbPOx65dTAoemNHBfLVza2n-WWZlHRY,9330
|
585
|
+
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/upgrade_analysis_work.txt,sha256=A-xVi2gLJlUEF2Zw69cwcgqo93WOMzSETMYl8JKa1aY,10666
|
583
586
|
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/post-migration.py,sha256=WyZ_LtqxscUMf_J7-iANYC0xKxu4ROuAcJbSOPhYaPE,437
|
584
587
|
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/pre-migration.py,sha256=3LQfmv_8Unj96nxU1aOSYZ2spDpvDiU4WNpmhKPfUAQ,970
|
585
588
|
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/upgrade_analysis.txt,sha256=rvmI4wkqwRY0Mz3mI_oMf9DsqwKny69cgGNasFv6BpU,854
|
@@ -765,7 +768,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
|
|
765
768
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
766
769
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
767
770
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
|
768
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
769
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
770
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
771
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
771
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info/METADATA,sha256=vV55XMp42rioabBCUk0rK7NXLAKJphs7GXk-LXnHnm4,3786
|
772
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
773
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
774
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.362.dist-info/RECORD,,
|
File without changes
|