Jagdish Panchal (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-v62_knowledge_config-jap into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_knowledge_config-jap/+merge/100924
Hello,
[ADD]: Added new configuration wizard for Knowledge application.
Thanks,
JAP
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_knowledge_config-jap/+merge/100924
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-v62_knowledge_config-jap into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
=== modified file 'document/__init__.py'
--- document/__init__.py 2011-01-14 00:11:01 +0000
+++ document/__init__.py 2012-04-05 07:34:56 +0000
@@ -28,5 +28,6 @@
import document
import report
import wizard
+import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'document/__openerp__.py'
--- document/__openerp__.py 2012-01-31 13:36:57 +0000
+++ document/__openerp__.py 2012-04-05 07:34:56 +0000
@@ -55,6 +55,7 @@
'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': [
=== added file 'document/res_config.py'
--- document/res_config.py 1970-01-01 00:00:00 +0000
+++ document/res_config.py 2012-04-05 07:34:56 +0000
@@ -0,0 +1,39 @@
+# -*- 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."""),
+ '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
=== added file 'document/res_config_view.xml'
--- document/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ document/res_config_view.xml 2012-04-05 07:34:56 +0000
@@ -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="4" col="4">
+ <field name="module_wiki_quality_manual"/>
+ <field name="module_wiki_faq"/>
+ </group>
+ <separator string="Documents" colspan="4"/>
+ <group colspan="4" col="4">
+ <field name="module_document_webdav"/>
+ <field name="module_document_ftp"/>
+ </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="7" action="action_knowledge_configuration"/>
+
+ </data>
+</openerp>
=== modified file 'document_ftp/__init__.py'
--- document_ftp/__init__.py 2011-10-11 20:05:49 +0000
+++ document_ftp/__init__.py 2012-04-05 07:34:56 +0000
@@ -20,7 +20,7 @@
##############################################################################
import ftpserver
import wizard
-
+import res_config
post_load = ftpserver.start_server
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'document_ftp/__openerp__.py'
--- document_ftp/__openerp__.py 2012-01-31 13:36:57 +0000
+++ document_ftp/__openerp__.py 2012-04-05 07:34:56 +0000
@@ -40,7 +40,8 @@
'update_xml': [
'wizard/ftp_configuration_view.xml',
'wizard/ftp_browse_view.xml',
- 'security/ir.model.access.csv'
+ 'security/ir.model.access.csv',
+ 'res_config_view.xml',
],
'demo_xml': [],
'test': [
=== added file 'document_ftp/res_config.py'
--- document_ftp/res_config.py 1970-01-01 00:00:00 +0000
+++ document_ftp/res_config.py 2012-04-05 07:34:56 +0000
@@ -0,0 +1,49 @@
+# -*- 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
+from tools import config
+
+class documnet_ftp_setting(osv.osv_memory):
+ _name = 'knowledge.configuration'
+ _inherit = 'knowledge.configuration'
+ _columns = {
+ 'url': fields.char('Browse Documents',size=64,
+ help ="""It allow to browse the document from the relative URL""", readonly=True),
+ }
+
+ def get_default_ftp_config(self, cr, uid, ids, context=None):
+ ir_values = self.pool.get('ir.actions.url')
+ user_pool = self.pool.get('res.users')
+ current_user = user_pool.browse(cr, uid, uid, context=context)
+ data_pool = self.pool.get('ir.model.data')
+ aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
+ aid = data_pool.browse(cr, uid, aid, context=context).res_id
+ ftp_url = self.pool.get('ir.actions.url').browse(cr, uid, aid, context=context)
+ url = ftp_url.url and ftp_url.url.split('ftp://') or []
+ if url:
+ url = url[1]
+ if url[-1] == '/':
+ url = url[:-1]
+ else:
+ url = '%s:%s' %(ftpserver.HOST, ftpserver.PORT)
+ return {'url':'ftp://%s@%s'%(current_user.login, url)}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
=== added file 'document_ftp/res_config_view.xml'
--- document_ftp/res_config_view.xml 1970-01-01 00:00:00 +0000
+++ document_ftp/res_config_view.xml 2012-04-05 07:34:56 +0000
@@ -0,0 +1,18 @@
+<openerp>
+ <data>
+
+ <record id="view_document_ftp_configuration" model="ir.ui.view">
+ <field name="name">Knowledge Application</field>
+ <field name="model">knowledge.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="document.view_knowledge_configuration"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='module_document_ftp']" position="after">
+ <group colspan="2" col="2">
+ <field name="url" widget="url" colspan="2"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp