[MIG] document_page_approval

This commit is contained in:
Leonardo Donelli 2016-12-22 12:43:02 +01:00 committed by Maxime Chambreuil
parent afbab2fb29
commit c95ce9eae5
21 changed files with 212 additions and 323 deletions

View File

@ -1,44 +1,40 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
====================== ======================
Document Page Approval Document Page Approval
====================== ======================
This module adds a workflow to approve page modification and show the approved This module adds a workflow to approve page modifications and show the approved version by default.
version by default.
Installation Installation
============ ============
Makes the document page approval available from where some users can approved the modifications No specific installation required.
made by others users in documents that required approvement.
Configuration Configuration
============= =============
No configuration required * Set a valid email address on the company settings.
* Go to Knowledge > Categories.
* Create a new page category and set an approver group. Make sure users belonging to that group have valid email
addresses.
Usage Usage
===== =====
To use this module, you need to: To use this module, you need to:
* Set a valid email address on the company settings. * Go to Knowledge > Pages
* go to knowledge > Categories.
* Create a new page category and set an approver group. Make sure users
belonging to that group have valid email addresses.
* go to knowledge > Pages
* Create a new page and choose the previously created category. * Create a new page and choose the previously created category.
* A notification is sent to the group with a link to the page history to * A notification is sent to the approvers group with a link to the page history to review.
review.
* Depending on the review, the page history is approved or not. * Depending on the review, the page history is approved or not.
* Users reading the page see the last approved version. * Users reading the page see the last approved version.
.. 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
====================== ======================
@ -50,8 +46,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/ Bugs are tracked on `GitHub Issues <https://github.com/OCA/
knowledge/issues>`_. 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_approval%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 smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/knowledge/issues/new?body=module:%20document_page_approval%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits Credits
======= =======
@ -62,13 +57,14 @@ Contributors
* Odoo SA <info@odoo.com> * Odoo SA <info@odoo.com>
* Savoir-faire Linux <support@savoirfairelinux.com> * Savoir-faire Linux <support@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com> * Gervais Naoussi <gervaisnaoussi@gmail.com>
* Maxime Chambreuil <mchambreuil@ursainfosystems.com>
Maintainer Maintainer
---------- ----------
.. image:: https://odoo-community.org/logo.png .. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association :alt: Odoo Community Association
:target: https://odoo-community.org :target: https://odoo-community.org
This module is maintained by the OCA. This module is maintained by the OCA.
@ -76,13 +72,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.
Changelog
---------
v9.0.1.0.0
Here are the modification that have been done:
* The module does no depends anymore on email_template but on mail module

View File

@ -1,21 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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

View File

