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
|
||||
=============
|
||||
|
||||
No configuration required
|
||||
No configuration required.
|
||||
|
||||
Usage
|
||||
=====
|
||||
@ -30,7 +30,7 @@ To use this module, you need to:
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
: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
|
||||
======================
|
||||
@ -40,17 +40,29 @@ Bug Tracker
|
||||
|
||||
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.
|
||||
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
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Odoo SA <info@odoo.com>
|
||||
* Savoir-faire Linux <support@savoirfairelinux.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
|
||||
----------
|
||||
@ -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
|
||||
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 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
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>
|
||||
<data noupdate="1">
|
||||
<record id="wiki_wiki_main" model="document.page">
|
||||
<field name="name">The Odoo wiki</field>
|
||||
<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>
|
||||
<template id="document_page_css">
|
||||
<link rel="stylesheet" type="text/less" href="/document_page/static/src/css/document_page.css"/>
|
||||
</template>
|
||||
</odoo>
|
||||
|
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<odoo noupdate="1">
|
||||
|
||||
<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"/>
|
||||
</record>
|
||||
|
||||
<record id="demo_category1" model="document.page">
|
||||
<field name="name">OpenERP Features</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>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
@ -1,22 +1,6 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import document_page
|
||||
from . import document_page_history
|
||||
|
@ -1,25 +1,9 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
from openerp import models, fields, api
|
||||
from odoo import api, fields, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@ -53,9 +37,7 @@ class DocumentPage(models.Model):
|
||||
'Children'
|
||||
)
|
||||
|
||||
content = fields.Text(
|
||||
"Content"
|
||||
)
|
||||
content = fields.Text("Content")
|
||||
|
||||
display_content = fields.Text(
|
||||
string='Displayed Content',
|
||||
@ -76,26 +58,23 @@ class DocumentPage(models.Model):
|
||||
|
||||
create_date = fields.Datetime(
|
||||
"Created on",
|
||||
select=True,
|
||||
readonly=True
|
||||
)
|
||||
|
||||
create_uid = fields.Many2one(
|
||||
'res.users',
|
||||
'Author',
|
||||
select=True,
|
||||
readonly=True
|
||||
)
|
||||
|
||||
write_date = fields.Datetime(
|
||||
"Modification Date",
|
||||
select=True,
|
||||
readonly=True)
|
||||
readonly=True
|
||||
)
|
||||
|
||||
write_uid = fields.Many2one(
|
||||
'res.users',
|
||||
"Last Contributor",
|
||||
select=True,
|
||||
readonly=True
|
||||
)
|
||||
|
||||
|
@ -1,26 +1,11 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
import difflib
|
||||
from openerp import models, fields, _
|
||||
from odoo import fields, models
|
||||
from odoo.tools.translate import _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@ -34,7 +19,7 @@ class DocumentPageHistory(models.Model):
|
||||
_rec_name = "create_date"
|
||||
|
||||
page_id = fields.Many2one('document.page', 'Page')
|
||||
summary = fields.Char('Summary', select=True)
|
||||
summary = fields.Char('Summary', index=True)
|
||||
content = fields.Text("Content")
|
||||
create_date = fields.Datetime("Date")
|
||||
create_uid = fields.Many2one('res.users', "Modified By")
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</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 -*-
|
||||
|
||||
from openerp.tests import common
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestDocumentPage(common.TransactionCase):
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.tests import common
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestDocumentPageCreateMenu(common.TransactionCase):
|
||||
@ -8,7 +8,7 @@ class TestDocumentPageCreateMenu(common.TransactionCase):
|
||||
|
||||
def test_page_menu_creation(self):
|
||||
"""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_name': 'Wiki Test menu', 'menu_parent_id': menu_parent.id}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.tests import common
|
||||
from odoo.tests import common
|
||||
|
||||
|
||||
class TestDocumentPageHistory(common.TransactionCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.tests import common
|
||||
from openerp import _
|
||||
from odoo.tests import common
|
||||
from odoo import _
|
||||
|
||||
|
||||
class TestDocumentPageShowDiff(common.TransactionCase):
|
||||
|
@ -1,301 +1,301 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<menuitem name="Pages"
|
||||
id="menu_wiki"
|
||||
parent="knowledge.menu_document"
|
||||
sequence="20" />
|
||||
|
||||
<!-- wiki tree view -->
|
||||
<record id="view_wiki_tree_children" model="ir.ui.view">
|
||||
<field name="name">document.page.tree</field>
|
||||
<field name="model">document.page</field>
|
||||
<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>
|
||||
<menuitem name="Pages"
|
||||
id="menu_wiki"
|
||||
parent="knowledge.menu_document"
|
||||
sequence="20" />
|
||||
|
||||
<!-- wiki list view -->
|
||||
<record id="view_wiki_tree" model="ir.ui.view">
|
||||
<field name="name">document.page.list</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Document Page">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid" invisible="1"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- wiki tree view -->
|
||||
<record id="view_wiki_tree_children" model="ir.ui.view">
|
||||
<field name="name">document.page.tree</field>
|
||||
<field name="model">document.page</field>
|
||||
<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 Form view -->
|
||||
<record id="view_wiki_form" model="ir.ui.view">
|
||||
<field name="name">document.page.form</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page">
|
||||
<sheet>
|
||||
<field name="type" invisible="1"/>
|
||||
<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">
|
||||
<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>
|
||||
<!-- wiki list view -->
|
||||
<record id="view_wiki_tree" model="ir.ui.view">
|
||||
<field name="name">document.page.list</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Document Page">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid" invisible="1"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_wiki_menu_form" model="ir.ui.view">
|
||||
<field name="name">document.page.menu.form</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page">
|
||||
<!-- wiki Form view -->
|
||||
<record id="view_wiki_form" model="ir.ui.view">
|
||||
<field name="name">document.page.form</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page">
|
||||
<sheet>
|
||||
<field name="type" invisible="1"/>
|
||||
<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">
|
||||
<field name="display_content"
|
||||
widget="html"
|
||||
class="oe_view_only"
|
||||
options='{"safe": True}' />
|
||||
widget="html"
|
||||
class="oe_view_only"
|
||||
options='{"safe": True}' />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<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_filter" model="ir.ui.view">
|
||||
<field name="name">document.page.search</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Document Page">
|
||||
<field name="name"
|
||||
string="Content"
|
||||
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>
|
||||
<record id="view_wiki_menu_form" model="ir.ui.view">
|
||||
<field name="name">document.page.menu.form</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page">
|
||||
<field name="type" invisible="1"/>
|
||||
<h1><field name="name" placeholder="Name"/></h1>
|
||||
<div class="oe_document_page">
|
||||
<field name="display_content"
|
||||
widget="html"
|
||||
class="oe_view_only"
|
||||
options='{"safe": True}' />
|
||||
</div>
|
||||
</form>
|
||||
</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>
|
||||
<!-- page Search view -->
|
||||
<record id="view_wiki_filter" model="ir.ui.view">
|
||||
<field name="name">document.page.search</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Document Page">
|
||||
<field name="name"
|
||||
string="Content"
|
||||
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>
|
||||
<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>
|
||||
<field name="parent_id" string="Category"
|
||||
context="{'default_type':'category'}"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Template" name="template">
|
||||
<div>
|
||||
<label for="content"
|
||||
string="Template that will be used as a content template for all new page of this category."/>
|
||||
</div>
|
||||
<field name="content"
|
||||
placeholder="e.g. Once upon a time..."
|
||||
widget="html" />
|
||||
</page>
|
||||
<page string="Documents" name="documents">
|
||||
<div class="oe_document_page">
|
||||
<field name="display_content"
|
||||
widget="html"
|
||||
class="oe_view_only"
|
||||
options='{"safe": True}' />
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
<notebook>
|
||||
<page string="Template" name="template">
|
||||
<div>
|
||||
<label for="content"
|
||||
string="Template that will be used as a content template for all new page of this category."/>
|
||||
</div>
|
||||
<field name="content"
|
||||
placeholder="e.g. Once upon a time..."
|
||||
widget="html" />
|
||||
</page>
|
||||
<page string="Documents" name="documents">
|
||||
<div class="oe_document_page">
|
||||
<field name="display_content"
|
||||
widget="html"
|
||||
class="oe_view_only"
|
||||
options='{"safe": True}' />
|
||||
</div>
|
||||
</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">
|
||||
<field name="name">document.page.category.tree</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Categories">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid" invisible="1"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_category_tree" model="ir.ui.view">
|
||||
<field name="name">document.page.category.tree</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Categories">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid" invisible="1"/>
|
||||
<field name="write_uid"/>
|
||||
<field name="write_date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- page action -->
|
||||
<record id="action_page" model="ir.actions.act_window">
|
||||
<field name="name">Pages</field>
|
||||
<field name="res_model">document.page</field>
|
||||
<field name="domain">[('type','=','content')]</field>
|
||||
<field name="context">{'default_type': 'content'}</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_wiki_tree"/>
|
||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
<!-- page action -->
|
||||
<record id="action_page" model="ir.actions.act_window">
|
||||
<field name="name">Pages</field>
|
||||
<field name="res_model">document.page</field>
|
||||
<field name="domain">[('type','=','content')]</field>
|
||||
<field name="context">{'default_type': 'content'}</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_wiki_tree"/>
|
||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a new web page.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_page_view_tree" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="0" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_wiki_tree"/>
|
||||
<field name="act_window_id" ref="action_page"/>
|
||||
</record>
|
||||
<record id="action_page_view_form" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="5" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_wiki_form"/>
|
||||
<field name="act_window_id" ref="action_page"/>
|
||||
</record>
|
||||
<menuitem id="menu_page"
|
||||
parent="menu_wiki"
|
||||
name="Pages"
|
||||
action="action_page"
|
||||
sequence="10" />
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_page_view_tree" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="0" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_wiki_tree"/>
|
||||
<field name="act_window_id" ref="action_page"/>
|
||||
</record>
|
||||
<record id="action_page_view_form" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="5" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_wiki_form"/>
|
||||
<field name="act_window_id" ref="action_page"/>
|
||||
</record>
|
||||
<menuitem id="menu_page"
|
||||
parent="menu_wiki"
|
||||
name="Pages"
|
||||
action="action_page"
|
||||
sequence="10" />
|
||||
|
||||
<record id="action_category" model="ir.actions.act_window">
|
||||
<field name="name">Category</field>
|
||||
<field name="res_model">document.page</field>
|
||||
<field name="domain">[('type','=','category')]</field>
|
||||
<field name="context">{'default_type': 'category'}</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_category_tree"/>
|
||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||
</record>
|
||||
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="0" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_category_tree"/>
|
||||
<field name="act_window_id" ref="action_category"/>
|
||||
</record>
|
||||
<record id="action_category_view_form" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="5" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_category_form"/>
|
||||
<field name="act_window_id" ref="action_category"/>
|
||||
</record>
|
||||
<menuitem id="menu_category"
|
||||
parent="menu_wiki"
|
||||
name="Categories"
|
||||
action="action_category"
|
||||
sequence="20"/>
|
||||
<record id="action_category" model="ir.actions.act_window">
|
||||
<field name="name">Category</field>
|
||||
<field name="res_model">document.page</field>
|
||||
<field name="domain">[('type','=','category')]</field>
|
||||
<field name="context">{'default_type': 'category'}</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_category_tree"/>
|
||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||
</record>
|
||||
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="0" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_category_tree"/>
|
||||
<field name="act_window_id" ref="action_category"/>
|
||||
</record>
|
||||
<record id="action_category_view_form" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="5" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_category_form"/>
|
||||
<field name="act_window_id" ref="action_category"/>
|
||||
</record>
|
||||
<menuitem id="menu_category"
|
||||
parent="menu_wiki"
|
||||
name="Categories"
|
||||
action="action_category"
|
||||
sequence="20"/>
|
||||
|
||||
<!-- History Tree view -->
|
||||
<record model="ir.ui.view" id="view_wiki_history_tree">
|
||||
<field name="name">document.page.history.tree</field>
|
||||
<field name="model">document.page.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Document History">
|
||||
<field name="create_date"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="page_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- History Form view -->
|
||||
<record model="ir.ui.view" id="wiki_history_form">
|
||||
<field name="name">document.page.history.form</field>
|
||||
<field name="model">document.page.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page History" version="7.0">
|
||||
<label for="page_id" class="oe_edit_only"/>
|
||||
<h1><field name="page_id" select="1" /></h1>
|
||||
<label for="create_date" class="oe_edit_only"/>
|
||||
<field name="create_date" readonly="1"/>
|
||||
<label for="content" class="oe_edit_only"/>
|
||||
<field name="content" colspan="4"
|
||||
widget="html" options='{"safe": True}'/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<!-- History Tree view -->
|
||||
<record model="ir.ui.view" id="view_wiki_history_tree">
|
||||
<field name="name">document.page.history.tree</field>
|
||||
<field name="model">document.page.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Document History">
|
||||
<field name="create_date"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="page_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- History Form view -->
|
||||
<record model="ir.ui.view" id="wiki_history_form">
|
||||
<field name="name">document.page.history.form</field>
|
||||
<field name="model">document.page.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page History" version="7.0">
|
||||
<label for="page_id" class="oe_edit_only"/>
|
||||
<h1><field name="page_id" select="1" /></h1>
|
||||
<label for="create_date" class="oe_edit_only"/>
|
||||
<field name="create_date" readonly="1"/>
|
||||
<label for="content" class="oe_edit_only"/>
|
||||
<field name="content" colspan="4"
|
||||
widget="html" options='{"safe": True}'/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- History Action -->
|
||||
<record model="ir.actions.act_window" id="action_history">
|
||||
<field name="name">Page history</field>
|
||||
<field name="res_model">document.page.history</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- History Action -->
|
||||
<record model="ir.actions.act_window" id="action_history">
|
||||
<field name="name">Page history</field>
|
||||
<field name="res_model">document.page.history</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_page_history"
|
||||
parent="menu_wiki"
|
||||
name="Pages history"
|
||||
action="action_history"
|
||||
sequence="30"
|
||||
groups="base.group_no_one" />
|
||||
<menuitem id="menu_page_history"
|
||||
parent="menu_wiki"
|
||||
name="Pages history"
|
||||
action="action_history"
|
||||
sequence="30"
|
||||
groups="base.group_no_one" />
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="action_related_page_history"
|
||||
context="{'search_default_page_id': [active_id], 'default_page_id': active_id}"
|
||||
domain="[('page_id','=',active_id)]"
|
||||
@ -303,7 +303,7 @@
|
||||
res_model="document.page.history"
|
||||
src_model="document.page"/>
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="action_related_page_create_menu"
|
||||
name="Create Menu"
|
||||
res_model="document.page.create.menu"
|
||||
@ -312,5 +312,4 @@
|
||||
view_mode="form"
|
||||
src_model="document.page"/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
@ -1,22 +1,6 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import document_page_create_menu
|
||||
from . import document_page_show_diff
|
||||
|
@ -1,24 +1,8 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields, api
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class DocumentPageCreateMenu(models.TransientModel):
|
||||
@ -68,7 +52,7 @@ class DocumentPageCreateMenu(models.TransientModel):
|
||||
'res_model': 'document.page',
|
||||
'view_id': view_id,
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'inlineview',
|
||||
'target': 'inline',
|
||||
}
|
||||
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
|
||||
value['res_id'] = page.id
|
||||
|
@ -1,41 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Create Menu From view -->
|
||||
<record id="view_wiki_create_menu" model="ir.ui.view">
|
||||
<field name="name">Create Menu</field>
|
||||
<field name="model">document.page.create.menu</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Menu" version="7.0">
|
||||
<group string="Menu Information">
|
||||
<field name="menu_name" />
|
||||
<field name="menu_parent_id" />
|
||||
</group>
|
||||
<footer>
|
||||
<button name="document_page_menu_create"
|
||||
string="Create Menu"
|
||||
type="object"
|
||||
class="oe_highlight" />
|
||||
or
|
||||
<button string="Cancel"
|
||||
class="oe_link"
|
||||
special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Create Menu From view -->
|
||||
<record id="view_wiki_create_menu" model="ir.ui.view">
|
||||
<field name="name">Create Menu</field>
|
||||
<field name="model">document.page.create.menu</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group string="Menu Information">
|
||||
<field name="menu_name" />
|
||||
<field name="menu_parent_id" />
|
||||
</group>
|
||||
<footer>
|
||||
<button name="document_page_menu_create"
|
||||
string="Create Menu"
|
||||
type="object"
|
||||
class="oe_highlight" />
|
||||
or
|
||||
<button string="Cancel"
|
||||
class="oe_link"
|
||||
special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Create Menu Action -->
|
||||
<record id="action_wiki_create_menu"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Create Menu</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.page.create.menu</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!-- Create Menu Action -->
|
||||
<record id="action_wiki_create_menu"
|
||||
model="ir.actions.act_window">
|
||||
<field name="name">Create Menu</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.page.create.menu</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
@ -1,25 +1,9 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields, _
|
||||
from openerp import exceptions
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import exceptions, fields, models
|
||||
from odoo.tools.translate import _
|
||||
|
||||
|
||||
class DocumentPageShowDiff(models.TransientModel):
|
||||
|
@ -1,39 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Create Index Form view -->
|
||||
<record id="view_wiki_show_diff" model="ir.ui.view">
|
||||
<field name="name">Show Difference</field>
|
||||
<field name="model">wizard.document.page.history.show_diff</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Difference" version="7.0">
|
||||
<field name="diff"
|
||||
widget="html"
|
||||
options='{"safe": True}' />
|
||||
<footer>
|
||||
<button string="Close"
|
||||
class="oe_link"
|
||||
special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Create Index Form view -->
|
||||
<record id="view_wiki_show_diff" model="ir.ui.view">
|
||||
<field name="name">Show Difference</field>
|
||||
<field name="model">wizard.document.page.history.show_diff</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<field name="diff"
|
||||
widget="html"
|
||||
options='{"safe": True}' />
|
||||
<footer>
|
||||
<button string="Close"
|
||||
class="oe_link"
|
||||
special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Create Index Action -->
|
||||
<record id="action_view_wiki_show_diff" model="ir.actions.act_window">
|
||||
<field name="name">Difference</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">wizard.document.page.history.show_diff</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!-- Create Index Action -->
|
||||
<record id="action_view_wiki_show_diff" model="ir.actions.act_window">
|
||||
<field name="name">Difference</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">wizard.document.page.history.show_diff</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Create Index Action Window -->
|
||||
<act_window
|
||||
<!-- Create Index Action Window -->
|
||||
<act_window
|
||||
id="action_view_wiki_show_diff_values"
|
||||
key2="client_action_multi"
|
||||
name="Difference"
|
||||
@ -43,5 +42,4 @@
|
||||
target="new"
|
||||
view_type="form"/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
Loading…
Reference in New Issue
Block a user