Skip to content
Draft
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
2 changes: 1 addition & 1 deletion account_credit_control/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Credit Control",
"version": "16.0.2.0.2",
"version": "16.0.2.1.0",
"author": "Camptocamp,"
"Odoo Community Association (OCA),"
"Okia,"
Expand Down
16 changes: 16 additions & 0 deletions account_credit_control/migrations/16.0.2.1.0/post-migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2026 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
credit_control_lines = env["credit.control.policy.level"].search(
[("custom_mail_text", "!=", False)]
)
for ccl in credit_control_lines:
ccl.custom_mail_text = (
ccl.custom_mail_text.replace(" ", "")
.replace("<p>", "")
.replace("</p>", "\n")
)
2 changes: 1 addition & 1 deletion account_credit_control/models/credit_control_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class CreditControlPolicyLevel(models.Model):
channel = fields.Selection(selection=CHANNEL_LIST, required=True)
custom_text = fields.Text(string="Custom Message", required=True, translate=True)
mail_show_invoice_detail = fields.Boolean(string="Show Invoice Details in mail")
custom_mail_text = fields.Html(
custom_mail_text = fields.Text(
string="Custom Mail Message", required=True, translate=True
)
custom_text_after_details = fields.Text(
Expand Down
Loading