@ -1,33 +1,15 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 Approval', 'name': 'Document Page Approval',
'version': '9.0.1.0.0', 'version': '10.0.1.0.0',
"author": "Savoir-faire Linux,Odoo Community Association (OCA)", "author": "Savoir-faire Linux, Odoo Community Association (OCA)",
"website": "http://www.savoirfairelinux.com", "website": "http://www.savoirfairelinux.com",
"license": "AGPL-3", "license": "AGPL-3",
'category': 'Knowledge Management', 'category': 'Knowledge Management',
'depends': [ 'depends': [
'knowledge',
'document_page', 'document_page',
'mail', 'mail',
], ],
@ -38,8 +20,6 @@
'security/document_page_security.xml', 'security/document_page_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
], ],
'installable': False,
'auto_install': False,
'images': [ 'images': [
'images/category.png', 'images/category.png',
'images/page_history_list.png', 'images/page_history_list.png',

View File

@ -1,20 +1,17 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<odoo> <odoo noupdate="1">
<!-- Allow user to make upgrade-proof customizations to email template --> <!-- Allow user to make upgrade-proof customizations to email template -->
<record id="email_template_new_draft_need_approval" model="mail.template">
<data noupdate="1"> <field name="name">Automated new draft need approval Notification Mail</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost.com'}</field>
<record id="email_template_new_draft_need_approval" model="mail.template"> <field name="subject">New version of "${object.page_id.name}" to approve</field>
<field name="name">Automated new draft need approval Notification Mail</field> <field name="email_to">${object.get_approvers_email}</field>
<field name="email_from">${object.create_uid.company_id.email or 'noreply@localhost.com'}</field> <field name="model_id" ref="model_document_page_history"/>
<field name="subject">New version of "${object.page_id.name}" to approve</field> <field name="auto_delete" eval="True"/>
<field name="email_to">${object.get_approvers_email}</field> <field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="model_id" ref="model_document_page_history"/> <field name="body_html">
<field name="auto_delete" eval="True"/> <![CDATA[
<field name="lang">${object.create_uid.partner_id.lang}</field>
<field name="body_html">
<![CDATA[
<p>Hello,</p> <p>Hello,</p>
<p>The page "${object.page_id.name}" has been modified and need your approval.</p> <p>The page "${object.page_id.name}" has been modified and need your approval.</p>
@ -24,8 +21,7 @@
<p>Have a great day.<br/> <p>Have a great day.<br/>
--<br/> --<br/>
Odoo</p>]]> Odoo</p>]]>
</field> </field>
</record> </record>
</data>
</odoo> </odoo>

View File

@ -1,23 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 from openerp import models, fields, api

View File

@ -1,28 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# 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 datetime import datetime from datetime import datetime
from openerp.tools.translate import _ from odoo.tools.translate import _
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp import models, fields, api from odoo import api, fields, models
class DocumentPageHistoryWorkflow(models.Model): class DocumentPageHistoryWorkflow(models.Model):

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data noupdate="0">
<record id="group_document_approver_user" model="res.groups"> <record id="group_document_approver_user" model="res.groups">
<field name="name">Document approver</field> <field name="name">Document approver</field>
<field name="users" eval="[(4, ref('base.user_root'))]"/> <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record> </record>
</data>
</odoo> </odoo>

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<odoo> <odoo>
<record id="wiki_history_form_inherit" model="ir.ui.view"> <record id="wiki_history_form_inherit" model="ir.ui.view">
<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>
@ -88,4 +89,5 @@
</field> </field>
</field> </field>
</record> </record>
</odoo> </odoo>

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<odoo> <odoo>
<record model="workflow" id="wkf_document_page_history_aproval"> <record model="workflow" id="wkf_document_page_history_aproval">
<field name="name">document.page.history.aproval.wkf</field> <field name="name">document.page.history.aproval.wkf</field>
<field name="osv">document.page.history</field> <field name="osv">document.page.history</field>
@ -35,4 +36,5 @@
<field name="act_to" ref="act_draft" /> <field name="act_to" ref="act_draft" />
<field name="signal">edit</field> <field name="signal">edit</field>
</record> </record>
</odoo> </odoo>

View File

@ -27,14 +27,13 @@ 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/repo/118/9.0 :target: https://runbot.odoo-community.org/runbot/repo/118/10.0
Known issues / Roadmap Known issues / Roadmap
====================== ======================
* Add options for other OCA extension modules as they are made available. * Migrate related modules to v10 and add options in the settings as soon as they are installable
* `Migrate CMIS modules to version 9 <https://github.com/OCA/connector-cmis/issues/8>`_
Bug Tracker Bug Tracker
=========== ===========
@ -45,7 +44,7 @@ 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/ 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:%20 knowledge/issues/new?body=module:%20
knowledge%0Aversion:%20 knowledge%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. 10.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits Credits
@ -57,6 +56,8 @@ Contributors
* Odoo SA <info@odoo.com> * Odoo SA <info@odoo.com>
* Savoir-faire Linux <support@savoirfairelinux.com> * Savoir-faire Linux <support@savoirfairelinux.com>
* Gervais Naoussi <gervaisnaoussi@gmail.com> * Gervais Naoussi <gervaisnaoussi@gmail.com>
* Leonardo Donelli <leonardo.donelli@monksoftware.it>
* Maxime Chambreuil <mchambreuil@ursainfosystems.com>
Maintainer Maintainer
---------- ----------
@ -72,11 +73,3 @@ 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 http://odoo-community.org.
Changelog
---------
v9.0.1.0.0
This module is an official module but was not present in odoo 9.0 official repository
so we took it from Odoo 8.0 repository and add it here.

View File

@ -1,23 +1,5 @@
"""Import of model's module."""
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2004-2009 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-2009 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

View File

@ -1,38 +1,21 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2004-2009 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-2009 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": "Knowledge Management System", "name": "Knowledge Management System",
"version": "9.0.1.1.0", "version": "10.0.1.0.0",
"depends": ["base_setup"], "author": "OpenERP SA, MONK Software, Odoo Community Association (OCA)",
"author": "OpenERP SA, Odoo Community Association (OCA)", "category": "Knowledge",
"category": "Hidden/Dependency",
"license": "AGPL-3", "license": "AGPL-3",
"website": "https://www.odoo.com", "website": "https://odoo-community.org/",
"depends": ["base"],
"data": [ "data": [
"data/ir_module_category.xml",
"security/knowledge_security.xml", "security/knowledge_security.xml",
"security/ir.model.access.csv",
"views/knowledge.xml", "views/knowledge.xml",
"views/res_config.xml", "views/res_config.xml",
], ],
"demo": ["demo/knowledge.xml"], "demo": ["demo/knowledge.xml"],
'installable': False, "installable": True,
"auto_install": False, "auto_install": False,
} }

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.module.category" id="module_category_knowledge">
<field name="name">Knowledge</field>
<field name="description">Manage documents and knowledge-related applications</field>
<field name="sequence">30</field>
</record>
</odoo>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo noupdate="1">
<data noupdate="0">
<record id="base.user_demo" model="res.users"> <record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4,ref('base.group_document_user'))]"/> <field name="groups_id" eval="[(4,ref('base.group_document_user'))]"/>
</record> </record>
</data>
</odoo> </odoo>

