Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ account_asset / account.asset.asset / website_message_ids (one2many): DEL r

account_asset / account.asset.category / account_income_recognition_id (many2one): now required
account_asset / account.asset.category / account_income_recognition_id (many2one): was renamed to account_depreciation_expense_id [nothing to do]
account_asset / account.asset.category / group_entries (boolean) : NEW
account_asset / account.asset.category / group_entries (boolean) : NEW

account_asset / account.move / asset_depreciation_ids (one2many): NEW relation: account.asset.depreciation.line
account_asset / account.move / asset_id (many2one) : DEL relation: account.asset.asset
# NOTHING TO DO

account_asset / account.move / asset_id (many2one) : DEL relation: account.asset.asset
# Renamed to preserve data

---XML records in module 'account_asset'---
DEL ir.ui.view: account_asset.view_account_move_filter_asset_inherit
DEL ir.ui.view: account_asset.view_account_move_form_asset_inherit
Expand Down
17 changes: 17 additions & 0 deletions addons/account_asset/migrations/10.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


column_renames = {
'account_move': [
('asset_id', None),
],
}


@openupgrade.migrate(use_env=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to put use_env=True, as it's the default in v10, but it's not so important.

def migrate(env, version):
openupgrade.rename_columns(env.cr, column_renames)
2 changes: 1 addition & 1 deletion odoo/openupgrade/doc/source/modules90-100.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ missing in the new release are marked with |del|.
+-----------------------------------+-----------------------------------+
|account_analytic_default | |
+-----------------------------------+-----------------------------------+
|account_asset | |
|account_asset | Done |
+-----------------------------------+-----------------------------------+
|account_bank_statement_import | |
+-----------------------------------+-----------------------------------+
Expand Down