Wiki Page should start keeping History from the creating of page

Bug #345248 reported by Mantavya Gajjar (Open ERP)
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Mantavya Gajjar (Open ERP)

Bug Description

Wiki Page should start keeping History from the creating of page and not from the first changes of the pages

* if this is the case we will not be able to see the difference form the first page of the wiki and not from the first changed
it can be fixed by the following code

=== modified file 'wiki/wiki.py'
--- wiki/wiki.py 2009-02-04 13:12:10 +0000
+++ wiki/wiki.py 2009-03-19 06:16:39 +0000
@@ -105,6 +105,20 @@
     def copy_data(self, cr, uid, id, default=None, context=None):
         return super(Wiki, self).copy_data(cr, uid, id, {'wiki_id':False}, context)

+ def create(self, cr, uid, vals, context=None):
+ id = super(Wiki,self).create(cr, uid, vals, context)
+ history = self.pool.get('wiki.wiki.history')
+ if vals.get('text_area'):
+ res = {
+ 'minor_edit':vals.get('minor_edit', True),
+ 'text_area':vals.get('text_area',''),
+ 'write_uid':uid,
+ 'wiki_id' : id,
+ 'summary':vals.get('summary','')
+ }
+ history.create(cr, uid, res)
+ return id
+
     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')

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

already fixed in trunk

Changed in openobject-addons:
assignee: nobody → mga
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.