View File

@ -1,23 +1,6 @@
"""model's module imported."""
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2004-2009 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-2009 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 ir_attachment
from . import res_config from . import res_config

View File

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
# Add index to res_model because filtering on it is a common use case
res_model = fields.Char(index=True)

View File

@ -1,30 +1,11 @@
"""KnowledgeConfigSettings class."""
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
############################################################################## # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# 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 odoo import fields, models
class KnowledgeConfigSettings(models.TransientModel): class KnowledgeConfigSettings(models.TransientModel):
"""This class in needed to activate document management."""
_name = 'knowledge.config.settings' _name = 'knowledge.config.settings'
_inherit = 'res.config.settings' _inherit = 'res.config.settings'
@ -38,24 +19,24 @@ class KnowledgeConfigSettings(models.TransientModel):
module_document_page = fields.Boolean( module_document_page = fields.Boolean(
'Manage document pages (Wiki)', 'Manage document pages (Wiki)',
help='Provide document page and category as a wiki.\n' help='Provide document page and category as a wiki.\n'
'- This installs the module document_page.' '- This installs the module document_page.'
) )
module_document_page_approval = fields.Boolean( module_document_page_approval = fields.Boolean(
'Manage documents approval', 'Manage documents approval',
help='Add workflow on documents per category.\n' help='Add workflow on documents per category.\n'
'- This installs the module document_page_approval.' '- This installs the module document_page_approval.'
) )
module_cmis_read = fields.Boolean( module_cmis_read = fields.Boolean(
'Attach files from an external DMS into Odoo', 'Attach files from an external DMS into Odoo',
help='Connect Odoo with a CMIS compatible server to attach files\n' help='Connect Odoo with a CMIS compatible server to attach files\n'
'to an Odoo record.\n' 'to an Odoo record.\n'
'- This installs the module cmis_read.' '- This installs the module cmis_read.'
) )
module_cmis_write = fields.Boolean( module_cmis_write = fields.Boolean(
'Store attachments in an external DMS instead of the Odoo Filestore', 'Store attachments in an external DMS instead of the Odoo Filestore',
help='Connect Odoo with a CMIS compatible server to store files.\n' help='Connect Odoo with a CMIS compatible server to store files.\n'
'- This installs the module cmis_write.' '- This installs the module cmis_write.'
) )

View File

@ -1,3 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_attachment_sale_manager,ir_attachment manager,base.model_ir_attachment,base.group_sale_manager,1,1,1,1
access_ir_attachment_partner_manager,ir_attachment_partner manager,base.model_ir_attachment,base.group_partner_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ir_attachment_sale_manager ir_attachment manager base.model_ir_attachment base.group_sale_manager 1 1 1 1
3 access_ir_attachment_partner_manager ir_attachment_partner manager base.model_ir_attachment base.group_partner_manager 1 1 1 1

View File

@ -1,12 +1,10 @@
<?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="base.group_document_user" model="res.groups">
<field name="name">User</field> <field name="name">Knowledge user</field>
<field name="category_id" ref="base.module_category_knowledge_management"/> <field name="category_id" ref="module_category_knowledge"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/> <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record> </record>
</data>
</odoo> </odoo>

View File

