[FIX] mail: only prevent odoobot new messages during onboarding
Before this commit, new messages from odoobot were never opening a chat window automatically. This is desirable only during the onboarding process of the user, when first logging-in, as to not bully the new user. It is not intended to prevent all new messages from odoobot. This commit fixes the issue by only preventing auto-opening of chat window of odoobot for the 1st step of the onboarding process. closes odoo/odoo#132689 Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit is contained in:
@@ -25,9 +25,13 @@ class Users(models.Model):
|
||||
return super().SELF_READABLE_FIELDS + ['odoobot_state']
|
||||
|
||||
def _init_messaging(self):
|
||||
odoobot_onboarding = False
|
||||
if self.odoobot_state in [False, 'not_initialized'] and self._is_internal():
|
||||
odoobot_onboarding = True
|
||||
self._init_odoobot()
|
||||
return super()._init_messaging()
|
||||
res = super()._init_messaging()
|
||||
res['odoobotOnboarding'] = odoobot_onboarding
|
||||
return res
|
||||
|
||||
def _init_odoobot(self):
|
||||
self.ensure_one()
|
||||
|
||||
Reference in New Issue
Block a user