[MIG] base_comment_template: Migration to 17.0

This commit is contained in:
Jesús Alan Ramos Rodríguez
2024-05-03 10:01:36 -06:00
committed by Maksym Yankin
parent efb2bbf843
commit cf39e00f9c
8 changed files with 22 additions and 25 deletions

View File

@@ -33,7 +33,7 @@ class BaseCommentTemplatePreview(models.TransientModel):
)
res = self.env[model.model].search(domain, limit=1)
if res:
result["resource_ref"] = "%s,%s" % (model.model, res.id)
result["resource_ref"] = f"{model.model},{res.id}"
return result
base_comment_template_id = fields.Many2one(

View File

@@ -28,12 +28,9 @@
name="resource_ref"
class="oe_inline"
options="{'hide_model': True, 'no_create': True, 'no_edit': True, 'no_open': True}"
attrs="{'invisible': [('no_record', '=', True)]}"
invisible="no_record"
/>
<span
class="text-warning"
attrs="{'invisible': [('no_record', '=', False)]}"
>No records
<span class="text-warning" invisible="not no_record">No records
</span>
</div>
</div>