odoo-addon-openupgrade-scripts 16.0.1.0.3.264__py3-none-any.whl → 16.0.1.0.3.268__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/account/16.0.1.2/pre-migration.py +118 -1
- odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/upgrade_analysis_work.txt +5 -3
- odoo/addons/openupgrade_scripts/scripts/google_gmail/16.0.1.2/pre-migration.py +32 -0
- odoo/addons/openupgrade_scripts/scripts/google_gmail/16.0.1.2/upgrade_analysis_work.txt +19 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info}/RECORD +8 -6
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info}/top_level.txt +0 -0
@@ -158,7 +158,15 @@ def _account_bank_statement_line_fast_fill_internal_index(env):
|
|
158
158
|
"char",
|
159
159
|
False,
|
160
160
|
"account",
|
161
|
-
)
|
161
|
+
),
|
162
|
+
(
|
163
|
+
"first_line_index",
|
164
|
+
"account.bank.statement",
|
165
|
+
"account_bank_statement",
|
166
|
+
"char",
|
167
|
+
False,
|
168
|
+
"account",
|
169
|
+
),
|
162
170
|
],
|
163
171
|
)
|
164
172
|
openupgrade.logged_query(
|
@@ -174,6 +182,29 @@ def _account_bank_statement_line_fast_fill_internal_index(env):
|
|
174
182
|
WHERE stmt.move_id = am.id;
|
175
183
|
""",
|
176
184
|
)
|
185
|
+
# Now let's prefill account_bank_statement first_line_index
|
186
|
+
openupgrade.logged_query(
|
187
|
+
env.cr,
|
188
|
+
"""
|
189
|
+
WITH first_lines AS (
|
190
|
+
SELECT
|
191
|
+
statement_id,
|
192
|
+
MIN(internal_index) AS first_line_index
|
193
|
+
FROM
|
194
|
+
account_bank_statement_line
|
195
|
+
GROUP BY
|
196
|
+
statement_id
|
197
|
+
)
|
198
|
+
UPDATE
|
199
|
+
account_bank_statement AS abs
|
200
|
+
SET
|
201
|
+
first_line_index = fl.first_line_index
|
202
|
+
FROM
|
203
|
+
first_lines AS fl
|
204
|
+
WHERE
|
205
|
+
abs.id = fl.statement_id;
|
206
|
+
""",
|
207
|
+
)
|
177
208
|
|
178
209
|
|
179
210
|
def _account_move_fast_fill_display_type(env):
|
@@ -408,6 +439,89 @@ def _fill_repartition_line_use_in_tax_closing(env):
|
|
408
439
|
)
|
409
440
|
|
410
441
|
|
442
|
+
def _fill_account_bank_statement_is_complete(env):
|
443
|
+
"""Speedup this column computation"""
|
444
|
+
# TODO: Consider instances with currencies which rounding is different to 2 digits
|
445
|
+
env.cr.execute(
|
446
|
+
"SELECT * FROM res_currency WHERE rounding != 0.01 AND active = true"
|
447
|
+
)
|
448
|
+
if env.cr.fetchone():
|
449
|
+
return
|
450
|
+
if not openupgrade.column_exists(env.cr, "account_bank_statement", "is_complete"):
|
451
|
+
openupgrade.add_fields(
|
452
|
+
env,
|
453
|
+
[
|
454
|
+
(
|
455
|
+
"is_complete",
|
456
|
+
"account.bank.statement",
|
457
|
+
"account_bank_statement",
|
458
|
+
"boolean",
|
459
|
+
False,
|
460
|
+
"account",
|
461
|
+
)
|
462
|
+
],
|
463
|
+
)
|
464
|
+
openupgrade.logged_query(
|
465
|
+
env.cr,
|
466
|
+
"""
|
467
|
+
WITH filtered_lines AS (
|
468
|
+
SELECT DISTINCT statement_id
|
469
|
+
FROM account_bank_statement_line absl
|
470
|
+
INNER JOIN account_move am ON am.id = absl.move_id
|
471
|
+
WHERE am.state = 'posted'
|
472
|
+
GROUP BY statement_id
|
473
|
+
)
|
474
|
+
UPDATE account_bank_statement acbs
|
475
|
+
SET is_complete = true
|
476
|
+
WHERE
|
477
|
+
acbs.id in (SELECT statement_id from filtered_lines)
|
478
|
+
AND
|
479
|
+
(
|
480
|
+
ROUND(acbs.balance_end, 2) =
|
481
|
+
ROUND(COALESCE(acbs.balance_end_real, 0), 2)
|
482
|
+
)
|
483
|
+
""",
|
484
|
+
)
|
485
|
+
|
486
|
+
|
487
|
+
def _precreate_account_move_auto_post_until(env):
|
488
|
+
"""This new account.move field is ment to be filled manually. Its compute acts
|
489
|
+
merely as an onchange. We don't need to pre-fill it"""
|
490
|
+
if not openupgrade.column_exists(env.cr, "account_move", "auto_post_until"):
|
491
|
+
openupgrade.add_fields(
|
492
|
+
env,
|
493
|
+
[
|
494
|
+
(
|
495
|
+
"auto_post_until",
|
496
|
+
"account.move",
|
497
|
+
"account_move",
|
498
|
+
"date",
|
499
|
+
False,
|
500
|
+
"account",
|
501
|
+
)
|
502
|
+
],
|
503
|
+
)
|
504
|
+
|
505
|
+
|
506
|
+
def _precreate_account_move_is_storno(env):
|
507
|
+
"""There can't be storno moves as this is a new feature that needs to be set on the
|
508
|
+
company settings"""
|
509
|
+
if not openupgrade.column_exists(env.cr, "account_move", "is_storno"):
|
510
|
+
openupgrade.add_fields(
|
511
|
+
env,
|
512
|
+
[
|
513
|
+
(
|
514
|
+
"is_storno",
|
515
|
+
"account.move",
|
516
|
+
"account_move",
|
517
|
+
"boolean",
|
518
|
+
False,
|
519
|
+
"account",
|
520
|
+
)
|
521
|
+
],
|
522
|
+
)
|
523
|
+
|
524
|
+
|
411
525
|
@openupgrade.migrate()
|
412
526
|
def migrate(env, version):
|
413
527
|
openupgrade.rename_xmlids(env.cr, _xmlids_renames)
|
@@ -438,3 +552,6 @@ def migrate(env, version):
|
|
438
552
|
_fast_fill_account_payment_amount_company_currency_signed(env)
|
439
553
|
_account_journal_payment_sequence(env)
|
440
554
|
_fill_repartition_line_use_in_tax_closing(env)
|
555
|
+
_precreate_account_move_auto_post_until(env)
|
556
|
+
_precreate_account_move_is_storno(env)
|
557
|
+
_fill_account_bank_statement_is_complete(env)
|
@@ -107,8 +107,9 @@ account / account.bank.statement / difference (float) : DEL
|
|
107
107
|
# NOTHING TO DO
|
108
108
|
|
109
109
|
account / account.bank.statement / first_line_index (char) : NEW isfunction: function, stored
|
110
|
+
# DONE pre-migration: Pre-compute for performance
|
110
111
|
account / account.bank.statement / is_complete (boolean) : NEW isfunction: function, stored
|
111
|
-
#
|
112
|
+
# DONE pre-migration: Pre-compute for performance
|
112
113
|
|
113
114
|
account / account.bank.statement / is_valid_balance_start (boolean): DEL
|
114
115
|
account / account.bank.statement / journal_id (many2one) : now a function
|
@@ -179,8 +180,9 @@ account / account.move / auto_post (boolean) : type i
|
|
179
180
|
# DONE pre-migration: Change column data type, recalculate the value if False set to 'no' else set 'at_date'
|
180
181
|
|
181
182
|
account / account.move / auto_post_origin_id (many2one): NEW relation: account.move
|
182
|
-
account / account.move / auto_post_until (date) : NEW hasdefault: compute
|
183
183
|
# NOTHING TO DO
|
184
|
+
account / account.move / auto_post_until (date) : NEW hasdefault: compute
|
185
|
+
# DONE pre-migration: Pre-create column to avoid computing this new feature wich is meant to be set manually
|
184
186
|
|
185
187
|
account / account.move / currency_id (many2one) : now a function
|
186
188
|
# NOTHING TO DO
|
@@ -190,7 +192,7 @@ account / account.move / invoice_payments_widget (text): type i
|
|
190
192
|
# NOTHING TO DO: compute no store field
|
191
193
|
|
192
194
|
account / account.move / is_storno (boolean) : NEW hasdefault: compute
|
193
|
-
#
|
195
|
+
# DONE pre-migration: Pre-create column to avoid computing this new feature which has to be set at company level
|
194
196
|
|
195
197
|
account / account.move / partner_shipping_id (many2one): previously in module sale
|
196
198
|
# NOTHING TO DO
|
@@ -0,0 +1,32 @@
|
|
1
|
+
from openupgradelib import openupgrade
|
2
|
+
|
3
|
+
|
4
|
+
def fetchmail_server_set_gmail_server_type(env):
|
5
|
+
if openupgrade.column_exists(
|
6
|
+
env.cr, "fetchmail_server", "use_google_gmail_service"
|
7
|
+
):
|
8
|
+
openupgrade.logged_query(
|
9
|
+
env.cr,
|
10
|
+
"""
|
11
|
+
UPDATE fetchmail_server
|
12
|
+
SET server_type='gmail'
|
13
|
+
WHERE use_google_gmail_service = true;
|
14
|
+
""",
|
15
|
+
)
|
16
|
+
|
17
|
+
|
18
|
+
def ir_mail_server_set_gmail_smtp_authentication(env):
|
19
|
+
openupgrade.logged_query(
|
20
|
+
env.cr,
|
21
|
+
"""
|
22
|
+
UPDATE ir_mail_server
|
23
|
+
SET smtp_authentication='gmail'
|
24
|
+
WHERE use_google_gmail_service = true;
|
25
|
+
""",
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
@openupgrade.migrate()
|
30
|
+
def migrate(env, version):
|
31
|
+
fetchmail_server_set_gmail_server_type(env)
|
32
|
+
ir_mail_server_set_gmail_smtp_authentication(env)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---Models in module 'google_gmail'---
|
2
|
+
---Fields in module 'google_gmail'---
|
3
|
+
google_gmail / fetchmail.server / google_gmail_access_token (char): previously in module fetchmail_gmail
|
4
|
+
google_gmail / fetchmail.server / google_gmail_access_token_expiration (integer): previously in module fetchmail_gmail
|
5
|
+
google_gmail / fetchmail.server / google_gmail_authorization_code (char): previously in module fetchmail_gmail
|
6
|
+
google_gmail / fetchmail.server / google_gmail_refresh_token (char): previously in module fetchmail_gmail
|
7
|
+
google_gmail / fetchmail.server / google_gmail_uri (char) : previously in module fetchmail_gmail
|
8
|
+
# NOTHING TO DO: fetchmail_gmail has been merged into this
|
9
|
+
|
10
|
+
google_gmail / fetchmail.server / server_type (False) : NEW selection_keys: ['gmail', 'imap', 'local', 'pop'], mode: modify
|
11
|
+
# DONE pre-migration: fill value server_type is gmail if use_google_gmail_service is enable
|
12
|
+
|
13
|
+
google_gmail / ir.mail_server / smtp_authentication (False) : NEW selection_keys: ['certificate', 'gmail', 'login'], mode: modify
|
14
|
+
google_gmail / ir.mail_server / use_google_gmail_service (boolean): DEL
|
15
|
+
# DONE pre-migration: fill value smtp_authentication is gmail if use_google_gmail_service is enable
|
16
|
+
|
17
|
+
---XML records in module 'google_gmail'---
|
18
|
+
NEW ir.ui.view: google_gmail.fetchmail_server_view_form
|
19
|
+
# 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.268
|
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)
|
@@ -7,9 +7,9 @@ odoo/addons/openupgrade_scripts/readme/DESCRIPTION.rst,sha256=ckrM5YlY8awluPWIV7
|
|
7
7
|
odoo/addons/openupgrade_scripts/readme/INSTALL.rst,sha256=tXbOmw3QIhO1KLIziMpXzuuY0tOhI8IGT2ktCArwfGM,115
|
8
8
|
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/noupdate_changes.xml,sha256=dQ5BuaiRxlN_swXTEwFBLUdIW87wJBaol5qeGcoiYgw,8353
|
9
9
|
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/post-migration.py,sha256=DLZ3i2cCDL3vL7bNw7Zsk1GdgHNGXPXEf5F94rxNYxM,2308
|
10
|
-
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/pre-migration.py,sha256=
|
10
|
+
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/pre-migration.py,sha256=j6lSahH395lLAp3PiC8UVs1opIiyyK96OyrBpMAhlO8,19206
|
11
11
|
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/upgrade_analysis.txt,sha256=LAGIn64-_mvvep8AfaPBS8qqo8O3dzw4wNA-5FgyQ0k,39201
|
12
|
-
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/upgrade_analysis_work.txt,sha256=
|
12
|
+
odoo/addons/openupgrade_scripts/scripts/account/16.0.1.2/upgrade_analysis_work.txt,sha256=2-U7QLKxkUJd8B7r-hoBMqvuC4x5gSjWnU4LvM88QTs,42173
|
13
13
|
odoo/addons/openupgrade_scripts/scripts/account_check_printing/16.0.1.0/upgrade_analysis.txt,sha256=LLJ88stlAeeCNgxAIiORZjQjbY-Sir138GI_FBpjIeE,189
|
14
14
|
odoo/addons/openupgrade_scripts/scripts/account_debit_note/16.0.1.0/upgrade_analysis.txt,sha256=tJQzqc9HkZ1yHePn7nwW7VbCfBH_yfe5UEym2zLJ4AE,177
|
15
15
|
odoo/addons/openupgrade_scripts/scripts/account_debit_note/16.0.1.0/upgrade_analysis_work.txt,sha256=JyMMl5xM8d4WV9DYdsw1ixUYYH8i5DGvpaukZvIPjeM,193
|
@@ -131,7 +131,9 @@ odoo/addons/openupgrade_scripts/scripts/google_account/16.0.1.0/upgrade_analysis
|
|
131
131
|
odoo/addons/openupgrade_scripts/scripts/google_calendar/16.0.1.0/pre-migration.py,sha256=pr7pQBxDlCPX-NiS3yxc0jCNQPhG13QXmGgAbzjKc0A,368
|
132
132
|
odoo/addons/openupgrade_scripts/scripts/google_calendar/16.0.1.0/upgrade_analysis.txt,sha256=vtlGaXwEI5VzGKgNJ3n1iOzlHnVm_tiFtxJdaSUtajc,773
|
133
133
|
odoo/addons/openupgrade_scripts/scripts/google_calendar/16.0.1.0/upgrade_analysis_work.txt,sha256=nOmkTeFL8yX645S3W3AiZNIZjMR-n6nB8zFN2o5CanI,934
|
134
|
+
odoo/addons/openupgrade_scripts/scripts/google_gmail/16.0.1.2/pre-migration.py,sha256=BAiL69BN72fnfUaU-_1LeqnqMIspIdlQ367N4ESmmHk,819
|
134
135
|
odoo/addons/openupgrade_scripts/scripts/google_gmail/16.0.1.2/upgrade_analysis.txt,sha256=T6iNOaVAnUJyuehQ1uwTr8C9cXKmZU_Mw3EQQ2hPu1c,685
|
136
|
+
odoo/addons/openupgrade_scripts/scripts/google_gmail/16.0.1.2/upgrade_analysis_work.txt,sha256=ZFiT39XdvjqP9MWdctq_OLT4yaKvi034a9tSmIarJsA,1395
|
135
137
|
odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/noupdate_changes.xml,sha256=7Kh6ikV0c8llO66FzBlAXZuPURS0oJLO43aQSqKs9ow,950
|
136
138
|
odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py,sha256=uZ5qQzNQBbWlN27aLGrXw4veYihiDgrGvVHNlRGMRBY,7362
|
137
139
|
odoo/addons/openupgrade_scripts/scripts/hr/16.0.1.1/pre-migration.py,sha256=b1fnQVhiZBROobyiQhCmJ2y3CtCmEL7QtuL1Sijk3YQ,1704
|
@@ -701,7 +703,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
|
|
701
703
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
702
704
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
703
705
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
|
704
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
705
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
706
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
707
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
706
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info/METADATA,sha256=9JnqbBtTO5FfSnoeROFtPA1GS_BuUxZ_Xrf_CsSOGI0,3810
|
707
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
708
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
709
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.268.dist-info/RECORD,,
|
File without changes
|