Permalink
Browse files

[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
  • Loading branch information...
1 parent 5de7500 commit a587fde991c7b3dfdffe1310d7800c210764f866 @adrienpeiffer adrienpeiffer committed with mart-e Jan 24, 2017
Showing with 1 addition and 7 deletions.
  1. +1 −7 addons/web_calendar/static/src/js/web_calendar.js
@@ -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 () {

0 comments on commit a587fde

Please sign in to comment.