Skip to content

Commit c542ea9

Browse files
committed
[IMP] Report custom text fields in html
1 parent 29d54b6 commit c542ea9

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

account_credit_control/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
{
77
"name": "Account Credit Control",
8-
"version": "18.0.2.0.0",
8+
"version": "18.0.2.1.0",
99
"author": "Camptocamp,"
1010
"Odoo Community Association (OCA),"
1111
"Okia,"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2020 ACSONE SA/NV
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from openupgradelib import openupgrade
5+
6+
7+
def migrate(cr, version):
8+
"""
9+
Convert custom_text fields to Html on policy_level
10+
"""
11+
openupgrade.copy_columns(
12+
cr,
13+
{
14+
"credit_control_policy_level": [
15+
("custom_text", None, None),
16+
("custom_text_after_details", None, None),
17+
]
18+
},
19+
)
20+
openupgrade.convert_field_to_html(
21+
cr, "credit_control_policy_level", "custom_text", "custom_text"
22+
)
23+
openupgrade.convert_field_to_html(
24+
cr,
25+
"credit_control_policy_level",
26+
"custom_text_after_details",
27+
"custom_text_after_details",
28+
)

account_credit_control/models/credit_control_policy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,12 @@ class CreditControlPolicyLevel(models.Model):
321321
required=True,
322322
)
323323
channel = fields.Selection(selection=CHANNEL_LIST, required=True)
324-
custom_text = fields.Text(string="Custom Message", required=True, translate=True)
324+
custom_text = fields.Html(string="Custom Message", required=True, translate=True)
325325
mail_show_invoice_detail = fields.Boolean(string="Show Invoice Details in mail")
326326
custom_mail_text = fields.Html(
327327
string="Custom Mail Message", required=True, translate=True
328328
)
329-
custom_text_after_details = fields.Text(
329+
custom_text_after_details = fields.Html(
330330
string="Custom Message after details", translate=True
331331
)
332332

0 commit comments

Comments
 (0)