[FIX] web_kanban: creation of a "team.user"

When creating a team.user record, there was an error to generate an url
for the image because the attribute "__last_update" didn't exist
on the record.

opw:653725
This commit is contained in:
Goffin Simon
2015-11-12 10:39:04 +01:00
parent 6a5dadd291
commit 1db1446c60
@@ -129,7 +129,7 @@ var KanbanRecord = Widget.extend({
if (!id) { id = undefined; }
if (options.preview_image)
field = options.preview_image;
var unique = this.record.__last_update.value.replace(/[^0-9]/g, '');
var unique = this.record.__last_update && this.record.__last_update.value.replace(/[^0-9]/g, '');
url = session.url('/web/image', {model: model, field: field, id: id, unique: unique});
if (cache !== undefined) {
// Set the cache duration in seconds.