mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 11:52:18 -06:00
[MIG] document_page: Migration to 11.0
continue migration
This commit is contained in:
committed by
FernandoRomera
parent
125f97d388
commit
607e4a8b25
@@ -54,13 +54,6 @@ class DocumentPage(models.Model):
|
||||
"for all new page of this category.",
|
||||
)
|
||||
|
||||
# deprecated - should be removed on 11.0
|
||||
# left here because some modules might still need it
|
||||
display_content = fields.Text(
|
||||
string='Displayed Content',
|
||||
compute='_compute_display_content'
|
||||
)
|
||||
|
||||
history_head = fields.Many2one(
|
||||
'document.page.history',
|
||||
'HEAD',
|
||||
@@ -116,14 +109,7 @@ class DocumentPage(models.Model):
|
||||
return r
|
||||
|
||||
@api.multi
|
||||
@api.depends('content')
|
||||
def _compute_display_content(self):
|
||||
# @deprecated, simply use content
|
||||
for rec in self:
|
||||
rec.display_content = rec.content
|
||||
|
||||
@api.multi
|
||||
@api.depends('history_head', 'history_ids')
|
||||
@api.depends('history_head')
|
||||
def _compute_content(self):
|
||||
for rec in self:
|
||||
if rec.type == 'category':
|
||||
|
||||
Reference in New Issue
Block a user