[MIG] document_page: Migration to 15.0

This commit is contained in:
Jacob Oldfield
2021-10-29 20:55:45 +11:00
committed by FernandoRomera
parent 35fc1451c5
commit 536cabcb55
14 changed files with 43 additions and 55 deletions

View File

@@ -18,7 +18,6 @@ class DocumentPage(models.Model):
name = fields.Char("Title", required=True)
type = fields.Selection(
[("content", "Content"), ("category", "Category")],
"Type",
help="Page type",
default="content",
)
@@ -27,11 +26,11 @@ class DocumentPage(models.Model):
"document.page", "Category", domain=[("type", "=", "category")]
)
child_ids = fields.One2many("document.page", "parent_id", "Children")
content = fields.Text(
"Content",
content = fields.Html(
compute="_compute_content",
inverse="_inverse_content",
search="_search_content",
sanitize=False,
)
draft_name = fields.Char(
@@ -49,7 +48,6 @@ class DocumentPage(models.Model):
)
template = fields.Html(
"Template",
help="Template that will be used as a content template "
"for all new page of this category.",
)