Skip to content

Commit

Permalink
T1740 - "Correct active text": Body_html cannot be edited. (#1958)
Browse files Browse the repository at this point in the history
* fix: revert 5c045b0

* chore: removed unused field

* fix: remove field

---------

Co-authored-by: Clément <clement.charmillot@gmail.com>
  • Loading branch information
clementcharmillot and Clément authored Sep 3, 2024
1 parent db9c0f2 commit 6b74fcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class CommunicationRevision(models.Model):
body_html = fields.Html(
compute="_compute_body_html", inverse="_inverse_body_html", sanitize=False
)
raw_template_edit_mode = fields.Boolean()
simplified_text = fields.Html(sanitize=False)
user_id = fields.Many2one(
"res.users",
Expand Down Expand Up @@ -573,7 +572,6 @@ def onchange_compare_lang(self):

def reload_text(self):
self.keyword_ids.unlink()
self.raw_template_edit_mode = False
if self.body_html:
self.with_context(no_update=True).simplified_text = self._simplify_text()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,12 @@
<group>
<group>
<field
name="raw_template_edit_mode"
invisible="1"
/>
<field
name="proposition_text"
groups="base.group_erp_manager"
/>
</group>
<group>
<field
name="body_html"
widget="ace"
attrs="{'readonly': [('raw_template_edit_mode','!=',True)]}"
/>
<field name="body_html" widget="ace" />
</group>
</group>
</sheet>
Expand Down

0 comments on commit 6b74fcf

Please sign in to comment.