Samus CTO (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-create-record-also-create-write-date-cto
 into lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-create-record-also-create-write-date-cto/+merge/99041

Unix like Modification time/Creation time

This small adjustment facilitate the way to get the last update date and uid.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-create-record-also-create-write-date-cto/+merge/99041
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-create-record-also-create-write-date-cto.
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py	2012-03-22 16:45:40 +0000
+++ openerp/osv/orm.py	2012-03-23 15:13:32 +0000
@@ -4170,9 +4170,9 @@
                     and vals[field]:
                 self._check_selection_field_value(cr, user, field, vals[field], context=context)
         if self._log_access:
-            upd0 += ',create_uid,create_date'
-            upd1 += ",%s,(now() at time zone 'UTC')"
-            upd2.append(user)
+            upd0 += ',create_uid,create_date,write_uid,write_date'
+            upd1 += ",%s,(now() at time zone 'UTC'),%s,(now() at time zone 'UTC')"
+            upd2.extend((user, user))
         cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
         self.check_access_rule(cr, user, [id_new], 'create', context=context)
         upd_todo.sort(lambda x, y: self._columns[x].priority-self._columns[y].priority)

_______________________________________________
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

Reply via email to