odoo-addon-openupgrade-scripts 16.0.1.0.3.189__py3-none-any.whl → 16.0.1.0.3.190__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_fleet/16.0.1.0/pre-migration.py +26 -0
- odoo/addons/openupgrade_scripts/scripts/hr_fleet/16.0.1.0/upgrade_analysis_work.txt +13 -0
- odoo/addons/openupgrade_scripts/scripts/sale_purchase/16.0.1.0/post-migration.py +86 -0
- odoo/addons/openupgrade_scripts/scripts/sale_purchase/16.0.1.0/upgrade_analysis_work.txt +11 -0
- odoo/addons/openupgrade_scripts/scripts/sale_stock/16.0.1.0/pre-migration.py +57 -0
- odoo/addons/openupgrade_scripts/scripts/sale_stock/16.0.1.0/upgrade_analysis_work.txt +16 -0
- odoo/addons/openupgrade_scripts/scripts/website_sale_product_configurator/16.0.0.1/upgrade_analysis_work.txt +5 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.189.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.189.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info}/RECORD +11 -4
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.189.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.189.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
from openupgradelib import openupgrade
|
2
|
+
|
3
|
+
|
4
|
+
def create_drive_employee(env):
|
5
|
+
openupgrade.logged_query(
|
6
|
+
env.cr,
|
7
|
+
"""
|
8
|
+
ALTER TABLE fleet_vehicle_assignation_log
|
9
|
+
ADD IF NOT EXISTS driver_employee_id INT
|
10
|
+
""",
|
11
|
+
)
|
12
|
+
|
13
|
+
openupgrade.logged_query(
|
14
|
+
env.cr,
|
15
|
+
"""
|
16
|
+
UPDATE fleet_vehicle_assignation_log log
|
17
|
+
SET driver_employee_id = emp.id
|
18
|
+
FROM hr_employee emp
|
19
|
+
WHERE log.driver_id IS NOT NULL and log.driver_id = emp.address_home_id
|
20
|
+
""",
|
21
|
+
)
|
22
|
+
|
23
|
+
|
24
|
+
@openupgrade.migrate()
|
25
|
+
def migrate(env, version):
|
26
|
+
create_drive_employee(env)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---Models in module 'hr_fleet'---
|
2
|
+
---Fields in module 'hr_fleet'---
|
3
|
+
hr_fleet / fleet.vehicle.assignation.log / driver_employee_id (many2one) : is now stored
|
4
|
+
hr_fleet / fleet.vehicle.assignation.log / driver_employee_id (many2one) : not related anymore
|
5
|
+
|
6
|
+
# DONE: fill data from old related field for now store current compute field in pre-migration
|
7
|
+
|
8
|
+
---XML records in module 'hr_fleet'---
|
9
|
+
NEW ir.ui.view: hr_fleet.fleet_vehicle_assignation_log_employee_view_list
|
10
|
+
NEW ir.ui.view: hr_fleet.fleet_vehicle_view_tree_inherit_hr
|
11
|
+
NEW ir.ui.view: hr_fleet.view_attachment_kanban_inherit_hr
|
12
|
+
|
13
|
+
# NOTHING TO DO
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# Copyright 2023 Coop IT Easy SC
|
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 convert_service_to_purchase_to_company_dependent(env):
|
9
|
+
"""The product.template.service_to_purchase field became company-dependent.
|
10
|
+
this means that it is no longer stored in the product_template table,
|
11
|
+
but in the ir_property table.
|
12
|
+
|
13
|
+
for such cases, openupgrade.convert_to_company_dependent() should
|
14
|
+
normally be used, but that function does not seem to support converting
|
15
|
+
a field to company-dependent without changing its name at the same time.
|
16
|
+
moreover, it stores boolean values even when they are false (what odoo
|
17
|
+
does not), and it creates values for all companies, which does not make
|
18
|
+
sense when a record is linked to a particular company only.
|
19
|
+
"""
|
20
|
+
service_to_purchase_field_id = (
|
21
|
+
env.ref("sale_purchase.field_product_template__service_to_purchase").id,
|
22
|
+
)
|
23
|
+
# this boolean property stores its value in the value_integer column, and
|
24
|
+
# it is only stored if it is true.
|
25
|
+
openupgrade.logged_query(
|
26
|
+
env.cr,
|
27
|
+
"""
|
28
|
+
insert into ir_property (
|
29
|
+
company_id, fields_id, value_integer, name, res_id, type
|
30
|
+
)
|
31
|
+
select
|
32
|
+
company_id,
|
33
|
+
%(field_id)s,
|
34
|
+
1,
|
35
|
+
'service_to_purchase',
|
36
|
+
'product.template,' || id,
|
37
|
+
'boolean'
|
38
|
+
from product_template
|
39
|
+
where
|
40
|
+
company_id is not null and
|
41
|
+
service_to_purchase
|
42
|
+
order by id
|
43
|
+
""",
|
44
|
+
{"field_id": service_to_purchase_field_id},
|
45
|
+
)
|
46
|
+
# for product.template records that are not linked to a company, create an
|
47
|
+
# ir.property record for each company.
|
48
|
+
openupgrade.logged_query(
|
49
|
+
env.cr,
|
50
|
+
"""
|
51
|
+
insert into ir_property (
|
52
|
+
company_id,
|
53
|
+
fields_id,
|
54
|
+
value_integer,
|
55
|
+
name,
|
56
|
+
res_id,
|
57
|
+
type
|
58
|
+
)
|
59
|
+
select
|
60
|
+
rc.id,
|
61
|
+
%(field_id)s,
|
62
|
+
1,
|
63
|
+
'service_to_purchase',
|
64
|
+
'product.template,' || pt.id,
|
65
|
+
'boolean'
|
66
|
+
from product_template as pt
|
67
|
+
inner join res_company as rc on
|
68
|
+
pt.company_id is null and
|
69
|
+
pt.service_to_purchase
|
70
|
+
order by pt.id, rc.id
|
71
|
+
""",
|
72
|
+
{"field_id": service_to_purchase_field_id},
|
73
|
+
)
|
74
|
+
|
75
|
+
|
76
|
+
@openupgrade.migrate()
|
77
|
+
def migrate(env, version):
|
78
|
+
convert_service_to_purchase_to_company_dependent(env)
|
79
|
+
constraint = env.ref(
|
80
|
+
"sale_purchase.constraint_product_template_service_to_purchase", False
|
81
|
+
)
|
82
|
+
if constraint:
|
83
|
+
constraint._module_data_uninstall()
|
84
|
+
openupgrade.delete_records_safely_by_xml_id(
|
85
|
+
env, ["sale_purchase.constraint_product_template_service_to_purchase"]
|
86
|
+
)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---Models in module 'sale_purchase'---
|
2
|
+
---Fields in module 'sale_purchase'---
|
3
|
+
sale_purchase / product.template / service_to_purchase (boolean) : not stored anymore
|
4
|
+
# DONE: post-migration, convert to company-dependent field
|
5
|
+
|
6
|
+
---XML records in module 'sale_purchase'---
|
7
|
+
DEL ir.model.constraint: sale_purchase.constraint_product_template_service_to_purchase
|
8
|
+
# DONE: post-migration, delete constraint
|
9
|
+
|
10
|
+
NEW ir.ui.view: sale_purchase.sale_order_cancel_view_form
|
11
|
+
# NOTHING TO DO
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Copyright 2023 Coop IT Easy SC
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
|
7
|
+
def compute_sale_order_delivery_status(env):
|
8
|
+
openupgrade.add_fields(
|
9
|
+
env,
|
10
|
+
[
|
11
|
+
(
|
12
|
+
"delivery_status",
|
13
|
+
"sale.order",
|
14
|
+
False,
|
15
|
+
"selection",
|
16
|
+
False,
|
17
|
+
"sale_stock",
|
18
|
+
)
|
19
|
+
],
|
20
|
+
)
|
21
|
+
openupgrade.logged_query(
|
22
|
+
env.cr,
|
23
|
+
"""
|
24
|
+
with so_delivery_status as (
|
25
|
+
select
|
26
|
+
sale_id as id,
|
27
|
+
case
|
28
|
+
when
|
29
|
+
count(state) filter (
|
30
|
+
where state = 'cancel'
|
31
|
+
) = count(state)
|
32
|
+
then null
|
33
|
+
when
|
34
|
+
count(state) filter (
|
35
|
+
where state not in ('done', 'cancel')
|
36
|
+
) = 0
|
37
|
+
then 'full'
|
38
|
+
when
|
39
|
+
count(state) filter (where state = 'done') > 0
|
40
|
+
then 'partial'
|
41
|
+
else 'pending'
|
42
|
+
end as delivery_status
|
43
|
+
from stock_picking
|
44
|
+
group by 1
|
45
|
+
order by 1
|
46
|
+
)
|
47
|
+
update sale_order as so
|
48
|
+
set delivery_status = so_delivery_status.delivery_status
|
49
|
+
from so_delivery_status
|
50
|
+
where so_delivery_status.id = so.id;
|
51
|
+
""",
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
@openupgrade.migrate()
|
56
|
+
def migrate(env, version):
|
57
|
+
compute_sale_order_delivery_status(env)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---Models in module 'sale_stock'---
|
2
|
+
---Fields in module 'sale_stock'---
|
3
|
+
sale_stock / sale.order / delivery_status (selection) : NEW selection_keys: ['full', 'partial', 'pending'], isfunction: function, stored
|
4
|
+
# DONE: pre-migration: fast computed delivery_status
|
5
|
+
sale_stock / sale.order / incoterm_location (char) : NEW
|
6
|
+
sale_stock / sale.order.line / product_type (selection) : module is now 'sale' ('sale_stock')
|
7
|
+
sale_stock / sale.order.line / route_id (many2one) : relation is now 'stock.route' ('stock.location.route') [nothing to do]
|
8
|
+
sale_stock / stock.location.route / sale_selectable (boolean) : DEL
|
9
|
+
sale_stock / stock.route / sale_selectable (boolean) : NEW
|
10
|
+
# NOTHING TO DO
|
11
|
+
---XML records in module 'sale_stock'---
|
12
|
+
DEL ir.ui.menu: sale_stock.menu_aftersale
|
13
|
+
DEL ir.ui.menu: sale_stock.menu_invoiced
|
14
|
+
DEL ir.ui.view: sale_stock.product_template_view_form_inherit_sale
|
15
|
+
DEL ir.ui.view: sale_stock.product_template_view_form_inherit_stock
|
16
|
+
# NOTHING TO DO
|
@@ -0,0 +1,5 @@
|
|
1
|
+
---Models in module 'website_sale_product_configurator'---
|
2
|
+
---Fields in module 'website_sale_product_configurator'---
|
3
|
+
website_sale_product_configurator / website / add_to_cart_action (False) : NEW selection_keys: ['force_dialog', 'go_to_cart', 'stay'], mode: modify
|
4
|
+
---XML records in module 'website_sale_product_configurator'---
|
5
|
+
# Nothing to do.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-openupgrade-scripts
|
3
|
-
Version: 16.0.1.0.3.
|
3
|
+
Version: 16.0.1.0.3.190
|
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)
|
@@ -149,7 +149,9 @@ odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/post-migration.py,sh
|
|
149
149
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/pre-migration.py,sha256=cxJDD2gBCL0Vd7i4vn4falwON0YOy67OsAbpMqor1lU,3801
|
150
150
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/upgrade_analysis.txt,sha256=jcxZTjMentbGt3vqdFaG_9NX9sb9KHtJyGfZlw6V4us,4453
|
151
151
|
odoo/addons/openupgrade_scripts/scripts/hr_expense/16.0.2.0/upgrade_analysis_work.txt,sha256=fvIrFIWUu-yyxh7PoSfj5EuaXqmVntzftuov5P55fSw,4523
|
152
|
+
odoo/addons/openupgrade_scripts/scripts/hr_fleet/16.0.1.0/pre-migration.py,sha256=4_vFSdP47ErHAegARFOXpVM9r7i4qtEpGRffW91AtaQ,612
|
152
153
|
odoo/addons/openupgrade_scripts/scripts/hr_fleet/16.0.1.0/upgrade_analysis.txt,sha256=3Z06g4YG8NTmD-qV6to7RhPJbqkUPhxqppzKVzunw0w,492
|
154
|
+
odoo/addons/openupgrade_scripts/scripts/hr_fleet/16.0.1.0/upgrade_analysis_work.txt,sha256=DjuTCAtNenkyRPdsAtaPEtRHa33ID79TKLUa5FL5pkM,605
|
153
155
|
odoo/addons/openupgrade_scripts/scripts/hr_gamification/16.0.1.0/upgrade_analysis.txt,sha256=cMaEUAXfvHRW3vwIZMIrGROH5eDQjRAbqLkraqvEj-4,168
|
154
156
|
odoo/addons/openupgrade_scripts/scripts/hr_gamification/16.0.1.0/upgrade_analysis_work.txt,sha256=3iBxaIQTm-sWLBp43p9C6sjlz2cEs0Bw8yf-0VOL0LM,185
|
155
157
|
odoo/addons/openupgrade_scripts/scripts/hr_holidays/16.0.1.6/noupdate_changes.xml,sha256=5rRhvN1SNok_2zTE545S2unKRR87KPWVWHygEji5Azk,1900
|
@@ -509,10 +511,14 @@ odoo/addons/openupgrade_scripts/scripts/sale_product_matrix/16.0.1.0/upgrade_ana
|
|
509
511
|
odoo/addons/openupgrade_scripts/scripts/sale_project/16.0.1.0/upgrade_analysis.txt,sha256=3_MabDi3INHUQI9b0qYLPEAgQ-FiMBVyz6cf3eoldlU,1618
|
510
512
|
odoo/addons/openupgrade_scripts/scripts/sale_project/16.0.1.0/upgrade_analysis_work.txt,sha256=XzPdzthCMjGri6-BgxmrLPf1ctXo1i-k8VXdsc80xKg,1648
|
511
513
|
odoo/addons/openupgrade_scripts/scripts/sale_project_stock/16.0.1.0/upgrade_analysis.txt,sha256=CvydNXFLRJ3UyF1j1fW0FMiIYjMGFaA-KI8t4nPXekM,221
|
514
|
+
odoo/addons/openupgrade_scripts/scripts/sale_purchase/16.0.1.0/post-migration.py,sha256=keJZcWXEuNAYLlyVTF4akma3PCeaGdYEdCOMiAB1fvw,2871
|
512
515
|
odoo/addons/openupgrade_scripts/scripts/sale_purchase/16.0.1.0/upgrade_analysis.txt,sha256=KICfQiqiyfFj1kfW0VXF0zyk8wnik_0APGVT0JdU9lY,361
|
516
|
+
odoo/addons/openupgrade_scripts/scripts/sale_purchase/16.0.1.0/upgrade_analysis_work.txt,sha256=o5NgI4ehOaScv8O89NdL0RVYG5gxxO0ie245nlGpR2g,480
|
513
517
|
odoo/addons/openupgrade_scripts/scripts/sale_quotation_builder/16.0.1.0/noupdate_changes.xml,sha256=rgaGcEPiWrUftrz6BetgECgDqG3M3Nygj3XmTBVMvbo,3497
|
514
518
|
odoo/addons/openupgrade_scripts/scripts/sale_quotation_builder/16.0.1.0/upgrade_analysis.txt,sha256=06ej-ps7VMDzYrQl7Hdd6uR_V_uhY2mtKQniOHUwmtA,351
|
519
|
+
odoo/addons/openupgrade_scripts/scripts/sale_stock/16.0.1.0/pre-migration.py,sha256=HokoL5uhqtcBIZFSGMGiH215GZGHnLqXs7q7ko5lKLc,1606
|
515
520
|
odoo/addons/openupgrade_scripts/scripts/sale_stock/16.0.1.0/upgrade_analysis.txt,sha256=2pgVDl2UDhrMPdfMl6Yts6AJbXt28_q7I1OuE45E4-U,819
|
521
|
+
odoo/addons/openupgrade_scripts/scripts/sale_stock/16.0.1.0/upgrade_analysis_work.txt,sha256=RI9VqkV-SjxDl0wzmCQvDNlHjK9rMN29Kc6r-xtHc7A,1060
|
516
522
|
odoo/addons/openupgrade_scripts/scripts/sale_timesheet/16.0.1.0/pre-migration.py,sha256=9xiwKatRFe6WrUE4jYhdS86LaN8EHslHJyiw2kUwJzw,1297
|
517
523
|
odoo/addons/openupgrade_scripts/scripts/sale_timesheet/16.0.1.0/upgrade_analysis.txt,sha256=3ZAhGhCvAVd45pIpfNRtFbhbdv7dhcd6zdS4qhOCjUU,4247
|
518
524
|
odoo/addons/openupgrade_scripts/scripts/sale_timesheet/16.0.1.0/upgrade_analysis_work.txt,sha256=_294_KUpIOVVhbiq_HLCpjXqOX-gXd_5zAwL5jzmKK0,4527
|
@@ -634,6 +640,7 @@ odoo/addons/openupgrade_scripts/scripts/website_sale_digital/16.0.0.1/upgrade_an
|
|
634
640
|
odoo/addons/openupgrade_scripts/scripts/website_sale_loyalty/16.0.1.0/upgrade_analysis.txt,sha256=M753BVZ9F-ZP039qyWr2V8SMeehrt8iizS0T-cwNVmU,3308
|
635
641
|
odoo/addons/openupgrade_scripts/scripts/website_sale_picking/16.0.1.0/upgrade_analysis.txt,sha256=TUeJygEuVPq6CRW7o-1WlNj-ytg3qMwvIrn1GSLjJK4,1075
|
636
642
|
odoo/addons/openupgrade_scripts/scripts/website_sale_product_configurator/16.0.0.1/upgrade_analysis.txt,sha256=AoU15nW3TnH5g6D1uusr9M5j0rUdG0rsHxfwTgML3D4,350
|
643
|
+
odoo/addons/openupgrade_scripts/scripts/website_sale_product_configurator/16.0.0.1/upgrade_analysis_work.txt,sha256=L05xg6wofXTrLPbGNzGo8KLg0fNr_YdcUMWCGn6VQ8A,367
|
637
644
|
odoo/addons/openupgrade_scripts/scripts/website_sale_slides/16.0.1.0/upgrade_analysis.txt,sha256=6Gl-9-udHVlwU8JWm5SnagoSi2uVGVy4igg32wX30c0,952
|
638
645
|
odoo/addons/openupgrade_scripts/scripts/website_sale_stock/16.0.1.0/upgrade_analysis.txt,sha256=H9oYnZiyYkO8H9fuz638FK7b6XmIlVGTXB8_cklEteo,667
|
639
646
|
odoo/addons/openupgrade_scripts/scripts/website_sale_stock_wishlist/16.0.1.0/upgrade_analysis.txt,sha256=Su-F698eC2SIY29887O6dZDUZxFp_ckwSXM5C9xKRCk,550
|
@@ -651,7 +658,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
|
|
651
658
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
652
659
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
653
660
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
|
654
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
655
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
656
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
657
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
661
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info/METADATA,sha256=ru6ZtP2m4WHPkrMdjZ6iBvEa-5i9OActR6un07J0z4k,3810
|
662
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
663
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
664
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.190.dist-info/RECORD,,
|
File without changes
|