Commit Graph
10 Commits
Author SHA1 Message Date
Samuel Degueldre ceea5f7852 [IMP] mail: allow users to reply to other messages in discuss
This commit adds a feature where users can reply to messages of other
users, doing this will show a reduced version of the message that has
been replied to above the message once posted, clicking on this reduced
version will scroll to the original message and highlight it if that
message is already loaded.

task-2362251

closes odoo/odoo#77941

X-original-commit: cec2e69e832072dd699274187ddfa122e29d03f3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-10-06 07:03:59 +00:00
Sébastien Theys dea52493b8 [IMP] mail, sms, snailmail, test_mail_full: adapt mail.notification
The purpose is to have more common code for failure and notifications, with less
override in `sms` and `snailmail`.

task-2176017

closes odoo/odoo#44170

Related: odoo/enterprise#9140
Related: odoo/upgrade#918
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-04-17 12:17:57 +00:00
Adrian Torres 1daf8eb127 [FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30 13:42:04 +00:00
sri-odoo ec9eadc352 [REF] sms: replace mail/systray fail icon
Use SVG format to improve rendering in HiDPI display while keeping tiny
the file size.
2019-09-22 09:33:17 +00:00
Remi Rahir e20c1b6eff [FIX] sms: fix some typos
PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

Notification type is now a selection -> use 'sms' instead of True;
Fix typo in method renaming not correctly propagated to its view;

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Thibault Delavallée 46f2f04b85 [FIX] sms: use right has_sms_error field on message
closes odoo/odoo#34992

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-18 14:21:35 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Thibault DelavalléeandPierre Rousseau 423cf93eb3 [IMP] sms: add UX elements to use SMS notifications
Purpose of this commit is to allow users to have a feedback on SMS
notifications status in chatter. This commit contains notably

  * an update of systray widget that now handles SMS failures. Those are
    displayed in another item of the systray and redirect to documents having
    an SMS failure;
  * an update of chatter widgets to support SMS notifications in messages.
    Failed notifications appear in red and allow to use the SMS resend
    wizard;

Mail message model gains a new has_sms_error computed and searchable field
allowing to filter on messages having failed SMS notifications. Mail thread
model gains a new message_has_sms_error computed and searchable field, based
on the one on mail.message. It allows to filter on records with failed SMS
messages directly from the systray. That way clicking on the systray entry
redirects to the right records.

Related to task 1922163
Linked to PR #33510

Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Co-Authored-By: Pierre Rousseau <pro@odoo.com>
2019-07-12 14:54:11 +00:00
Thibault DelavalléeandPierre Rousseau 45555bdd1f [IMP] sms: allow to resend and cancel SMS notifications
Purpose of this commit is to allow SMS notification management. It is based
on what has been done in mail for notification: resend and cancel.

In this commit we add wizards allowing users to resend and cancel failed
SMS notifications. Resend allow to change the contact number, as well as
resending only a subset of notifications.

Future commits will improve the UX itself.

Related to task 1922163
Linked to PR #33510

Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Co-Authored-By: Pierre Rousseau <pro@odoo.com>
2019-07-12 14:54:11 +00:00
Thibault DelavalléeandPierre Rousseau bdebcab0ce [REF] sms: refactor message_post using SMS notifications
Purpose of this commit is to better include SMS notifications when posting a
message. SMS is now just another way of notifying people along with Inbox and
email. Following recent mail merge improving notification mechanism [1] we
have to define a _notify_record_by_sms method on mail.thread.

When a message_post is done using message_type being ``sms`` notification type
of customers is set to sms. Customers can be computed on model (generally based
on partner_id field) or directly set usign partner°ids. Notification model is
updated to store this information directly inside the notification itself.

An new ``_message_sms`` helper method is introduced in SMS module allowing
to send messages using sms type and notification with a reduced parameters
number. It is just a shortcut to message_post, easier to use. Either it
computes default recipients on the record set, either it is based on given
partners and numbers to notify.

The following use cases are notably supported

  * default computation: find customer, notify by sms;
  * force recipients to notify by sms (partner_ids);
  * give a set of numbers to notify by sms (sms_nubmers), not necessarily
    linked to existing partners;
  * force number / customer relationship independently of mobile number defined
    on customer (for example when sending an SMS directly from a mobile field
    on a lead linked to a customer);

Tests are updated accordingly. Performance tests are added in order to have
some insights on queries generated when sending SMS, like already done for
mail.thread alone.

Related to task 1922163
Linked to PR #33510

[1] see be27955136: performance and notification code improvements

Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Co-Authored-By: Pierre Rousseau <pro@odoo.com>
2019-07-12 14:54:11 +00:00