Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] account_payment_mode: change type of payment_mode.note field #1360

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions account_payment_mode/migrations/16.0.2.0.0/post-migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
"""Migrate note field from Text to Html"""
openupgrade.convert_field_to_html(
env.cr, "account_payment_mode", "note", "note", False, True
)
2 changes: 1 addition & 1 deletion account_payment_mode/models/account_payment_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AccountPaymentMode(models.Model):
related="payment_method_id.code", readonly=True, store=True
)
active = fields.Boolean(default=True)
note = fields.Text(translate=True)
note = fields.Html(translate=True)
sequence = fields.Integer(default=10)

@api.onchange("company_id")
Expand Down
Loading