mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 11:52:18 -06:00
[MIG] document_page: Migration to 17.0
This commit is contained in:
committed by
Justine Doutreloux
parent
9eb5ce0e8b
commit
036053ace6
@@ -66,5 +66,11 @@ 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:
|
||||
rec.display_name = rec.id, "%s #%i" % (rec.page_id.name, rec.id)
|
||||
|
||||
Reference in New Issue
Block a user