mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] base_comment_template: Migration to 18.0
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
import markupsafe
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import Command, api, fields, models
|
||||
from odoo.osv import expression
|
||||
from odoo.tools.safe_eval import safe_eval
|
||||
|
||||
@@ -49,7 +49,7 @@ class CommentTemplate(models.AbstractModel):
|
||||
for template in templates:
|
||||
domain = safe_eval(template.domain)
|
||||
if not domain or record.filtered_domain(domain):
|
||||
record.comment_template_ids = [(4, template.id)]
|
||||
record.comment_template_ids = [Command.link(template.id)]
|
||||
|
||||
def render_comment(self, comment, engine=False, add_context=None, options=None):
|
||||
self.ensure_one()
|
||||
|
||||
Reference in New Issue
Block a user