diff --git a/account_payment_mode/migrations/16.0.2.0.0/post-migrate.py b/account_payment_mode/migrations/16.0.2.0.0/post-migrate.py new file mode 100644 index 00000000000..a3acf0edb64 --- /dev/null +++ b/account_payment_mode/migrations/16.0.2.0.0/post-migrate.py @@ -0,0 +1,16 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging + +from openupgradelib import openupgrade + +_logger = logging.getLogger(__name__) + + +@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 + ) diff --git a/account_payment_mode/models/account_payment_mode.py b/account_payment_mode/models/account_payment_mode.py index 5fed3d83438..62ac540e145 100644 --- a/account_payment_mode/models/account_payment_mode.py +++ b/account_payment_mode/models/account_payment_mode.py @@ -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")