diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-05-27 08:44:15 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-05-27 12:48:21 +0000 |
| commit | 2598061be8ef8ce44f92f61bf16befb977f3030c (patch) | |
| tree | 4460e4e863d59324bf00f30fa7da5aadd8b5b8e3 /addons/im_livechat_mail_bot | |
| parent | 936d206559035627b07a25e7a0f807ad43d39f54 (diff) | |
[IMP] mail_bot: remove required on odoobot_state
Purpose is to avoid having strong requirements on fields where it is not
really necessary. In this commit we consider now that a void odoobot_state
is the same as ``not_initialized`` key. It allows to remove both the default
and required parameters on the field.
Task ID 2233014
PR #49661
Diffstat (limited to 'addons/im_livechat_mail_bot')
| -rw-r--r-- | addons/im_livechat_mail_bot/models/res_users.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/im_livechat_mail_bot/models/res_users.py b/addons/im_livechat_mail_bot/models/res_users.py index 2803dddd98e..ce1bd2668f9 100644 --- a/addons/im_livechat_mail_bot/models/res_users.py +++ b/addons/im_livechat_mail_bot/models/res_users.py @@ -6,6 +6,7 @@ from odoo import models, fields class Users(models.Model): _inherit = 'res.users' + odoobot_state = fields.Selection(selection_add=[ ('onboarding_canned', 'Onboarding canned'), - ], ondelete={'onboarding_canned': 'set default'}) + ], ondelete={'onboarding_canned': lambda users: users.write({'odoobot_state': 'disabled'})}) |
