summaryrefslogtreecommitdiff
path: root/addons/mail
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-09 21:07:44 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-09 21:07:44 +0200
commitcc3a2c1bf3c8aa2a7f85b5c2f8eb4e9415f3e6c7 (patch)
treef97b6171e54f052126a1fad2f55a33c603e18bef /addons/mail
parent92cb648882082cc8d84d3bbe75304def5196998c (diff)
parente11bacfe512a3170f44d6d43646af914a9cf3b73 (diff)
[MERGE] forward port branch 12.0 up to e11bacfe512
Diffstat (limited to 'addons/mail')
-rw-r--r--addons/mail/models/ir_actions.py7
-rw-r--r--addons/mail/static/src/js/chatter.js2
-rw-r--r--addons/mail/static/src/scss/followers.scss1
3 files changed, 5 insertions, 5 deletions
diff --git a/addons/mail/models/ir_actions.py b/addons/mail/models/ir_actions.py
index 40582b1d803..56f60069024 100644
--- a/addons/mail/models/ir_actions.py
+++ b/addons/mail/models/ir_actions.py
@@ -70,7 +70,7 @@ class ServerActions(models.Model):
@api.model
def run_action_followers_multi(self, action, eval_context=None):
- Model = self.env[action.model_id.model]
+ Model = self.env[action.model_name]
if self.partner_ids or self.channel_ids and hasattr(Model, 'message_subscribe'):
records = Model.browse(self._context.get('active_ids', self._context.get('active_id')))
records.message_subscribe(self.partner_ids.ids, self.channel_ids.ids)
@@ -83,7 +83,7 @@ class ServerActions(models.Model):
When need to know it to skip these steps.
Except if the computed field is supposed to trigger the action
"""
- records = self.env[action.model_id.model].browse(
+ records = self.env[action.model_name].browse(
self._context.get('active_ids', self._context.get('active_id')))
old_values = action._context.get('old_values')
if old_values:
@@ -112,6 +112,7 @@ class ServerActions(models.Model):
# with wrong values in subsequent operations
cleaned_ctx = dict(self.env.context)
cleaned_ctx.pop('default_type', None)
+ cleaned_ctx.pop('default_parent_id', None)
action.template_id.with_context(cleaned_ctx).send_mail(self._context.get('active_id'), force_send=False, raise_exception=False)
return False
@@ -120,7 +121,7 @@ class ServerActions(models.Model):
if not action.activity_type_id or not self._context.get('active_id') or self._is_recompute(action):
return False
- records = self.env[action.model_id.model].browse(self._context.get('active_ids', self._context.get('active_id')))
+ records = self.env[action.model_name].browse(self._context.get('active_ids', self._context.get('active_id')))
vals = {
'summary': action.activity_summary or '',
diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js
index 5f9b11198e3..dc23354fe7b 100644
--- a/addons/mail/static/src/js/chatter.js
+++ b/addons/mail/static/src/js/chatter.js
@@ -365,7 +365,7 @@ var Chatter = Widget.extend({
this._fetchAttachments().then(this._openAttachmentBox.bind(this));
}
if (this.fields.thread) {
- this.trigger_up('reload', { fieldNames: ['message_attachment_count'] });
+ this.trigger_up('reload', { fieldNames: ['message_attachment_count'], keepChanges: true });
}
},
/**
diff --git a/addons/mail/static/src/scss/followers.scss b/addons/mail/static/src/scss/followers.scss
index 934df9b7acc..6ac15cb7c9d 100644
--- a/addons/mail/static/src/scss/followers.scss
+++ b/addons/mail/static/src/scss/followers.scss
@@ -31,7 +31,6 @@
}
.o_followers_follow_button {
- width: 85px;
padding-right: 0;
color: $body-color;
font-weight: bold;