[FIX] mail: action button translation
- Install a language other than English, set it to your user. - On any model, send a message (the recipient should be a user, not a simple portal user). - The recipient receives a notification with a primary button half translated, for example "Vue Task". When the call is performed to method `message_post`, the sessioon context is not added to the RPC request. Therefore, when the model name is read (method `_message_notification_recipients`), it is done in the default language. Note that this is the case for any RPC request using the `call` JS function. opw-707678
This commit is contained in:
@@ -10,6 +10,7 @@ var config = require('web.config');
|
||||
var core = require('web.core');
|
||||
var form_common = require('web.form_common');
|
||||
var framework = require('web.framework');
|
||||
var pyeval = require('web.pyeval');
|
||||
var web_utils = require('web.utils');
|
||||
|
||||
var _t = core._t;
|
||||
@@ -452,10 +453,13 @@ var Chatter = form_common.AbstractField.extend({
|
||||
|
||||
_render_value: function () {
|
||||
// update context
|
||||
var context = _.extend(this.options.context || {},
|
||||
pyeval.eval('contexts', this.build_context())
|
||||
);
|
||||
this.context = _.extend({
|
||||
default_res_id: this.view.datarecord.id || false,
|
||||
default_model: this.view.model || false,
|
||||
}, this.options.context || {});
|
||||
}, context);
|
||||
this.thread_dataset = this.view.dataset;
|
||||
this.res_id = this.view.datarecord.id;
|
||||
this.record_name = this.view.datarecord.display_name;
|
||||
|
||||
Reference in New Issue
Block a user