odoo-addon-openupgrade-scripts 16.0.1.0.3.237__py3-none-any.whl → 16.0.1.0.3.242__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/point_of_sale/16.0.1.0.1/post-migration.py +50 -0
- odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/pre-migration.py +36 -0
- odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/upgrade_analysis_work.txt +98 -0
- odoo/addons/openupgrade_scripts/scripts/pos_restaurant/16.0.1.0/upgrade_analysis_work.txt +15 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.237.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.237.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info}/RECORD +8 -4
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.237.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.237.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC
|
2
|
+
# SPDX-FileCopyrightText: 2024 Tecnativa - Pedro M. Baeza
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
4
|
+
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
|
8
|
+
def copy_session_id_to_line(cr):
|
9
|
+
"""There is no longer a link between account.bank.statement and pos.session.
|
10
|
+
Instead, the link is between account.bank.statement.line and pos.session.
|
11
|
+
"""
|
12
|
+
openupgrade.logged_query(
|
13
|
+
cr,
|
14
|
+
"""
|
15
|
+
UPDATE account_bank_statement_line line
|
16
|
+
SET pos_session_id=statement.pos_session_id
|
17
|
+
FROM account_bank_statement statement
|
18
|
+
WHERE line.statement_id=statement.id
|
19
|
+
""",
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
def copy_register_balance(cr):
|
24
|
+
"""There is no longer a link between account.bank.statement and pos.session.
|
25
|
+
The updated fields used to be related fields. Now, we store their values.
|
26
|
+
"""
|
27
|
+
openupgrade.logged_query(
|
28
|
+
cr,
|
29
|
+
"""
|
30
|
+
UPDATE pos_session session
|
31
|
+
SET cash_register_balance_end_real=statement.balance_end_real,
|
32
|
+
cash_register_balance_start=statement.balance_start
|
33
|
+
FROM account_bank_statement statement
|
34
|
+
WHERE statement.pos_session_id=session.id
|
35
|
+
""",
|
36
|
+
)
|
37
|
+
|
38
|
+
|
39
|
+
@openupgrade.migrate()
|
40
|
+
def migrate(env, version):
|
41
|
+
copy_session_id_to_line(env.cr)
|
42
|
+
copy_register_balance(env.cr)
|
43
|
+
openupgrade.delete_records_safely_by_xml_id(
|
44
|
+
env,
|
45
|
+
[
|
46
|
+
"point_of_sale.rule_pos_cashbox_line_accountant",
|
47
|
+
"point_of_sale.500_00",
|
48
|
+
],
|
49
|
+
)
|
50
|
+
openupgrade.load_data(env.cr, "point_of_sale", "16.0.1.0.1/noupdate_changes.xml")
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 Tecnativa - Pedro M. Baeza
|
2
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
3
|
+
import uuid
|
4
|
+
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
|
8
|
+
def _assign_pos_order_token(env):
|
9
|
+
openupgrade.add_fields(
|
10
|
+
env,
|
11
|
+
[("access_token", "pos.order", "pos_order", "char", False, "point_of_sale")],
|
12
|
+
)
|
13
|
+
env.cr.execute("SELECT id FROM survey_survey")
|
14
|
+
for row in env.cr.fetchall():
|
15
|
+
env.cr.execute(
|
16
|
+
"UPDATE survey_survey SET access_token = %s WHERE id = %s",
|
17
|
+
(str(uuid.uuid4()), row[0]),
|
18
|
+
)
|
19
|
+
|
20
|
+
|
21
|
+
@openupgrade.migrate()
|
22
|
+
def migrate(env, version):
|
23
|
+
openupgrade.add_fields(
|
24
|
+
env,
|
25
|
+
[
|
26
|
+
(
|
27
|
+
"cash_register_balance_start",
|
28
|
+
"pos.session",
|
29
|
+
"pos_session",
|
30
|
+
"monetary",
|
31
|
+
False,
|
32
|
+
"point_of_sale",
|
33
|
+
)
|
34
|
+
],
|
35
|
+
)
|
36
|
+
_assign_pos_order_token(env)
|
@@ -0,0 +1,98 @@
|
|
1
|
+
---Models in module 'point_of_sale'---
|
2
|
+
new model pos.session.check_product_wizard [transient]
|
3
|
+
# NOTHING TO DO: New transient model
|
4
|
+
|
5
|
+
---Fields in module 'point_of_sale'---
|
6
|
+
point_of_sale / account.bank.statement / pos_session_id (many2one) : DEL relation: pos.session
|
7
|
+
point_of_sale / account.bank.statement.line / pos_session_id (many2one) : NEW relation: pos.session
|
8
|
+
point_of_sale / pos.session / statement_ids (one2many) : DEL relation: account.bank.statement
|
9
|
+
point_of_sale / pos.session / statement_line_ids (one2many) : NEW relation: account.bank.statement.line
|
10
|
+
# DONE: post-migration: Copy account.bank.statement pos_session_id records to their lines.
|
11
|
+
|
12
|
+
point_of_sale / barcode.rule / type (False) : selection_keys is now '['alias', 'cashier', 'client', 'discount', 'expiration_date', 'location', 'location_dest', 'lot', 'pack_date', 'package', 'package_type', 'price', 'product', 'quantity', 'use_date', 'weight']' ('['alias', 'cashier', 'client', 'discount', 'expiration_date', 'location', 'location_dest', 'lot', 'package', 'package_type', 'packaging_date', 'price', 'product', 'quantity', 'use_date', 'weight']')
|
13
|
+
# NOTHING TO DO: the selection_add is identical between versions.
|
14
|
+
|
15
|
+
point_of_sale / pos.config / barcode_nomenclature_id (many2one): DEL relation: barcode.nomenclature, required
|
16
|
+
# NOTHING TO DO: this appears to be removed, and replaced by a related field on res.config.settings that points to res.company.
|
17
|
+
|
18
|
+
point_of_sale / pos.config / iface_display_categ_images (boolean): DEL
|
19
|
+
point_of_sale / pos.config / iface_orderline_customer_notes (boolean): DEL
|
20
|
+
# NOTHING TO DO: options and functionality removed.
|
21
|
+
|
22
|
+
point_of_sale / pos.config / is_margins_costs_accessible_to_every_user (boolean): NEW hasdefault: default
|
23
|
+
# NOTHING TO DO: new
|
24
|
+
|
25
|
+
point_of_sale / pos.config / module_account (boolean) : DEL
|
26
|
+
# NOTHING TO DO: functionality removed
|
27
|
+
|
28
|
+
point_of_sale / pos.config / module_pos_loyalty (boolean) : DEL
|
29
|
+
# NOTHING TO DO: functionality moved to res.config.settings view
|
30
|
+
|
31
|
+
point_of_sale / pos.config / product_configurator (boolean): DEL
|
32
|
+
# NOTHING TO DO: option removed, now effectively always TRUE
|
33
|
+
|
34
|
+
point_of_sale / pos.config / route_id (many2one) : relation is now 'stock.route' ('stock.location.route') [nothing to do]
|
35
|
+
# NOTHING TO DO
|
36
|
+
|
37
|
+
point_of_sale / pos.config / tax_regime (boolean) : DEL
|
38
|
+
# NOTHING TO DO: option removed, now only tax_regime_selection (bool) is used.
|
39
|
+
|
40
|
+
point_of_sale / pos.order / access_token (char) : NEW
|
41
|
+
# DONE: pre-migration: populate a unique UUID per order
|
42
|
+
|
43
|
+
point_of_sale / pos.order.line / price_extra (float) : NEW
|
44
|
+
# NOTHING TO DO: it appears to me that this was previously not saved on the model, and only existed as a 'transient' value in JavaScript
|
45
|
+
|
46
|
+
point_of_sale / pos.session / cash_real_difference (float) : DEL
|
47
|
+
point_of_sale / pos.session / cash_real_expected (float) : DEL
|
48
|
+
# NOTHING TO DO: these were set to the values of cash_register_difference and cash_register_balance_end respectively after validation, and then subsequently never used for anything.
|
49
|
+
|
50
|
+
point_of_sale / pos.session / cash_register_balance_end_real (float): is now stored
|
51
|
+
point_of_sale / pos.session / cash_register_balance_end_real (float): not related anymore
|
52
|
+
point_of_sale / pos.session / cash_register_balance_start (float): is now stored
|
53
|
+
point_of_sale / pos.session / cash_register_balance_start (float): not related anymore
|
54
|
+
point_of_sale / pos.session / cash_register_id (many2one) : DEL relation: account.bank.statement
|
55
|
+
# DONE: pre-migration: pre-create columnn `cash_register_balance_start` for avoiding to trigger `pos.session~_compute_cash_balance` method
|
56
|
+
# DONE: post-migration: copy values from cash_register_id.[balance_end_real,balance_start] to the no-longer-related fields.
|
57
|
+
|
58
|
+
point_of_sale / res.company / point_of_sale_use_ticket_qr_code (boolean): NEW
|
59
|
+
# NOTHING TO DO: new functionality
|
60
|
+
|
61
|
+
---XML records in module 'point_of_sale'---
|
62
|
+
DEL ir.actions.act_window: point_of_sale.account_cashbox_line_action
|
63
|
+
# NOTHING TO DO: account.cashbox.line no longer exists in account.
|
64
|
+
|
65
|
+
DEL ir.actions.act_window: point_of_sale.action_pos_box_out
|
66
|
+
# NOTHING TO DO: related wizard removed
|
67
|
+
|
68
|
+
DEL ir.actions.act_window: point_of_sale.action_pos_config_pos
|
69
|
+
# NOTHING TO DO: now action_pos_config_kanban is exclusively used
|
70
|
+
|
71
|
+
NEW ir.model.access: point_of_sale.access_pos_config_system_user
|
72
|
+
NEW ir.model.access: point_of_sale.access_pos_session_check_product_wizard
|
73
|
+
NEW ir.model.access: point_of_sale.access_product_tag_pos_manager
|
74
|
+
# NOTHING TO DO: new
|
75
|
+
|
76
|
+
DEL ir.model.access: point_of_sale.access_account_cashbox_line_user
|
77
|
+
DEL ir.model.access: point_of_sale.access_bank_statement_cashbox_user
|
78
|
+
DEL ir.model.access: point_of_sale.access_money_in_out_wizard
|
79
|
+
# NOTHING TO DO: the relevant models no longer exist
|
80
|
+
|
81
|
+
DEL ir.rule: point_of_sale.rule_pos_bank_statement_user (noupdate)
|
82
|
+
# NOTHING TO DO: pos_session_id no longer stored on account.bank.statement.
|
83
|
+
|
84
|
+
DEL ir.rule: point_of_sale.rule_pos_cashbox_line_accountant (noupdate)
|
85
|
+
# DONE: post-migration: Remove safely the rule
|
86
|
+
|
87
|
+
DEL ir.ui.menu: point_of_sale.menu_pos_config_pos
|
88
|
+
NEW ir.ui.view: point_of_sale.ticket_validation_screen
|
89
|
+
NEW ir.ui.view: point_of_sale.view_pos_session_check_product_wizard
|
90
|
+
DEL ir.ui.view: point_of_sale.account_cashbox_line_view_tree
|
91
|
+
DEL ir.ui.view: point_of_sale.view_bank_statement_pos_session
|
92
|
+
# NOTHING TO DO: view changes
|
93
|
+
|
94
|
+
NEW pos.bill: point_of_sale.0_25 (noupdate)
|
95
|
+
# NOTHING TO DO: data change
|
96
|
+
|
97
|
+
DEL pos.bill: point_of_sale.500_00 (noupdate)
|
98
|
+
# DONE: post-migration: Try to remove it
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---Models in module 'pos_restaurant'---
|
2
|
+
---Fields in module 'pos_restaurant'---
|
3
|
+
pos_restaurant / pos.order.line / mp_dirty (boolean) : DEL
|
4
|
+
# Nothing to do. my_dirty is now a non persistent field, handled in the PoS Javascript only.
|
5
|
+
|
6
|
+
pos_restaurant / pos.order.line / uuid (char) : NEW
|
7
|
+
# Nothing to do. New field.
|
8
|
+
|
9
|
+
pos_restaurant / restaurant.floor / _order : _order is now 'sequence, name' ('id')
|
10
|
+
# Nothing to do.
|
11
|
+
|
12
|
+
---XML records in module 'pos_restaurant'---
|
13
|
+
NEW ir.ui.view: pos_restaurant.res_config_settings_view_form
|
14
|
+
DEL ir.ui.view: pos_restaurant.pos_config_view_form_inherit_restaurant
|
15
|
+
# View changes: 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.242
|
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)
|
@@ -433,7 +433,10 @@ odoo/addons/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/upgrade_analysis
|
|
433
433
|
odoo/addons/openupgrade_scripts/scripts/phone_validation/16.0.2.1/upgrade_analysis.txt,sha256=zHx1oo1qSI5f6kZeh24Jq5tPXtfnvgQYlBeO1isOOSw,171
|
434
434
|
odoo/addons/openupgrade_scripts/scripts/phone_validation/16.0.2.1/upgrade_analysis_work.txt,sha256=r6ZZxEY8udYvp3vj59JewSzKuX4SprcezFqGf4l-cys,187
|
435
435
|
odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/noupdate_changes.xml,sha256=72cxE-wbWTv5C1jIMM2zBz7RgOUm0D5fKV5rdRN4ICQ,329
|
436
|
+
odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/post-migration.py,sha256=yhRCcZPySDGJNcbd4INFr7LB4Q0TRw1at0iSPq8itus,1590
|
437
|
+
odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/pre-migration.py,sha256=R6IBWjhGgVFmtaQ5u9-FEUglttOyEV4GYkjzt6m-VPg,930
|
436
438
|
odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/upgrade_analysis.txt,sha256=SmD5PvuOBNzCU_SMlxq9U-o450u1DoepuqwkgJkqDDU,4018
|
439
|
+
odoo/addons/openupgrade_scripts/scripts/point_of_sale/16.0.1.0.1/upgrade_analysis_work.txt,sha256=RUYXILEpVd4yoZxz03RVeexZw367GPdBH6Kk5e2vHHY,5841
|
437
440
|
odoo/addons/openupgrade_scripts/scripts/portal/16.0.1.0/noupdate_changes.xml,sha256=JpZuTE89Qr2rlOoHatvRl82PI_NM5rh0pyiZS6XYBPs,6088
|
438
441
|
odoo/addons/openupgrade_scripts/scripts/portal/16.0.1.0/post-migration.py,sha256=Nop_803SX5Yr7TSXO2D8yfXh_T-UZAS7drm6Z46_s6s,421
|
439
442
|
odoo/addons/openupgrade_scripts/scripts/portal/16.0.1.0/upgrade_analysis.txt,sha256=5qlTWGbJD9foI5ETLA_54yD6LGJ0LHsPGHc-z9SR-d0,250
|
@@ -450,6 +453,7 @@ odoo/addons/openupgrade_scripts/scripts/pos_loyalty/16.0.2.0/noupdate_changes.xm
|
|
450
453
|
odoo/addons/openupgrade_scripts/scripts/pos_loyalty/16.0.2.0/upgrade_analysis.txt,sha256=fr_cnKZf4anm-EolVwExnVpeSIonGOODWTFRqJ5VUH8,7106
|
451
454
|
odoo/addons/openupgrade_scripts/scripts/pos_mercury/16.0.1.0/upgrade_analysis.txt,sha256=n7rUF3eTaa_iaDHwn2trDY6j4kcaut3oUkrXisaZ_wc,660
|
452
455
|
odoo/addons/openupgrade_scripts/scripts/pos_restaurant/16.0.1.0/upgrade_analysis.txt,sha256=C2Rc-GG_CepUK6Ea4L_aykEj2mkMR6ypLWHuOf97k9Y,531
|
456
|
+
odoo/addons/openupgrade_scripts/scripts/pos_restaurant/16.0.1.0/upgrade_analysis_work.txt,sha256=Jm-cFvWhXhRo919_HLBxpamzNrrlusaOakUWQe93gzw,703
|
453
457
|
odoo/addons/openupgrade_scripts/scripts/pos_restaurant_adyen/16.0.1.0/upgrade_analysis.txt,sha256=Tm2XlP6Xsn-oIwmeP2NtJVhLNxYn4BPoB3nw8b7CMJ4,183
|
454
458
|
odoo/addons/openupgrade_scripts/scripts/pos_sale/16.0.1.1/upgrade_analysis.txt,sha256=UTwU1T_ENFfmct7qrzi1vSTnEuvPKJbm6Kt_E15hwKk,324
|
455
459
|
odoo/addons/openupgrade_scripts/scripts/pos_sale_product_configurator/16.0.1.0/upgrade_analysis.txt,sha256=kb5jA8DFkqNhlDgoNp-Edv_VoM6cMHytD0mY06SJidw,335
|
@@ -686,7 +690,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
|
|
686
690
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
687
691
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
688
692
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
|
689
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
690
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
691
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
692
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
693
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info/METADATA,sha256=-jHM9std4lsc9jLTflQ299Nu38jWMYtZ2ORl5BxfxPM,3810
|
694
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
695
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
696
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.242.dist-info/RECORD,,
|
File without changes
|