Skip to content

Commit

Permalink
Merge PR OCA#64 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed May 18, 2020
2 parents c1cb304 + 6b79806 commit f0d7cfe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion account_credit_control/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2018 Access Bookings Ltd (https://accessbookings.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Account Credit Control',
'version': '12.0.1.6.0',
'version': '12.0.1.7.0',
'author': "Camptocamp,"
"Odoo Community Association (OCA),"
"Okia,"
Expand Down
30 changes: 30 additions & 0 deletions account_credit_control/migrations/12.0.1.7.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
"""
Convert custom_text fields to Html on policy_level
"""
cr = env.cr
openupgrade.copy_columns(
cr,
{
"credit_control_policy_level": [
("custom_text", None, None),
("custom_text_after_details", None, None),
]
},
)
openupgrade.convert_field_to_html(
cr, "credit_control_policy_level", "custom_text", "custom_text"
)
openupgrade.convert_field_to_html(
cr,
"credit_control_policy_level",
"custom_text_after_details",
"custom_text_after_details",
)
4 changes: 2 additions & 2 deletions account_credit_control/models/credit_control_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class CreditControlPolicyLevel(models.Model):
selection=CHANNEL_LIST,
required=True,
)
custom_text = fields.Text(
custom_text = fields.Html(
string='Custom Message',
required=True,
translate=True,
Expand All @@ -289,7 +289,7 @@ class CreditControlPolicyLevel(models.Model):
required=True,
translate=True,
)
custom_text_after_details = fields.Text(
custom_text_after_details = fields.Html(
string='Custom Message after details',
translate=True,
)
Expand Down

0 comments on commit f0d7cfe

Please sign in to comment.