콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

i am using docker on docker i exposed port 8069 and 8072 and added http_port 8069, longpolling_port = False, gevent_port 8072 odoo config but i am getting this error even though i removed it is still same on server not local. Also  on local i am trying to send notification based on my condition and created some test function but the other user is not receiving the notification and i checked the database and it was created. my function is this def trigger_test_notif(self):

self.ensure_one()

user_ids = [2, 6]

current_user_id = self.env.uid


message_body = _("This is a test message to another user")


_logger.info("Triggering notification for users: %s", user_ids)


for uid in user_ids:

_logger.info("Sending bus notification to user_id=%s", uid)

self.env['bus.bus'].sudo()._sendone(uid, "display_notification", {

'title': _("Test Notification"),

'message': message_body,

'sticky': False,

'type': "success",

})


for uid in user_ids:

partner_id = self.env['res.users'].sudo().browse(uid).partner_id.id

_logger.info("Creating persistent mail.message for partner_id=%s", partner_id)

self.sudo().env['mail.message'].create({

'message_type': 'notification',

'subtype_id': self.env.ref('mail.mt_note').id,

'subject': _("Test Notification"),

'body': message_body,

'res_id': self.id,

'model': self._name,

'partner_ids': [(4, partner_id)],

})


if current_user_id not in user_ids:

user_ids.append(current_user_id)


return {

'type': 'ir.actions.client',

'tag': 'display_notification',

'params': {

'title': _("Test Notification"),

'message': message_body,

'sticky': False,

'type': "success",

}

}


아바타
취소
관련 게시물 답글 화면 활동
2
9월 25
490
2
7월 25
1086
0
7월 24
31
2
9월 25
2036
1
3월 25
1599