[IMP] knowledge: add the configuration wizard
authorJagdish Panchal (Open ERP) <jap@tinyerp.com>
Fri, 23 Mar 2012 13:13:36 +0000 (18:43 +0530)
committerJagdish Panchal (Open ERP) <jap@tinyerp.com>
Fri, 23 Mar 2012 13:13:36 +0000 (18:43 +0530)
bzr revid: jap@tinyerp.com-20120323131336-88jmei14iuxh3vm8

addons/document/__init__.py
addons/document/__openerp__.py
addons/document/res_config.py [new file with mode: 0644]
addons/document/res_config_view.xml [new file with mode: 0644]

index 12306b0..fd108da 100644 (file)
@@ -28,5 +28,6 @@ import directory_report
 import document
 import report
 import wizard
+import res_config
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 6691ab5..ee34a8b 100644 (file)
@@ -55,6 +55,7 @@ ATTENTION:
         'security/ir.model.access.csv',
         'report/document_report_view.xml',
         'board_document_view.xml',
+        'res_config_view.xml',
     ],
     'demo_xml': [ 'document_demo.xml','board_document_demo.xml'],
     'test': [
diff --git a/addons/document/res_config.py b/addons/document/res_config.py
new file mode 100644 (file)
index 0000000..7bf27ae
--- /dev/null
@@ -0,0 +1,54 @@
+# -*- 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 osv import fields, osv
+
+class knowledge_configuration(osv.osv_memory):
+    _name = 'knowledge.configuration'
+    _inherit = 'res.config.settings'
+    
+    _columns = {
+        'module_wiki_quality_manual': fields.boolean('Use an internal wiki to group FAQ',
+                           help ="""
+                           It installs the wiki_quality_manual module.
+                           """),
+        'module_wiki_faq': fields.boolean('Track quality with wiki',
+                           help ="""
+                           It install the wiki_faq.
+                           """), 
+        'module_document_ftp': fields.boolean('Share repositories (FTP)',
+                           help ="""
+                           It install the document_ftp.
+                           """),
+        'server_address_port': fields.char('Server address/IP and port',size=128,
+                           help ="""
+                           It assign server address/IP and port.
+                           """),               
+        'module_document_webdav': fields.boolean('Share Repositories (WebDAV)',
+                           help ="""
+                           It install the document_webdav.
+                           """),                                   
+                             
+    }
+
+knowledge_configuration()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/document/res_config_view.xml b/addons/document/res_config_view.xml
new file mode 100644 (file)
index 0000000..0794a9e
--- /dev/null
@@ -0,0 +1,37 @@
+<openerp>
+    <data>
+
+        <record id="view_knowledge_configuration" model="ir.ui.view">
+            <field name="name">Knowledge Application</field>
+            <field name="model">knowledge.configuration</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+               <form string ="Knowledge Application">
+                   <separator string="Wiki" colspan="4"/>
+                   <group  colspan="2" col="4">
+                        <field name="module_wiki_quality_manual"/>
+                        <field name="module_wiki_faq"/>
+                   </group>
+                   <separator string="Document" colspan="4"/>
+                   <group  colspan="2" col="4">
+                        <field name="module_document_ftp"/>
+                        <field name="server_address_port"/>
+                        <field name="module_document_webdav"/>
+                   </group>                               
+                </form>
+            </field>
+        </record>
+
+        <record id="action_knowledge_configuration" model="ir.actions.act_window">
+            <field name="name">Configure Knowledge Application</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">knowledge.configuration</field>
+            <field name="view_id" ref="view_knowledge_configuration"/>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+        </record>
+
+        <menuitem id="menu_knowledge_configuration" name="Knowledge" parent="base.menu_config" sequence="5" action="action_knowledge_configuration"/>
+
+    </data>
+</openerp>