File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,15 +150,12 @@ def _onchange_operation(self):
150150 # Unlock operation when changed (user came back to edit)
151151 self .is_operation_locked = False
152152
153+ # Clear fields common to all operations
154+ self .id_type_id = False
155+ self .id_value = False
156+ self .expiry_date = False
153157 if self .operation == "add" :
154158 self .existing_id_record_id = False
155- self .id_type_id = False
156- self .id_value = False
157- self .expiry_date = False
158- elif self .operation in ("update" , "remove" ):
159- self .id_type_id = False
160- self .id_value = False
161- self .expiry_date = False
162159
163160 if warning :
164161 return {"warning" : warning }
Original file line number Diff line number Diff line change 11import logging
22
3+ from markupsafe import escape as html_escape
4+
35from odoo import _ , api , fields , models
46from odoo .exceptions import UserError , ValidationError
57
@@ -1241,9 +1243,9 @@ def _format_review_value(self, value):
12411243 return '<span class="badge text-bg-success">Yes</span>'
12421244 if isinstance (value , list ):
12431245 if value :
1244- return "<br/>" .join (str (v ) for v in value )
1246+ return "<br/>" .join (html_escape ( str (v ) ) for v in value )
12451247 return '<span class="text-muted">—</span>'
1246- return str (value )
1248+ return html_escape ( str (value ) )
12471249
12481250 def _capture_preview_snapshot (self ):
12491251 """Capture and store the preview HTML and JSON before applying changes."""
You can’t perform that action at this time.
0 commit comments