[IMP] Creating new row in db also update write_date and write_uid
bzr revid: cto@openerp.com-20120323150850-26j5ht8eexue86sh
This commit is contained in:
parent
1ba39859e2
commit
25e699d72d
|
@ -4172,9 +4172,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