Skip to content

Commit

Permalink
Merge pull request #4436 from Tecnativa/16.0-ou_fix-account-credit_li…
Browse files Browse the repository at this point in the history
…mit-property

[16.0][OU-FIX] account: res.partner~credit_limit converted to company dependent
  • Loading branch information
pedrobaeza committed May 27, 2024
2 parents 1cbcd20 + 3bcfc70 commit 9d18688
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2023 Viindoo - Trịnh Ngọc Hưng
# Copyright 2023 Tecnativa - Pedro M. Baeza
# Copyright 2023-2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade

Expand Down Expand Up @@ -51,3 +51,8 @@ def migrate(env, version):
_deleted_xml_records,
)
_compute_remaining_account_payment_amount_company_currency_signed(env)
# credit_limit converted to company dependent
old_column = openupgrade.get_legacy_name("credit_limit")
openupgrade.convert_to_company_dependent(
env, "res.partner", old_column, "credit_limit"
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"account_move": [
("auto_post", None),
],
"res_partner": [("credit_limit", None)],
}
_fields_renames = [
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ account / res.company / message_ids (one2many) : NEW re
account / res.company / message_main_attachment_id (many2one): NEW relation: ir.attachment
account / res.company / quick_edit_mode (selection) : NEW selection_keys: ['in_invoices', 'out_and_in_invoices', 'out_invoices']
account / res.company / website_message_ids (one2many): NEW relation: mail.message
account / res.partner / credit_limit (float) : previously in module base
account / res.partner.bank / activity_ids (one2many) : NEW relation: mail.activity
account / res.partner.bank / message_follower_ids (one2many): NEW relation: mail.followers
account / res.partner.bank / message_ids (one2many) : NEW relation: mail.message
Expand All @@ -405,6 +404,10 @@ account / res.partner.bank / website_message_ids (one2many): NEW re
account / res.users / credit_limit (float) : previously in module base
# NOTHING TO DO

account / res.partner / credit_limit (float) : previously in module base
# DONE: pre-migration: Rename column for avoiding confusions when looking DB schema
# DONE: post-migration: Convert the value to property dependent

---XML records in module 'account'---
DEL account.account.type: account.data_account_off_sheet (noupdate)
DEL account.account.type: account.data_account_type_credit_card (noupdate)
Expand Down

0 comments on commit 9d18688

Please sign in to comment.