[FIX] web_calendar: translation for title on calendar form

The previous code (`parent.field_widget.string`) was returning the untranslated
action name (and why use parent anyway?)

Use the action name instead.

Closes #15207
opw-705938
This commit is contained in:
Adrien Peiffer (ACSONE) 2017-01-24 16:19:16 +01:00 committed by Martin Trigaux
parent 5de7500a41
commit a587fde991
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 1 additions and 7 deletions

View File

@ -954,13 +954,7 @@ openerp.web_calendar = function(instance) {
this.data_template = data_template || {};
},
get_title: function () {
var parent = this.getParent();
if (_.isUndefined(parent)) {
return _t("Create");
}
var title = (_.isUndefined(parent.field_widget)) ?
(parent.string || parent.name) :
parent.field_widget.string || parent.field_widget.name || '';
var title = (this.options.action)? this.options.action.name : '';
return _t("Create: ") + title;
},
start: function () {