Skip to content

Commit 8a93627

Browse files
Maxime ChambreuilBhaveshHeliconia
authored andcommitted
[MIG] document_page: Migration to version 10.0 (OCA#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
1 parent 1d48c4b commit 8a93627

21 files changed

Lines changed: 441 additions & 597 deletions

document_page/README.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This module depends on module knowledge. So make sure to have it in your addons
1616
Configuration
1717
=============
1818

19-
No configuration required
19+
No configuration required.
2020

2121
Usage
2222
=====
@@ -30,7 +30,7 @@ To use this module, you need to:
3030

3131
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
3232
:alt: Try me on Runbot
33-
:target: https://runbot.odoo-community.org/runbot/118/9.0
33+
:target: https://runbot.odoo-community.org/runbot/118/10.0
3434

3535
Known issues / Roadmap
3636
======================
@@ -40,17 +40,29 @@ Bug Tracker
4040

4141
Bugs are tracked on `GitHub Issues <https://github.com/OCA/Knowledge/issues>`_.
4242
In case of trouble, please check there if your issue has already been reported.
43-
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**>`_.
43+
If you spotted it first, help us smash it by providing detailed and welcomed feedback.
4444

4545
Credits
4646
=======
4747

48+
Images
49+
------
50+
51+
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
52+
4853
Contributors
4954
------------
5055

51-
* Odoo SA <info@odoo.com>
52-
* Savoir-faire Linux <support@savoirfairelinux.com>
5356
* Gervais Naoussi <gervaisnaoussi@gmail.com>
57+
* Maxime Chambreuil <mchambreuil@ursainfosystems.com>
58+
59+
Funders
60+
-------
61+
62+
The development of this module has been financially supported by:
63+
64+
* Odoo SA <http://www.odoo.com>
65+
* Savoir-faire Linux <http://www.savoirfairelinux.com>
5466

5567
Maintainer
5668
----------
@@ -65,4 +77,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
6577
mission is to support the collaborative development of Odoo features and
6678
promote its widespread use.
6779

68-
To contribute to this module, please visit http://odoo-community.org.
80+
To contribute to this module, please visit https://odoo-community.org.

document_page/__init__.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# OpenERP, Open Source Management Solution
5-
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6-
#
7-
# This program is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU Affero General Public License as
9-
# published by the Free Software Foundation, either version 3 of the
10-
# License, or (at your option) any later version.
11-
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU Affero General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU Affero General Public License
18-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19-
#
20-
##############################################################################
2+
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
215
from . import models
226
from . import wizard

document_page/__manifest__.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
5+
6+
{
7+
'name': 'Document Page',
8+
'version': '10.0.1.0.0',
9+
'category': 'Knowledge Management',
10+
'author': 'OpenERP SA, Odoo Community Association (OCA)',
11+
'images': [
12+
'images/category_list.png',
13+
'images/create_category.png',
14+
'images/page_list.png',
15+
'images/create_page.png',
16+
'images/customer_invoice.jpeg',
17+
'images/page_history.png',
18+
],
19+
'website': 'http://www.openerp.com/',
20+
'license': 'AGPL-3',
21+
'depends': [
22+
'mail',
23+
'knowledge',
24+
],
25+
'data': [
26+
'wizard/document_page_create_menu.xml',
27+
'wizard/document_page_show_diff.xml',
28+
'views/document_page.xml',
29+
'security/document_page_security.xml',
30+
'security/ir.model.access.csv',
31+
'data/document_page.xml',
32+
],
33+
'demo': [
34+
'demo/document_page.xml'
35+
],
36+
}

document_page/__openerp__.py

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,6 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<odoo>
3-
<data noupdate="1">
4-
<record id="wiki_wiki_main" model="document.page">
5-
<field name="name">The Odoo wiki</field>
6-
<field name="tags">help, quick start, wiki, formatting</field>
7-
<field name="minor_edit">0</field>
8-
<field name="index">1</field>
9-
<field name="summary">Initial Page</field>
10-
<field name="content">== The Odoo wiki ==
11-
12-
[[File:https://www.odoo.com/openerp_website/static/src/img/logo_transparent_198px.png Odoo]]
13-
14-
The Odoo wiki allows you to manage your enterprise's contents using wiki
15-
restructured texts. This module provides a collaborative way to manage internal
16-
FAQs, quality manuals, technical references, etc.
17-
18-
==Keypoints==
19-
* Same formating style than MediaWiki,
20-
* Any number of wiki group for different purposes,
21-
* Detailed history on all pages,
22-
* Integrated with the document management system.
23-
24-
==Why you should use the OpenERP integrated wiki than a separate wiki system ?==
25-
* Allows links to any document of the system,
26-
* Uses the access controls of OpenERP for uniq access rights management,
27-
* Use it to describe projects, tasks, products,
28-
* Integrated with customer portal to provide restricted external accesses,
29-
* Linked to users processes for quality manuals.
30-
31-
==To get more information==
32-
* [[Basic Wiki Editing]]
33-
* [[Wiki Documentation]]
34-
* [http://openerp.com The OpenERP website]
35-
36-
37-
</field>
38-
<field name="parent_id" ref="wiki_groups_wikiformatting0"/>
39-
</record>
40-
</data>
3+
<template id="document_page_css">
4+
<link rel="stylesheet" type="text/less" href="/document_page/static/src/css/document_page.css"/>
5+
</template>
416
</odoo>

document_page/demo/document_page.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<odoo>
3-
<data noupdate="1">
2+
<odoo noupdate="1">
3+
44
<record id="base.user_demo" model="res.users">
5-
<field eval="[(4, ref('base.group_document_user'))]"
5+
<field eval="[(4, ref('knowledge.group_document_user'))]"
66
name="groups_id"/>
77
</record>
8+
89
<record id="demo_category1" model="document.page">
910
<field name="name">OpenERP Features</field>
1011
<field name="type">category</field>
@@ -127,5 +128,4 @@ Think of it as an out-of-the-box solution to boost your business' productivity.<
127128
</field>
128129
</record>
129130

130-
</data>
131131
</odoo>

document_page/models/__init__.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# OpenERP, Open Source Management Solution
5-
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6-
#
7-
# This program is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU Affero General Public License as
9-
# published by the Free Software Foundation, either version 3 of the
10-
# License, or (at your option) any later version.
11-
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU Affero General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU Affero General Public License
18-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19-
#
20-
##############################################################################
2+
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
215
from . import document_page
226
from . import document_page_history

document_page/models/document_page.py

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# OpenERP, Open Source Management Solution
5-
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6-
#
7-
# This program is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU Affero General Public License as
9-
# published by the Free Software Foundation, either version 3 of the
10-
# License, or (at your option) any later version.
11-
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU Affero General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU Affero General Public License
18-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19-
#
20-
##############################################################################
2+
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
215
import logging
22-
from openerp import models, fields, api
6+
from odoo import api, fields, models
237

248
_logger = logging.getLogger(__name__)
259

@@ -53,9 +37,7 @@ class DocumentPage(models.Model):
5337
'Children'
5438
)
5539

56-
content = fields.Text(
57-
"Content"
58-
)
40+
content = fields.Text("Content")
5941

6042
display_content = fields.Text(
6143
string='Displayed Content',
@@ -76,26 +58,23 @@ class DocumentPage(models.Model):
7658

7759
create_date = fields.Datetime(
7860
"Created on",
79-
select=True,
8061
readonly=True
8162
)
8263

8364
create_uid = fields.Many2one(
8465
'res.users',
8566
'Author',
86-
select=True,
8767
readonly=True
8868
)
8969

9070
write_date = fields.Datetime(
9171
"Modification Date",
92-
select=True,
93-
readonly=True)
72+
readonly=True
73+
)
9474

9575
write_uid = fields.Many2one(
9676
'res.users',
9777
"Last Contributor",
98-
select=True,
9978
readonly=True
10079
)
10180

document_page/models/document_page_history.py

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
# -*- coding: utf-8 -*-
2-
##############################################################################
3-
#
4-
# OpenERP, Open Source Management Solution
5-
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6-
#
7-
# This program is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU Affero General Public License as
9-
# published by the Free Software Foundation, either version 3 of the
10-
# License, or (at your option) any later version.
11-
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU Affero General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU Affero General Public License
18-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19-
#
20-
##############################################################################
2+
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
215
import logging
226
import difflib
23-
from openerp import models, fields, _
7+
from odoo import fields, models
8+
from odoo.tools.translate import _
249

2510
_logger = logging.getLogger(__name__)
2611

@@ -34,7 +19,7 @@ class DocumentPageHistory(models.Model):
3419
_rec_name = "create_date"
3520

3621
page_id = fields.Many2one('document.page', 'Page')
37-
summary = fields.Char('Summary', select=True)
22+
summary = fields.Char('Summary', index=True)
3823
content = fields.Text("Content")
3924
create_date = fields.Datetime("Date")
4025
create_uid = fields.Many2one('res.users', "Modified By")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<odoo>
3-
<data noupdate="0">
4-
<record id="base.group_document_user" model="res.groups">
3+
4+
<record id="knowledge.group_document_user" model="res.groups">
55
<field name="users" eval="[(4, ref('base.user_root'))]"/>
66
</record>
7-
</data>
7+
88
</odoo>

0 commit comments

Comments
 (0)