mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 11:52:18 -06:00
[MIG] document_page: Migration to 18.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
import difflib
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class DocumentPageHistory(models.Model):
|
||||
@@ -55,7 +55,7 @@ class DocumentPageHistory(models.Model):
|
||||
line1 = text1.splitlines(True)
|
||||
line2 = text2.splitlines(True)
|
||||
if line1 == line2:
|
||||
return _("There are no changes in revisions.")
|
||||
return self.env._("There are no changes in revisions.")
|
||||
else:
|
||||
diff = difflib.HtmlDiff()
|
||||
return diff.make_table(
|
||||
@@ -66,10 +66,6 @@ class DocumentPageHistory(models.Model):
|
||||
context=True,
|
||||
)
|
||||
|
||||
# TODO: Replace for _compute_display_name
|
||||
def name_get(self):
|
||||
return [(rec.id, "%s #%i" % (rec.page_id.name, rec.id)) for rec in self]
|
||||
|
||||
@api.depends("page_id")
|
||||
def _compute_display_name(self):
|
||||
for rec in self:
|
||||
|
||||
Reference in New Issue
Block a user