fix the bug for the wiki
start keeping history from the first page and from the fisrt edit bzr revid: mga@tinyerp.com-20090319062858-8p7igod7civlfjsz
This commit is contained in:
parent
c72da62763
commit
01c974e40d
|
@ -105,6 +105,20 @@ class Wiki(osv.osv):
|
|||
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')
|
||||
|
|
Loading…
Reference in New Issue