Migration script field online_raw_data -> raw_data

This commit is contained in:
Alexis de Lattre
2022-09-27 23:16:31 +02:00
parent 8987b4c993
commit 9851c6cc31
4 changed files with 36 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
{
"name": "Import Statement Files",
"category": "Accounting",
"version": "14.0.2.1.0",
"version": "14.0.3.0.0",
"license": "LGPL-3",
"depends": ["account_statement_import_base"],
"author": "Odoo SA, Akretion, Odoo Community Association (OCA)",

View File

@@ -1,7 +1,7 @@
This module is a glue module between 2 modules:
* **account_statement_import** from `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import>`_
* **account_reconciliation_widget** from `OCA/account-reconcile <https://github.com/OCA/account-reconcile>`_
* **account_statement_import** from the Github project *OCA/bank-statement-import*
* **account_reconciliation_widget** from the Github project `OCA/account-reconcile <https://github.com/OCA/account-reconcile>`_
This module adds a button **Import and Start to Reconcile** on the bank statement file import wizard. When you click on this button, Odoo will import the bank statement file and jump directly to the special reconciliation interface.

View File

@@ -0,0 +1,15 @@
# Copyright 2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(
env.cr,
"UPDATE account_bank_statement_line SET raw_data={online_raw_data}".format(
online_raw_data=openupgrade.get_legacy_name("online_raw_data")
),
)

View File

@@ -0,0 +1,18 @@
# Copyright 2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
_column_renames = {
"account_bank_statement_line": [
("online_raw_data", None),
]
}
@openupgrade.migrate()
def migrate(env, version):
if not version:
return
openupgrade.rename_columns(env.cr, _column_renames)