[MIG] : Migration to 15.0

This commit is contained in:
Bernat Puig Font 2021-12-24 09:53:58 +01:00
parent cb6c70a894
commit 4adf079853
7 changed files with 12 additions and 27 deletions

View File

@ -4,7 +4,7 @@
{
"name": "Document Page",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"category": "Knowledge Management",
"author": "OpenERP SA, Odoo Community Association (OCA)",
"images": [
@ -26,8 +26,12 @@
"views/document_page.xml",
"views/document_page_category.xml",
"views/document_page_history.xml",
"views/document_page_assets.xml",
"views/report_document_page.xml",
],
"demo": ["demo/document_page.xml"],
"assets": {
"web.assets_backend": [
"document_page/static/src/scss/document_page.scss",
],
},
}

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",
)
@ -28,7 +27,6 @@ class DocumentPage(models.Model):
)
child_ids = fields.One2many("document.page", "parent_id", "Children")
content = fields.Text(
"Content",
compute="_compute_content",
inverse="_inverse_content",
search="_search_content",
@ -49,7 +47,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.",
)

View File

@ -7,7 +7,7 @@
<field name="field_parent">child_ids</field>
<field name="priority">100</field>
<field name="arch" type="xml">
<tree string="Document Page">
<tree>
<field name="name" />
<field name="content_uid" />
<field name="content_date" />
@ -19,7 +19,7 @@
<field name="name">document.page.list</field>
<field name="model">document.page</field>
<field name="arch" type="xml">
<tree string="Document Page">
<tree>
<field name="name" />
<field name="parent_id" />
<field name="company_id" groups="base.group_multi_company" />

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="assets_backend"
name="document_page assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
type="text/scss"
href="/document_page/static/src/scss/document_page.scss"
/>
</xpath>
</template>
</odoo>

View File

@ -58,7 +58,7 @@
<field name="name">document.page.category.tree</field>
<field name="model">document.page</field>
<field name="arch" type="xml">
<tree string="Categories">
<tree>
<field name="name" />
<field name="parent_id" />
<field name="create_uid" invisible="1" />

View File

@ -6,7 +6,7 @@
<field name="name">document.page.history.tree</field>
<field name="model">document.page.history</field>
<field name="arch" type="xml">
<tree string="Document History">
<tree>
<field name="id" />
<field name="page_id" />
<field name="name" />

View File

@ -10,7 +10,7 @@ class DocumentPageCreateMenu(models.TransientModel):
_name = "document.page.create.menu"
_description = "Wizard Create Menu"
menu_name = fields.Char("Menu Name", required=True)
menu_name = fields.Char(required=True)
menu_parent_id = fields.Many2one("ir.ui.menu", "Parent Menu", required=True)
@api.model
@ -33,7 +33,7 @@ class DocumentPageCreateMenu(models.TransientModel):
page = obj_page.browse(page_id)
data = self[0]
view_id = obj_model_data.sudo().get_object_reference(
view_id = obj_model_data.sudo().check_object_reference(
"document_page", "view_wiki_menu_form"
)[1]
value = {