From eb75187a73c9b0c6ba194c4af6b4fd858b089b32 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 26 Nov 2008 14:34:41 +0530 Subject: [PATCH 1/3] improve the wiki view add new wizard bzr revid: mga@tinyerp.com-20081126090441-aous9oz6aux0mq1h --- addons/wiki/wiki.py | 7 +++++-- addons/wiki/wiki_view.xml | 3 ++- addons/wiki/wizard/__init__.py | 3 ++- addons/wiki/wizard/show_diff.py | 3 ++- addons/wiki/wizard/wizard_view.xml | 6 ++++++ 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/addons/wiki/wiki.py b/addons/wiki/wiki.py index 5e1ba1b7aa6..c12ecb6c4ec 100644 --- a/addons/wiki/wiki.py +++ b/addons/wiki/wiki.py @@ -59,7 +59,7 @@ class Wiki(osv.osv): 'create_date':fields.datetime("Created on", select=True), 'write_date':fields.datetime("Last modified", select=True), 'tags':fields.char('Tags', size=1024), - 'history_id':fields.one2many('wiki.wiki.history','history_wiki_id','History Lines'), + 'history_id':fields.one2many('wiki.wiki.history','wiki_id','History Lines'), 'minor_edit':fields.boolean('Minor edit', select=True), 'summary':fields.char('Summary',size=256, select=True), 'section': fields.char('Section', size=32, help="Use page section code like 1.2.1"), @@ -85,7 +85,10 @@ class Wiki(osv.osv): 'section': section } } - + + def copy(self, cr, uid, id, default=None, context=None): + return super(Wiki, self).copy(cr, uid, id, {'wiki_id':False}, context) + def write(self, cr, uid, ids, vals, context=None): result = super(Wiki,self).write(cr, uid, ids, vals, context) history = self.pool.get('wiki.wiki.history') diff --git a/addons/wiki/wiki_view.xml b/addons/wiki/wiki_view.xml index 197bb93bbda..9d8f63cfcd0 100644 --- a/addons/wiki/wiki_view.xml +++ b/addons/wiki/wiki_view.xml @@ -4,7 +4,7 @@ - + form tree,form + {'section':'1'} + + \ No newline at end of file From 18f96b2d6e926f5c4aeb2ad7a05b698a57b2b772 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 26 Nov 2008 14:35:13 +0530 Subject: [PATCH 2/3] implement the re-indexing wizard bzr revid: mga@tinyerp.com-20081126090513-5bcp8hn70wxle2pn --- addons/wiki/wizard/make_index.py | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 addons/wiki/wizard/make_index.py diff --git a/addons/wiki/wizard/make_index.py b/addons/wiki/wizard/make_index.py new file mode 100644 index 00000000000..34a333911dd --- /dev/null +++ b/addons/wiki/wizard/make_index.py @@ -0,0 +1,65 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import time +import wizard +import osv +import pooler + +section_form = ''' +
+ +