summaryrefslogtreecommitdiff
path: root/addons/im_livechat_mail_bot/models/res_users.py
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2018-08-13 18:49:19 +0200
committerXavierDo <xdo@odoo.com>2018-08-13 21:45:53 +0200
commit2df29bcfbdf8e754903b6ef3a0a7dddc00f61b08 (patch)
treec38ad750cb029e450b3a83ef0d8776fe26cb7966 /addons/im_livechat_mail_bot/models/res_users.py
parent9916e5bad3ed5eb77d2dadaa1d06949ec3b02347 (diff)
[IMP] mail_bot: make odoobot statefull
The current implementation of odoobot is stateless, making him a little dummy. Adding a state on the user allow to be sure that the user don't skip a step, or loop back to a previous step. States also allows odoobot to repeat the question when the user don't give the right answer. A quick modification asked by FP before freeze, in order to change the field type in time.
Diffstat (limited to 'addons/im_livechat_mail_bot/models/res_users.py')
-rw-r--r--addons/im_livechat_mail_bot/models/res_users.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/im_livechat_mail_bot/models/res_users.py b/addons/im_livechat_mail_bot/models/res_users.py
new file mode 100644
index 00000000000..7e4a526b897
--- /dev/null
+++ b/addons/im_livechat_mail_bot/models/res_users.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models, fields
+
+class Users(models.Model):
+ _inherit = 'res.users'
+ odoobot_state = fields.Selection(
+ selection_add=[
+ ('onboarding_canned', 'Onboarding canned'),
+ ])
+