[MERGE] set the write_uid, write_date for the create
bzr revid: stw@openerp.com-20120912102759-di842t8uzzmm2f21
This commit is contained in:
commit
5acd867264
|
@ -4273,9 +4273,9 @@ class BaseModel(object):
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue