diff options
| author | Alexandre Kühn <aku@odoo.com> | 2019-09-04 13:03:17 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2019-09-04 13:03:20 +0000 |
| commit | 66a08369741369946df219ac92b8881711fbb484 (patch) | |
| tree | dd59370096a898f356dc0d91c76df1b751ff9767 /addons/mail/models/mail_shortcode.py | |
| parent | e7aff236b8073b952a0e554d9897a8f88d5c4c91 (diff) | |
[FIX] mail: odoobot onboarding canned_response_ids
Before this commit, when user follows odoobot chat onboarding and
sends a canned response at the canned response step, odoobot did
not validate the message with the canned response.
This is caused by RPC `message_post` that filters out values that
are not message fields, such as `canned_response_ids`.
This commit fixes the issue by adding a non-stored field
`canned_response_ids` to `mail.message`. This requires the reverse
relation too, `message_ids` in `mail.shortcodes` (= the model for
canned responses).
Task-Id 2058455
closes odoo/odoo#36411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/models/mail_shortcode.py')
| -rw-r--r-- | addons/mail/models/mail_shortcode.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail/models/mail_shortcode.py b/addons/mail/models/mail_shortcode.py index 2accb271a60..70d7f90e037 100644 --- a/addons/mail/models/mail_shortcode.py +++ b/addons/mail/models/mail_shortcode.py @@ -16,3 +16,4 @@ class MailShortcode(models.Model): source = fields.Char('Shortcut', required=True, index=True, help="The shortcut which must be replaced in the Chat Messages") substitution = fields.Text('Substitution', required=True, index=True, help="The escaped html code replacing the shortcut") description = fields.Char('Description') + message_ids = fields.Many2one('mail.message', string="Messages", store=False) |
