mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-29 11:56:30 -06:00
[MIG] : Migration to 15.0
This commit is contained in:
parent
cb6c70a894
commit
4adf079853
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Document Page",
|
"name": "Document Page",
|
||||||
"version": "14.0.1.0.0",
|
"version": "15.0.1.0.0",
|
||||||
"category": "Knowledge Management",
|
"category": "Knowledge Management",
|
||||||
"author": "OpenERP SA, Odoo Community Association (OCA)",
|
"author": "OpenERP SA, Odoo Community Association (OCA)",
|
||||||
"images": [
|
"images": [
|
||||||
@ -26,8 +26,12 @@
|
|||||||
"views/document_page.xml",
|
"views/document_page.xml",
|
||||||
"views/document_page_category.xml",
|
"views/document_page_category.xml",
|
||||||
"views/document_page_history.xml",
|
"views/document_page_history.xml",
|
||||||
"views/document_page_assets.xml",
|
|
||||||
"views/report_document_page.xml",
|
"views/report_document_page.xml",
|
||||||
],
|
],
|
||||||
"demo": ["demo/document_page.xml"],
|
"demo": ["demo/document_page.xml"],
|
||||||
|
"assets": {
|
||||||
|
"web.assets_backend": [
|
||||||
|
"document_page/static/src/scss/document_page.scss",
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ class DocumentPage(models.Model):
|
|||||||
name = fields.Char("Title", required=True)
|
name = fields.Char("Title", required=True)
|
||||||
type = fields.Selection(
|
type = fields.Selection(
|
||||||
[("content", "Content"), ("category", "Category")],
|
[("content", "Content"), ("category", "Category")],
|
||||||
"Type",
|
|
||||||
help="Page type",
|
help="Page type",
|
||||||
default="content",
|
default="content",
|
||||||
)
|
)
|
||||||
@ -28,7 +27,6 @@ class DocumentPage(models.Model):
|
|||||||
)
|
)
|
||||||
child_ids = fields.One2many("document.page", "parent_id", "Children")
|
child_ids = fields.One2many("document.page", "parent_id", "Children")
|
||||||
content = fields.Text(
|
content = fields.Text(
|
||||||
"Content",
|
|
||||||
compute="_compute_content",
|
compute="_compute_content",
|
||||||
inverse="_inverse_content",
|
inverse="_inverse_content",
|
||||||
search="_search_content",
|
search="_search_content",
|
||||||
@ -49,7 +47,6 @@ class DocumentPage(models.Model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
template = fields.Html(
|
template = fields.Html(
|
||||||
"Template",
|
|
||||||
help="Template that will be used as a content template "
|
help="Template that will be used as a content template "
|
||||||
"for all new page of this category.",
|
"for all new page of this category.",
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<field name="field_parent">child_ids</field>
|
<field name="field_parent">child_ids</field>
|
||||||
<field name="priority">100</field>
|
<field name="priority">100</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Document Page">
|
<tree>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="content_uid" />
|
<field name="content_uid" />
|
||||||
<field name="content_date" />
|
<field name="content_date" />
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<field name="name">document.page.list</field>
|
<field name="name">document.page.list</field>
|
||||||
<field name="model">document.page</field>
|
<field name="model">document.page</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Document Page">
|
<tree>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="parent_id" />
|
<field name="parent_id" />
|
||||||
<field name="company_id" groups="base.group_multi_company" />
|
<field name="company_id" groups="base.group_multi_company" />
|
||||||
|
@ -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>
|
|
@ -58,7 +58,7 @@
|
|||||||
<field name="name">document.page.category.tree</field>
|
<field name="name">document.page.category.tree</field>
|
||||||
<field name="model">document.page</field>
|
<field name="model">document.page</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Categories">
|
<tree>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="parent_id" />
|
<field name="parent_id" />
|
||||||
<field name="create_uid" invisible="1" />
|
<field name="create_uid" invisible="1" />
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<field name="name">document.page.history.tree</field>
|
<field name="name">document.page.history.tree</field>
|
||||||
<field name="model">document.page.history</field>
|
<field name="model">document.page.history</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Document History">
|
<tree>
|
||||||
<field name="id" />
|
<field name="id" />
|
||||||
<field name="page_id" />
|
<field name="page_id" />
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
|
@ -10,7 +10,7 @@ class DocumentPageCreateMenu(models.TransientModel):
|
|||||||
_name = "document.page.create.menu"
|
_name = "document.page.create.menu"
|
||||||
_description = "Wizard 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)
|
menu_parent_id = fields.Many2one("ir.ui.menu", "Parent Menu", required=True)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
@ -33,7 +33,7 @@ class DocumentPageCreateMenu(models.TransientModel):
|
|||||||
page = obj_page.browse(page_id)
|
page = obj_page.browse(page_id)
|
||||||
|
|
||||||
data = self[0]
|
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"
|
"document_page", "view_wiki_menu_form"
|
||||||
)[1]
|
)[1]
|
||||||
value = {
|
value = {
|
||||||
|
Loading…
Reference in New Issue
Block a user