Skip to content

Commit

Permalink
[FIX] web_calendar: translation for title on calendar form
Browse files Browse the repository at this point in the history
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
  • Loading branch information
adrienpeiffer authored and mart-e committed Feb 17, 2017
1 parent 5de7500 commit a587fde
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions addons/web_calendar/static/src/js/web_calendar.js
Expand Up @@ -954,13 +954,7 @@ openerp.web_calendar = function(instance) {
this.data_template = data_template || {}; this.data_template = data_template || {};
}, },
get_title: function () { get_title: function () {
var parent = this.getParent(); var title = (this.options.action)? this.options.action.name : '';
if (_.isUndefined(parent)) {
return _t("Create");
}
var title = (_.isUndefined(parent.field_widget)) ?
(parent.string || parent.name) :
parent.field_widget.string || parent.field_widget.name || '';
return _t("Create: ") + title; return _t("Create: ") + title;
}, },
start: function () { start: function () {
Expand Down

0 comments on commit a587fde

Please sign in to comment.