@ -1,18 +1,53 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data>
<!-- Top menu item --> <record id="knowledge_action_documents" model="ir.actions.act_window">
<menuitem name="Knowledge" <field name="name">Documents</field>
id="knowledge.menu_document" <field name="res_model">ir.attachment</field>
groups="base.group_system,base.group_document_user" <field name="view_mode">kanban,tree,form</field>
sequence="116"/> <field name="context">{'search_default_user_documents': True}</field>
</record>
<menuitem name="Configuration" id="knowledge.menu_document_configuration"
parent="knowledge.menu_document" sequence="50"/>
<menuitem name="Collaborative Content" id="knowledge.menu_document2" <record id="ir_attachment_view_user_documents" model="ir.ui.view">
parent="knowledge.menu_document"/> <field name="name">Documents search view: additional filters</field>
<field name="model">ir.attachment</field>
<field name="inherit_id" ref="base.view_attachment_search"/>
<field name="arch" type="xml">
<search>
<field name="res_model"/>
<field name="index_content"/>
<filter name="user_documents" string="Documents"
domain="[('res_model', 'not like', 'ir.%'), ('res_model', '!=', False)]"/>
<group string="Group by">
<filter name="group_model" string="Model" context="{'group_by': 'res_model'}"/>
</group>
</search>
</field>
</record>
<!-- Top menu item -->
<menuitem
id="menu_document_root"
name="Knowledge"
groups="base.group_system,base.group_document_user"
sequence="116"/>
<menuitem
id="menu_document_configuration"
name="Configuration"
parent="menu_document_root"
sequence="50"/>
<menuitem
id="menu_document_section"
name="Documents"
parent="menu_document_root"/>
<menuitem
id="menu_document"
name="Documents"
action="knowledge_action_documents"
parent="menu_document_section"/>
</data>
</odoo> </odoo>

View File

@ -1,65 +1,63 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data>
<record id="view_knowledge_configuration" model="ir.ui.view"> <record id="view_knowledge_configuration" model="ir.ui.view">
<field name="name">Configure Knowledge</field> <field name="name">Configure Knowledge</field>
<field name="model">knowledge.config.settings</field> <field name="model">knowledge.config.settings</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Configure Knowledge" class= "oe_form_configuration"> <form string="Configure Knowledge" class= "oe_form_configuration">
<header> <header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/> <button string="Apply" type="object" name="execute" class="oe_highlight"/>
or or
<button string="Cancel" type="object" name="cancel" class="oe_link"/> <button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header> </header>
<separator string="Knowledge and Documents Management"/> <separator string="Knowledge and Documents Management"/>
<group> <group>
<label for="id" string="Documents"/> <label for="id" string="Documents"/>
<div> <div>
<div> <div>
<field name="module_document" class="oe_inline"/> <field name="module_document" class="oe_inline"/>
<label for="module_document"/> <label for="module_document"/>
</div> </div>
<div> <div>
<field name="module_document_page" class="oe_inline"/> <field name="module_document_page" class="oe_inline"/>
<label for="module_document_page"/> <label for="module_document_page"/>
</div> </div>
<div> <div>
<field name="module_document_page_approval" class="oe_inline"/> <field name="module_document_page_approval" class="oe_inline"/>
<label for="module_document_page_approval"/> <label for="module_document_page_approval"/>
</div> </div>
</div> </div>
</group> </group>
<separator string="Connect with an external DMS"/> <separator string="Connect with an external DMS"/>
<group> <group>
<label for="id" string="Using CMIS"/> <label for="id" string="Using CMIS"/>
<div> <div>
<div> <div>
<field name="module_cmis_read" class="oe_inline"/> <field name="module_cmis_read" class="oe_inline"/>
<label for="module_cmis_read"/> <label for="module_cmis_read"/>
</div> </div>
<div> <div>
<field name="module_cmis_write" class="oe_inline"/> <field name="module_cmis_write" class="oe_inline"/>
<label for="module_cmis_write"/> <label for="module_cmis_write"/>
</div> </div>
</div> </div>
</group> </group>
</form> </form>
</field> </field>
</record> </record>
<record id="action_knowledge_configuration" model="ir.actions.act_window"> <record id="action_knowledge_configuration" model="ir.actions.act_window">
<field name="name">Configure Knowledge</field> <field name="name">Configure Knowledge</field>
<field name="res_model">knowledge.config.settings</field> <field name="res_model">knowledge.config.settings</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="target">inline</field> <field name="target">inline</field>
</record> </record>
<menuitem id="menu_knowledge_configuration" <menuitem id="menu_knowledge_configuration"
name="Settings" name="Settings"
parent="knowledge.menu_document_configuration" parent="knowledge.menu_document_configuration"
sequence="19" sequence="19"
action="action_knowledge_configuration"/> action="action_knowledge_configuration"/>
</data>
</odoo> </odoo>