mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-14 01:41:26 -06:00
[MIG] document_page: Migration to version 10.0 (#120)
* [MIG] Migration to version 10.0 * [FIX] Comments and CI errors * [FIX] ValueError: External ID not found in the system: base.menu_base_partner * [FIX] ValueError: Wrong value for ir.actions.act_window.target: 'inlineview' * [FIX] Based on @lasley comments * [FIX] External ID not found in the system: base.group_document_user
This commit is contained in:
parent
35a8a60ae1
commit
fe6ebff289
@ -16,7 +16,7 @@ This module depends on module knowledge. So make sure to have it in your addons
|
|||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
No configuration required
|
No configuration required.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
@ -30,7 +30,7 @@ To use this module, you need to:
|
|||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
:target: https://runbot.odoo-community.org/runbot/118/9.0
|
:target: https://runbot.odoo-community.org/runbot/118/10.0
|
||||||
|
|
||||||
Known issues / Roadmap
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
@ -40,17 +40,29 @@ Bug Tracker
|
|||||||
|
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/Knowledge/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/Knowledge/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
If you spotted it first, help us smash it by providing detailed and welcomed feedback.
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* Odoo SA <info@odoo.com>
|
|
||||||
* Savoir-faire Linux <support@savoirfairelinux.com>
|
|
||||||
* Gervais Naoussi <gervaisnaoussi@gmail.com>
|
* Gervais Naoussi <gervaisnaoussi@gmail.com>
|
||||||
|
* Maxime Chambreuil <mchambreuil@ursainfosystems.com>
|
||||||
|
|
||||||
|
Funders
|
||||||
|
-------
|
||||||
|
|
||||||
|
The development of this module has been financially supported by:
|
||||||
|
|
||||||
|
* Odoo SA <http://www.odoo.com>
|
||||||
|
* Savoir-faire Linux <http://www.savoirfairelinux.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
@ -65,4 +77,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
To contribute to this module, please visit http://odoo-community.org.
|
To contribute to this module, please visit https://odoo-community.org.
|
||||||
|
@ -1,22 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from . import models
|
from . import models
|
||||||
from . import wizard
|
from . import wizard
|
||||||
|
36
document_page/__manifest__.py
Normal file
36
document_page/__manifest__.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Document Page',
|
||||||
|
'version': '10.0.1.0.0',
|
||||||
|
'category': 'Knowledge Management',
|
||||||
|
'author': 'OpenERP SA, Odoo Community Association (OCA)',
|
||||||
|
'images': [
|
||||||
|
'images/category_list.png',
|
||||||
|
'images/create_category.png',
|
||||||
|
'images/page_list.png',
|
||||||
|
'images/create_page.png',
|
||||||
|
'images/customer_invoice.jpeg',
|
||||||
|
'images/page_history.png',
|
||||||
|
],
|
||||||
|
'website': 'http://www.openerp.com/',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'depends': [
|
||||||
|
'mail',
|
||||||
|
'knowledge',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'wizard/document_page_create_menu.xml',
|
||||||
|
'wizard/document_page_show_diff.xml',
|
||||||
|
'views/document_page.xml',
|
||||||
|
'security/document_page_security.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
'data/document_page.xml',
|
||||||
|
],
|
||||||
|
'demo': [
|
||||||
|
'demo/document_page.xml'
|
||||||
|
],
|
||||||
|
}
|
@ -1,49 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{
|
|
||||||
'name': 'Document Page',
|
|
||||||
'version': '9.0.1.0.1',
|
|
||||||
'category': 'Knowledge Management',
|
|
||||||
'author': 'OpenERP SA, Odoo Community Association (OCA)',
|
|
||||||
'images': ['images/category_list.png', 'images/create_category.png',
|
|
||||||
'images/page_list.png', 'images/create_page.png',
|
|
||||||
'images/customer_invoice.jpeg', 'images/page_history.png'],
|
|
||||||
'website': 'http://www.openerp.com/',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'depends': [
|
|
||||||
'mail',
|
|
||||||
'knowledge',
|
|
||||||
],
|
|
||||||
'data': [
|
|
||||||
'wizard/document_page_create_menu.xml',
|
|
||||||
'wizard/document_page_show_diff.xml',
|
|
||||||
'views/document_page.xml',
|
|
||||||
'security/document_page_security.xml',
|
|
||||||
'security/ir.model.access.csv',
|
|
||||||
],
|
|
||||||
'demo': [
|
|
||||||
'demo/document_page.xml'
|
|
||||||
],
|
|
||||||
'installable': True,
|
|
||||||
'auto_install': False,
|
|
||||||
'css': ['static/src/css/document_page.css'],
|
|
||||||
}
|
|
@ -1,41 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="1">
|
<template id="document_page_css">
|
||||||
<record id="wiki_wiki_main" model="document.page">
|
<link rel="stylesheet" type="text/less" href="/document_page/static/src/css/document_page.css"/>
|
||||||
<field name="name">The Odoo wiki</field>
|
</template>
|
||||||
<field name="tags">help, quick start, wiki, formatting</field>
|
|
||||||
<field name="minor_edit">0</field>
|
|
||||||
<field name="index">1</field>
|
|
||||||
<field name="summary">Initial Page</field>
|
|
||||||
<field name="content">== The Odoo wiki ==
|
|
||||||
|
|
||||||
[[File:https://www.odoo.com/openerp_website/static/src/img/logo_transparent_198px.png Odoo]]
|
|
||||||
|
|
||||||
The Odoo wiki allows you to manage your enterprise's contents using wiki
|
|
||||||
restructured texts. This module provides a collaborative way to manage internal
|
|
||||||
FAQs, quality manuals, technical references, etc.
|
|
||||||
|
|
||||||
==Keypoints==
|
|
||||||
* Same formating style than MediaWiki,
|
|
||||||
* Any number of wiki group for different purposes,
|
|
||||||
* Detailed history on all pages,
|
|
||||||
* Integrated with the document management system.
|
|
||||||
|
|
||||||
==Why you should use the OpenERP integrated wiki than a separate wiki system ?==
|
|
||||||
* Allows links to any document of the system,
|
|
||||||
* Uses the access controls of OpenERP for uniq access rights management,
|
|
||||||
* Use it to describe projects, tasks, products,
|
|
||||||
* Integrated with customer portal to provide restricted external accesses,
|
|
||||||
* Linked to users processes for quality manuals.
|
|
||||||
|
|
||||||
==To get more information==
|
|
||||||
* [[Basic Wiki Editing]]
|
|
||||||
* [[Wiki Documentation]]
|
|
||||||
* [http://openerp.com The OpenERP website]
|
|
||||||
|
|
||||||
|
|
||||||
</field>
|
|
||||||
<field name="parent_id" ref="wiki_groups_wikiformatting0"/>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo noupdate="1">
|
||||||
<data noupdate="1">
|
|
||||||
<record id="base.user_demo" model="res.users">
|
<record id="base.user_demo" model="res.users">
|
||||||
<field eval="[(4, ref('base.group_document_user'))]"
|
<field eval="[(4, ref('knowledge.group_document_user'))]"
|
||||||
name="groups_id"/>
|
name="groups_id"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="demo_category1" model="document.page">
|
<record id="demo_category1" model="document.page">
|
||||||
<field name="name">OpenERP Features</field>
|
<field name="name">OpenERP Features</field>
|
||||||
<field name="type">category</field>
|
<field name="type">category</field>
|
||||||
@ -127,5 +128,4 @@ Think of it as an out-of-the-box solution to boost your business' productivity.<
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -1,22 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from . import document_page
|
from . import document_page
|
||||||
from . import document_page_history
|
from . import document_page_history
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
import logging
|
import logging
|
||||||
from openerp import models, fields, api
|
from odoo import api, fields, models
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -53,9 +37,7 @@ class DocumentPage(models.Model):
|
|||||||
'Children'
|
'Children'
|
||||||
)
|
)
|
||||||
|
|
||||||
content = fields.Text(
|
content = fields.Text("Content")
|
||||||
"Content"
|
|
||||||
)
|
|
||||||
|
|
||||||
display_content = fields.Text(
|
display_content = fields.Text(
|
||||||
string='Displayed Content',
|
string='Displayed Content',
|
||||||
@ -76,26 +58,23 @@ class DocumentPage(models.Model):
|
|||||||
|
|
||||||
create_date = fields.Datetime(
|
create_date = fields.Datetime(
|
||||||
"Created on",
|
"Created on",
|
||||||
select=True,
|
|
||||||
readonly=True
|
readonly=True
|
||||||
)
|
)
|
||||||
|
|
||||||
create_uid = fields.Many2one(
|
create_uid = fields.Many2one(
|
||||||
'res.users',
|
'res.users',
|
||||||
'Author',
|
'Author',
|
||||||
select=True,
|
|
||||||
readonly=True
|
readonly=True
|
||||||
)
|
)
|
||||||
|
|
||||||
write_date = fields.Datetime(
|
write_date = fields.Datetime(
|
||||||
"Modification Date",
|
"Modification Date",
|
||||||
select=True,
|
readonly=True
|
||||||
readonly=True)
|
)
|
||||||
|
|
||||||
write_uid = fields.Many2one(
|
write_uid = fields.Many2one(
|
||||||
'res.users',
|
'res.users',
|
||||||
"Last Contributor",
|
"Last Contributor",
|
||||||
select=True,
|
|
||||||
readonly=True
|
readonly=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,26 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
import logging
|
import logging
|
||||||
import difflib
|
import difflib
|
||||||
from openerp import models, fields, _
|
from odoo import fields, models
|
||||||
|
from odoo.tools.translate import _
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -34,7 +19,7 @@ class DocumentPageHistory(models.Model):
|
|||||||
_rec_name = "create_date"
|
_rec_name = "create_date"
|
||||||
|
|
||||||
page_id = fields.Many2one('document.page', 'Page')
|
page_id = fields.Many2one('document.page', 'Page')
|
||||||
summary = fields.Char('Summary', select=True)
|
summary = fields.Char('Summary', index=True)
|
||||||
content = fields.Text("Content")
|
content = fields.Text("Content")
|
||||||
create_date = fields.Datetime("Date")
|
create_date = fields.Datetime("Date")
|
||||||
create_uid = fields.Many2one('res.users', "Modified By")
|
create_uid = fields.Many2one('res.users', "Modified By")
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
|
||||||
<record id="base.group_document_user" model="res.groups">
|
<record id="knowledge.group_document_user" model="res.groups">
|
||||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
BIN
document_page/static/description/icon.png
Normal file
BIN
document_page/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from openerp.tests import common
|
from odoo.tests import common
|
||||||
|
|
||||||
|
|
||||||
class TestDocumentPage(common.TransactionCase):
|
class TestDocumentPage(common.TransactionCase):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from openerp.tests import common
|
from odoo.tests import common
|
||||||
|
|
||||||
|
|
||||||
class TestDocumentPageCreateMenu(common.TransactionCase):
|
class TestDocumentPageCreateMenu(common.TransactionCase):
|
||||||
@ -8,7 +8,7 @@ class TestDocumentPageCreateMenu(common.TransactionCase):
|
|||||||
|
|
||||||
def test_page_menu_creation(self):
|
def test_page_menu_creation(self):
|
||||||
"""Test page menu creation."""
|
"""Test page menu creation."""
|
||||||
menu_parent = self.env.ref('base.menu_base_partner')
|
menu_parent = self.env.ref('knowledge.menu_document_root')
|
||||||
|
|
||||||
menu_created = self.env['document.page.create.menu'].create(
|
menu_created = self.env['document.page.create.menu'].create(
|
||||||
{'menu_name': 'Wiki Test menu', 'menu_parent_id': menu_parent.id}
|
{'menu_name': 'Wiki Test menu', 'menu_parent_id': menu_parent.id}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from openerp.tests import common
|
from odoo.tests import common
|
||||||
|
|
||||||
|
|
||||||
class TestDocumentPageHistory(common.TransactionCase):
|
class TestDocumentPageHistory(common.TransactionCase):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from openerp.tests import common
|
from odoo.tests import common
|
||||||
from openerp import _
|
from odoo import _
|
||||||
|
|
||||||
|
|
||||||
class TestDocumentPageShowDiff(common.TransactionCase):
|
class TestDocumentPageShowDiff(common.TransactionCase):
|
||||||
|
@ -1,301 +1,301 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<menuitem name="Pages"
|
|
||||||
id="menu_wiki"
|
|
||||||
parent="knowledge.menu_document"
|
|
||||||
sequence="20" />
|
|
||||||
|
|
||||||
<!-- wiki tree view -->
|
<menuitem name="Pages"
|
||||||
<record id="view_wiki_tree_children" model="ir.ui.view">
|
id="menu_wiki"
|
||||||
<field name="name">document.page.tree</field>
|
parent="knowledge.menu_document"
|
||||||
<field name="model">document.page</field>
|
sequence="20" />
|
||||||
<field name="field_parent">child_ids</field>
|
|
||||||
<field name="priority">100</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="Document Page">
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="write_uid"/>
|
|
||||||
<field name="write_date"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- wiki list view -->
|
<!-- wiki tree view -->
|
||||||
<record id="view_wiki_tree" model="ir.ui.view">
|
<record id="view_wiki_tree_children" model="ir.ui.view">
|
||||||
<field name="name">document.page.list</field>
|
<field name="name">document.page.tree</field>
|
||||||
<field name="model">document.page</field>
|
<field name="model">document.page</field>
|
||||||
<field name="arch" type="xml">
|
<field name="field_parent">child_ids</field>
|
||||||
<tree string="Document Page">
|
<field name="priority">100</field>
|
||||||
<field name="name"/>
|
<field name="arch" type="xml">
|
||||||
<field name="parent_id"/>
|
<tree string="Document Page">
|
||||||
<field name="create_uid" invisible="1"/>
|
<field name="name"/>
|
||||||
<field name="write_uid"/>
|
<field name="write_uid"/>
|
||||||
<field name="write_date"/>
|
<field name="write_date"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- wiki Form view -->
|
<!-- wiki list view -->
|
||||||
<record id="view_wiki_form" model="ir.ui.view">
|
<record id="view_wiki_tree" model="ir.ui.view">
|
||||||
<field name="name">document.page.form</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">
|
||||||
<form string="Document Page">
|
<tree string="Document Page">
|
||||||
<sheet>
|
<field name="name"/>
|
||||||
<field name="type" invisible="1"/>
|
<field name="parent_id"/>
|
||||||
<h1><field name="name" placeholder="Name"/></h1>
|
<field name="create_uid" invisible="1"/>
|
||||||
<group>
|
<field name="write_uid"/>
|
||||||
<group>
|
<field name="write_date"/>
|
||||||
<field name="parent_id"
|
</tree>
|
||||||
string="Category"
|
</field>
|
||||||
context="{'default_type':'category'}"/>
|
</record>
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="write_uid"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
<field name="write_date"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
<field name="menu_id"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<separator string="Content" class="oe_edit_only" />
|
|
||||||
<field name="content"
|
|
||||||
placeholder="e.g. Once upon a time..."
|
|
||||||
class="oe_edit_only"
|
|
||||||
widget="html" />
|
|
||||||
<separator string="Last Content" />
|
|
||||||
<div class="oe_document_page">
|
|
||||||
<field name="display_content"
|
|
||||||
widget="html"
|
|
||||||
class="oe_view_only"
|
|
||||||
options='{"safe": True}' />
|
|
||||||
</div>
|
|
||||||
</sheet>
|
|
||||||
<div class="oe_chatter">
|
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
|
||||||
<field name="message_ids" widget="mail_thread"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_wiki_menu_form" model="ir.ui.view">
|
<!-- wiki Form view -->
|
||||||
<field name="name">document.page.menu.form</field>
|
<record id="view_wiki_form" model="ir.ui.view">
|
||||||
<field name="model">document.page</field>
|
<field name="name">document.page.form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="model">document.page</field>
|
||||||
<form string="Document Page">
|
<field name="arch" type="xml">
|
||||||
|
<form string="Document Page">
|
||||||
|
<sheet>
|
||||||
<field name="type" invisible="1"/>
|
<field name="type" invisible="1"/>
|
||||||
<h1><field name="name" placeholder="Name"/></h1>
|
<h1><field name="name" placeholder="Name"/></h1>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="parent_id"
|
||||||
|
string="Category"
|
||||||
|
context="{'default_type':'category'}"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="write_uid"
|
||||||
|
groups="base.group_no_one"/>
|
||||||
|
<field name="write_date"
|
||||||
|
groups="base.group_no_one"/>
|
||||||
|
<field name="menu_id"
|
||||||
|
groups="base.group_no_one"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<separator string="Content" class="oe_edit_only" />
|
||||||
|
<field name="content"
|
||||||
|
placeholder="e.g. Once upon a time..."
|
||||||
|
class="oe_edit_only"
|
||||||
|
widget="html" />
|
||||||
|
<separator string="Last Content" />
|
||||||
<div class="oe_document_page">
|
<div class="oe_document_page">
|
||||||
<field name="display_content"
|
<field name="display_content"
|
||||||
widget="html"
|
widget="html"
|
||||||
class="oe_view_only"
|
class="oe_view_only"
|
||||||
options='{"safe": True}' />
|
options='{"safe": True}' />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</sheet>
|
||||||
</field>
|
<div class="oe_chatter">
|
||||||
</record>
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||||||
|
<field name="message_ids" widget="mail_thread"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- page Search view -->
|
<record id="view_wiki_menu_form" model="ir.ui.view">
|
||||||
<record id="view_wiki_filter" model="ir.ui.view">
|
<field name="name">document.page.menu.form</field>
|
||||||
<field name="name">document.page.search</field>
|
<field name="model">document.page</field>
|
||||||
<field name="model">document.page</field>
|
<field name="arch" type="xml">
|
||||||
<field name="arch" type="xml">
|
<form string="Document Page">
|
||||||
<search string="Document Page">
|
<field name="type" invisible="1"/>
|
||||||
<field name="name"
|
<h1><field name="name" placeholder="Name"/></h1>
|
||||||
string="Content"
|
<div class="oe_document_page">
|
||||||
filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"/>
|
<field name="display_content"
|
||||||
<field name="write_uid"/>
|
widget="html"
|
||||||
<field name="parent_id"/>
|
class="oe_view_only"
|
||||||
<group expand="0" string="Group By...">
|
options='{"safe": True}' />
|
||||||
<filter string="Document Type"
|
</div>
|
||||||
domain="[]"
|
</form>
|
||||||
context="{'group_by':'parent_id'}" />
|
</field>
|
||||||
<filter string="Author"
|
</record>
|
||||||
domain="[]"
|
|
||||||
context="{'group_by':'create_uid'}" />
|
|
||||||
<filter string="Last Contributor"
|
|
||||||
domain="[]"
|
|
||||||
context="{'group_by':'write_uid'}" />
|
|
||||||
</group>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Category Views -->
|
<!-- page Search view -->
|
||||||
<record id="view_category_form" model="ir.ui.view">
|
<record id="view_wiki_filter" model="ir.ui.view">
|
||||||
<field name="name">document.page.category.form</field>
|
<field name="name">document.page.search</field>
|
||||||
<field name="model">document.page</field>
|
<field name="model">document.page</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Category">
|
<search string="Document Page">
|
||||||
<sheet>
|
<field name="name"
|
||||||
<field name="type" invisible="1"/>
|
string="Content"
|
||||||
<h1><field name="name" placeholder="Name"/></h1>
|
filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"/>
|
||||||
|
<field name="write_uid"/>
|
||||||
|
<field name="parent_id"/>
|
||||||
|
<group expand="0" string="Group By...">
|
||||||
|
<filter string="Document Type"
|
||||||
|
domain="[]"
|
||||||
|
context="{'group_by':'parent_id'}" />
|
||||||
|
<filter string="Author"
|
||||||
|
domain="[]"
|
||||||
|
context="{'group_by':'create_uid'}" />
|
||||||
|
<filter string="Last Contributor"
|
||||||
|
domain="[]"
|
||||||
|
context="{'group_by':'write_uid'}" />
|
||||||
|
</group>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Category Views -->
|
||||||
|
<record id="view_category_form" model="ir.ui.view">
|
||||||
|
<field name="name">document.page.category.form</field>
|
||||||
|
<field name="model">document.page</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Category">
|
||||||
|
<sheet>
|
||||||
|
<field name="type" invisible="1"/>
|
||||||
|
<h1><field name="name" placeholder="Name"/></h1>
|
||||||
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<field name="parent_id" string="Category"
|
||||||
<field name="parent_id" string="Category"
|
context="{'default_type':'category'}"/>
|
||||||
context="{'default_type':'category'}"/>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<field name="write_uid"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
<field name="write_date"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
<field name="menu_id"
|
|
||||||
groups="base.group_no_one"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<group>
|
||||||
<page string="Template" name="template">
|
<field name="write_uid"
|
||||||
<div>
|
groups="base.group_no_one"/>
|
||||||
<label for="content"
|
<field name="write_date"
|
||||||
string="Template that will be used as a content template for all new page of this category."/>
|
groups="base.group_no_one"/>
|
||||||
</div>
|
<field name="menu_id"
|
||||||
<field name="content"
|
groups="base.group_no_one"/>
|
||||||
placeholder="e.g. Once upon a time..."
|
</group>
|
||||||
widget="html" />
|
</group>
|
||||||
</page>
|
<notebook>
|
||||||
<page string="Documents" name="documents">
|
<page string="Template" name="template">
|
||||||
<div class="oe_document_page">
|
<div>
|
||||||
<field name="display_content"
|
<label for="content"
|
||||||
widget="html"
|
string="Template that will be used as a content template for all new page of this category."/>
|
||||||
class="oe_view_only"
|
</div>
|
||||||
options='{"safe": True}' />
|
<field name="content"
|
||||||
</div>
|
placeholder="e.g. Once upon a time..."
|
||||||
</page>
|
widget="html" />
|
||||||
</notebook>
|
</page>
|
||||||
</sheet>
|
<page string="Documents" name="documents">
|
||||||
<div class="oe_chatter">
|
<div class="oe_document_page">
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
<field name="display_content"
|
||||||
<field name="message_ids" widget="mail_thread"/>
|
widget="html"
|
||||||
</div>
|
class="oe_view_only"
|
||||||
</form>
|
options='{"safe": True}' />
|
||||||
</field>
|
</div>
|
||||||
</record>
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
<div class="oe_chatter">
|
||||||
|
<field name="message_follower_ids" widget="mail_followers"/>
|
||||||
|
<field name="message_ids" widget="mail_thread"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="view_category_tree" model="ir.ui.view">
|
<record id="view_category_tree" model="ir.ui.view">
|
||||||
<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 string="Categories">
|
||||||
<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"/>
|
||||||
<field name="write_uid"/>
|
<field name="write_uid"/>
|
||||||
<field name="write_date"/>
|
<field name="write_date"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- page action -->
|
<!-- page action -->
|
||||||
<record id="action_page" model="ir.actions.act_window">
|
<record id="action_page" model="ir.actions.act_window">
|
||||||
<field name="name">Pages</field>
|
<field name="name">Pages</field>
|
||||||
<field name="res_model">document.page</field>
|
<field name="res_model">document.page</field>
|
||||||
<field name="domain">[('type','=','content')]</field>
|
<field name="domain">[('type','=','content')]</field>
|
||||||
<field name="context">{'default_type': 'content'}</field>
|
<field name="context">{'default_type': 'content'}</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="view_id" ref="view_wiki_tree"/>
|
<field name="view_id" ref="view_wiki_tree"/>
|
||||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="oe_view_nocontent_create">
|
<p class="oe_view_nocontent_create">
|
||||||
Click to create a new web page.
|
Click to create a new web page.
|
||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
<record id="action_page_view_tree" model="ir.actions.act_window.view">
|
<record id="action_page_view_tree" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="0" />
|
<field name="sequence" eval="0" />
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree</field>
|
||||||
<field name="view_id" ref="view_wiki_tree"/>
|
<field name="view_id" ref="view_wiki_tree"/>
|
||||||
<field name="act_window_id" ref="action_page"/>
|
<field name="act_window_id" ref="action_page"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="action_page_view_form" model="ir.actions.act_window.view">
|
<record id="action_page_view_form" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="5" />
|
<field name="sequence" eval="5" />
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="view_id" ref="view_wiki_form"/>
|
<field name="view_id" ref="view_wiki_form"/>
|
||||||
<field name="act_window_id" ref="action_page"/>
|
<field name="act_window_id" ref="action_page"/>
|
||||||
</record>
|
</record>
|
||||||
<menuitem id="menu_page"
|
<menuitem id="menu_page"
|
||||||
parent="menu_wiki"
|
parent="menu_wiki"
|
||||||
name="Pages"
|
name="Pages"
|
||||||
action="action_page"
|
action="action_page"
|
||||||
sequence="10" />
|
sequence="10" />
|
||||||
|
|
||||||
<record id="action_category" model="ir.actions.act_window">
|
<record id="action_category" model="ir.actions.act_window">
|
||||||
<field name="name">Category</field>
|
<field name="name">Category</field>
|
||||||
<field name="res_model">document.page</field>
|
<field name="res_model">document.page</field>
|
||||||
<field name="domain">[('type','=','category')]</field>
|
<field name="domain">[('type','=','category')]</field>
|
||||||
<field name="context">{'default_type': 'category'}</field>
|
<field name="context">{'default_type': 'category'}</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="view_id" ref="view_category_tree"/>
|
<field name="view_id" ref="view_category_tree"/>
|
||||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="0" />
|
<field name="sequence" eval="0" />
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree</field>
|
||||||
<field name="view_id" ref="view_category_tree"/>
|
<field name="view_id" ref="view_category_tree"/>
|
||||||
<field name="act_window_id" ref="action_category"/>
|
<field name="act_window_id" ref="action_category"/>
|
||||||
</record>
|
</record>
|
||||||
<record id="action_category_view_form" model="ir.actions.act_window.view">
|
<record id="action_category_view_form" model="ir.actions.act_window.view">
|
||||||
<field name="sequence" eval="5" />
|
<field name="sequence" eval="5" />
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="view_id" ref="view_category_form"/>
|
<field name="view_id" ref="view_category_form"/>
|
||||||
<field name="act_window_id" ref="action_category"/>
|
<field name="act_window_id" ref="action_category"/>
|
||||||
</record>
|
</record>
|
||||||
<menuitem id="menu_category"
|
<menuitem id="menu_category"
|
||||||
parent="menu_wiki"
|
parent="menu_wiki"
|
||||||
name="Categories"
|
name="Categories"
|
||||||
action="action_category"
|
action="action_category"
|
||||||
sequence="20"/>
|
sequence="20"/>
|
||||||
|
|
||||||
<!-- History Tree view -->
|
<!-- History Tree view -->
|
||||||
<record model="ir.ui.view" id="view_wiki_history_tree">
|
<record model="ir.ui.view" id="view_wiki_history_tree">
|
||||||
<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 string="Document History">
|
||||||
<field name="create_date"/>
|
<field name="create_date"/>
|
||||||
<field name="create_uid"/>
|
<field name="create_uid"/>
|
||||||
<field name="page_id"/>
|
<field name="page_id"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
<!-- History Form view -->
|
<!-- History Form view -->
|
||||||
<record model="ir.ui.view" id="wiki_history_form">
|
<record model="ir.ui.view" id="wiki_history_form">
|
||||||
<field name="name">document.page.history.form</field>
|
<field name="name">document.page.history.form</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">
|
||||||
<form string="Document Page History" version="7.0">
|
<form string="Document Page History" version="7.0">
|
||||||
<label for="page_id" class="oe_edit_only"/>
|
<label for="page_id" class="oe_edit_only"/>
|
||||||
<h1><field name="page_id" select="1" /></h1>
|
<h1><field name="page_id" select="1" /></h1>
|
||||||
<label for="create_date" class="oe_edit_only"/>
|
<label for="create_date" class="oe_edit_only"/>
|
||||||
<field name="create_date" readonly="1"/>
|
<field name="create_date" readonly="1"/>
|
||||||
<label for="content" class="oe_edit_only"/>
|
<label for="content" class="oe_edit_only"/>
|
||||||
<field name="content" colspan="4"
|
<field name="content" colspan="4"
|
||||||
widget="html" options='{"safe": True}'/>
|
widget="html" options='{"safe": True}'/>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- History Action -->
|
<!-- History Action -->
|
||||||
<record model="ir.actions.act_window" id="action_history">
|
<record model="ir.actions.act_window" id="action_history">
|
||||||
<field name="name">Page history</field>
|
<field name="name">Page history</field>
|
||||||
<field name="res_model">document.page.history</field>
|
<field name="res_model">document.page.history</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem id="menu_page_history"
|
<menuitem id="menu_page_history"
|
||||||
parent="menu_wiki"
|
parent="menu_wiki"
|
||||||
name="Pages history"
|
name="Pages history"
|
||||||
action="action_history"
|
action="action_history"
|
||||||
sequence="30"
|
sequence="30"
|
||||||
groups="base.group_no_one" />
|
groups="base.group_no_one" />
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
id="action_related_page_history"
|
id="action_related_page_history"
|
||||||
context="{'search_default_page_id': [active_id], 'default_page_id': active_id}"
|
context="{'search_default_page_id': [active_id], 'default_page_id': active_id}"
|
||||||
domain="[('page_id','=',active_id)]"
|
domain="[('page_id','=',active_id)]"
|
||||||
@ -303,7 +303,7 @@
|
|||||||
res_model="document.page.history"
|
res_model="document.page.history"
|
||||||
src_model="document.page"/>
|
src_model="document.page"/>
|
||||||
|
|
||||||
<act_window
|
<act_window
|
||||||
id="action_related_page_create_menu"
|
id="action_related_page_create_menu"
|
||||||
name="Create Menu"
|
name="Create Menu"
|
||||||
res_model="document.page.create.menu"
|
res_model="document.page.create.menu"
|
||||||
@ -312,5 +312,4 @@
|
|||||||
view_mode="form"
|
view_mode="form"
|
||||||
src_model="document.page"/>
|
src_model="document.page"/>
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -1,22 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from . import document_page_create_menu
|
from . import document_page_create_menu
|
||||||
from . import document_page_show_diff
|
from . import document_page_show_diff
|
||||||
|
@ -1,24 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
from odoo import api, fields, models
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields, api
|
|
||||||
|
|
||||||
|
|
||||||
class DocumentPageCreateMenu(models.TransientModel):
|
class DocumentPageCreateMenu(models.TransientModel):
|
||||||
@ -68,7 +52,7 @@ class DocumentPageCreateMenu(models.TransientModel):
|
|||||||
'res_model': 'document.page',
|
'res_model': 'document.page',
|
||||||
'view_id': view_id,
|
'view_id': view_id,
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
'target': 'inlineview',
|
'target': 'inline',
|
||||||
}
|
}
|
||||||
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
|
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
|
||||||
value['res_id'] = page.id
|
value['res_id'] = page.id
|
||||||
|
@ -1,41 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<!-- Create Menu From view -->
|
<!-- Create Menu From view -->
|
||||||
<record id="view_wiki_create_menu" model="ir.ui.view">
|
<record id="view_wiki_create_menu" model="ir.ui.view">
|
||||||
<field name="name">Create Menu</field>
|
<field name="name">Create Menu</field>
|
||||||
<field name="model">document.page.create.menu</field>
|
<field name="model">document.page.create.menu</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Create Menu" version="7.0">
|
<form>
|
||||||
<group string="Menu Information">
|
<group string="Menu Information">
|
||||||
<field name="menu_name" />
|
<field name="menu_name" />
|
||||||
<field name="menu_parent_id" />
|
<field name="menu_parent_id" />
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button name="document_page_menu_create"
|
<button name="document_page_menu_create"
|
||||||
string="Create Menu"
|
string="Create Menu"
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_highlight" />
|
class="oe_highlight" />
|
||||||
or
|
or
|
||||||
<button string="Cancel"
|
<button string="Cancel"
|
||||||
class="oe_link"
|
class="oe_link"
|
||||||
special="cancel" />
|
special="cancel" />
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create Menu Action -->
|
<!-- Create Menu Action -->
|
||||||
<record id="action_wiki_create_menu"
|
<record id="action_wiki_create_menu"
|
||||||
model="ir.actions.act_window">
|
model="ir.actions.act_window">
|
||||||
<field name="name">Create Menu</field>
|
<field name="name">Create Menu</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">document.page.create.menu</field>
|
<field name="res_model">document.page.create.menu</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||||
#
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
from odoo import exceptions, fields, models
|
||||||
#
|
from odoo.tools.translate import _
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from openerp import models, fields, _
|
|
||||||
from openerp import exceptions
|
|
||||||
|
|
||||||
|
|
||||||
class DocumentPageShowDiff(models.TransientModel):
|
class DocumentPageShowDiff(models.TransientModel):
|
||||||
|
@ -1,39 +1,38 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
|
|
||||||
<!-- Create Index Form view -->
|
<!-- Create Index Form view -->
|
||||||
<record id="view_wiki_show_diff" model="ir.ui.view">
|
<record id="view_wiki_show_diff" model="ir.ui.view">
|
||||||
<field name="name">Show Difference</field>
|
<field name="name">Show Difference</field>
|
||||||
<field name="model">wizard.document.page.history.show_diff</field>
|
<field name="model">wizard.document.page.history.show_diff</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Difference" version="7.0">
|
<form>
|
||||||
<field name="diff"
|
<field name="diff"
|
||||||
widget="html"
|
widget="html"
|
||||||
options='{"safe": True}' />
|
options='{"safe": True}' />
|
||||||
<footer>
|
<footer>
|
||||||
<button string="Close"
|
<button string="Close"
|
||||||
class="oe_link"
|
class="oe_link"
|
||||||
special="cancel" />
|
special="cancel" />
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create Index Action -->
|
<!-- Create Index Action -->
|
||||||
<record id="action_view_wiki_show_diff" model="ir.actions.act_window">
|
<record id="action_view_wiki_show_diff" model="ir.actions.act_window">
|
||||||
<field name="name">Difference</field>
|
<field name="name">Difference</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">wizard.document.page.history.show_diff</field>
|
<field name="res_model">wizard.document.page.history.show_diff</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="target">new</field>
|
<field name="target">new</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- Create Index Action Window -->
|
<!-- Create Index Action Window -->
|
||||||
<act_window
|
<act_window
|
||||||
id="action_view_wiki_show_diff_values"
|
id="action_view_wiki_show_diff_values"
|
||||||
key2="client_action_multi"
|
key2="client_action_multi"
|
||||||
name="Difference"
|
name="Difference"
|
||||||
@ -43,5 +42,4 @@
|
|||||||
target="new"
|
target="new"
|
||||||
view_type="form"/>
|
view_type="form"/>
|
||||||
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
Loading…
Reference in New Issue
Block a user