Skip to content

Commit eac20f6

Browse files
committed
wip
1 parent d5d1dee commit eac20f6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

addons/mail/models/res_users.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -671,21 +671,20 @@ def _get_current_persona(self):
671671
return (self.env.user, self.env["mail.guest"])
672672

673673
def _notify_devices(self, title='Odoo', body='', force_direct_send=False, **kw):
674+
self.ensure_one()
674675
devices, private_key, public_key = self.env['mail.thread']._web_push_get_partners_parameters(self.partner_id.ids)
675676
if devices:
676677
extra_data = kw.pop('data', {})
677678
data = {
678679
'author_name': self.env.ref('base.partner_root').display_name,
679680
'model': 'res.partner',
680-
'res_id': self.partner_id.id, # should work in batch! devices can have different partner_id field values -> group by partner_id?
681+
'res_id': self.partner_id.id,
681682
} | extra_data
682683
payload = {
683684
'title': title,
684685
'options': {
685686
'vibrate': [100, 50, 100],
686-
'tag': f'{data['model']}_{data['res_id']}',
687-
'body': body,
688-
# 'icon': icon or '/web/static/img/odoo-icon-192x192.png',
687+
'icon': '/web/static/img/odoo-icon-192x192.png',
689688
'data': data,
690689
} | kw
691690
}

addons/web/static/src/webclient/webclient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class WebClient extends Component {
7777

7878
if (matchingMenus.length > 0) {
7979
// Use sessionStorage context to determine the correct menu
80-
menuId = matchingMenus.find(m =>
80+
menuId = matchingMenus.find(m =>
8181
m.appID === storedMenuId
8282
)?.appID;
8383
if (!menuId) {

0 commit comments

Comments
 (0)