bzr revid: fp@tinyerp.com-20101004185849-ytfugaxlhfd291ci
This commit is contained in:
Fabien Pinckaers
2010-10-04 20:58:49 +02:00
parent 3fe4d84627
commit 12ca3adb51
+4 -1
View File
@@ -620,7 +620,10 @@ class task(osv.osv):
def do_open(self, cr, uid, ids, *args):
tasks= self.browse(cr,uid,ids)
for t in tasks:
self.write(cr, uid, [t.id], {'state': 'open', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),})
data = {'state': 'open'}
if not t.date_start:
data['date_start'] = time.strftime('%Y-%m-%d %H:%M:%S')
self.write(cr, uid, [t.id], data)
message = _('Task ') + " '" + t.name + "' "+ _("is Open.")
self.log(cr, uid, t.id, message)
return True