Skip to Content
Menu
This question has been flagged
2584 Views

I'm using model bus.bus for get notification. It works fine in local systems. When i moved to production server its not working. thank 

Avatar
Discard

Can you share your code and config please? I need to make it work locally but is not working for me. I have this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 644, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 302, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'bus.bus' object has no attribute 'sendone'

Author
Hello
You can using like this request.env['bus.bus'].sendone((self._cr.dbname, 'res.partner', self.env.user.partner_id.id),
                    {'type': 'simple_notification', 'title': 'Missing Success', 'message': message_success, 'sticky': True, 'warning': False}) for odoo12 and this title = _("Connection Test Succeeded!")
            message = _("Everything seems properly set up!")
            return {
                'type': 'ir.actions.client',
                'tag': 'display_notification',
                'params': {
                    'title': title,
                    'message': message,
                }
            }
  For odoo 14 
Thank             

On Fri, Apr 8, 2022, 18:44 Reinaldo Menendez <notifications@mail.odoo.com> wrote:

Can you share your code and config please? I need to make it work locally but is not working for me. I have this error:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 644, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 302, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'bus.bus' object has no attribute 'sendone'

Gesendet durch Odoo S.A. in benutzung Odoo.