Commit Graph
13 Commits
Author SHA1 Message Date
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Lavish Chhatwani d30663503d [IMP] sms: autofocus on "body" for valid phone number in single mode
Before Commit:
When users wants to send an SMS to someone with help of the phone widget,
the composer is opened, and users expect to be able to write the message
right away. The issue is that the default focus is on the phone number, so
if users start writing, it will corrupt the phone nubmber, and they have to
discard the changes and have to click the body to finally start typing SMS
content.

After Commit:
When the composer is opened, if the phone number is valid, 'body' field is
focused automatically so that users can start typing right away. If number
is not valid, the focus will still be on the phone number. This is managed
by providing 'default_focus' attibute on the body field, which appears or
is hidden as needed.
For the mass mode also, we simply focus on the body field to enable user
to start writing content right away.

closes odoo/odoo#65443

Task-id: 2394488
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-09 11:01:03 +00:00
Mariska Archielli (ram) a73044a66d [FIX] mass_mailing, mass_mailing_sms : fix bugs and incoherency
Fix traceback when creating a new contact by checking the id list is not empty
Filter default reporting by name rather then by campaign (as campaign is an option)
Group by Campaign only if the option is checked to enforce coherency.
> This is unblocked with a group.
Hide the 'replied' status from sms reports as it is not relevant for sms.
Remove the preview message for sms as it is not relevant elsewhere then the object of mails.
Warn the user if he's trying to send a sms with only white-space characters.
> this causes an error because the plaintext-html conversion in mail_thread.py
> consider a white-spaces-only text as empty.
Mobile placeholder added for a better understanding of the field by the user.

Task ID : 2302578

closes odoo/odoo#61461

X-original-commit: e6496af1ea31b2c699de9e41196a9ae3a07efb7f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-06 10:00:07 +00:00
Aymane (ayt) 8df6aec234 [IMP] mail, sms: support keydown based change event in char fields using an option
PURPOSE

Avoid flickering and incorrect display of warning box in SMS when updating
the number to contact.

SPECIFICATIONS

Currently when an user uses composer to send an SMS, number is validated
at onchange. It leads to two issues

  * jump of content as a warning box appears;
  * visual warning displayed after user may have clicked on "Send"
    button, leading to warning not being useful;

We choose to validate number in real time in order to give directly
a feedback to the user. It also lessens flickering on composer screen.
This is done by allowing to trigger the 'change' event on key down. This
requires a specific onchange_on_keydown option to be used on char field.

LINKS

Task ID 2229050
PR #51159

closes odoo/odoo#52962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-15 13:26:13 +00:00
Florimond Husquinet (fhu)andThibault Delavallée f685e70616 [IMP] sms: allow to edit number when sending an SMS to one recipient
After this commit

  * the SMS button is visible next to a phone number in mass_mailing, and
    mass_mailing_sms
  * when sending an sms to a single contact, its phone number is now an
    editable field in the wizard and there is a warning if the number is
    invalid;
  * if operator updated the recipient number, update record number according
    to the new number only in single recipient mode (aka, solving number
    issues directly from interface);

LINKS

Task ID 2088303
Community PR odoo/odoo#40482
Upgrade PR odoo/upgrade#873

Co-Authored-By: Florimond Husquinet <fhu@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-03-05 11:27:01 +00:00
Thibault DelavalléeandFlorimond Husquinet 3150541bed [REF] sms: composer model cleaning
In this commit we perform some cleaning in composer model before adding
number update feature:

  * remove partner_ids field that is not used anymore. It comes from early
    implementation of SMS composer and is now dead;
  * rename recipient_count to recipient_valid_count to better reflect its
    use;
  * rename recipient_description to recipient_single_description to better
    reflect it is used only in mono-recipient mode;
  * add a new single comment computed field, allowing to display some
    information only when sending an sms to a single given record;

We also fix computed fields by making them work in batch.

LINKS

Task ID
Community PR odoo/odoo#40482
Upgrade PR odoo/upgrade#873

Co-Authored-By: Florimond Husquinet <fhu@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-03-05 11:04:49 +00:00
Thibault Delavallée 48cc126137 [FIX] (mass_mailing_)sms: allow to directly send SMS in mass mode
PURPOSE

Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.

SPECIFICATIONS

Allow to send directly SMS when doing SMS marketing

SMS Application
  * in sms composer, in mass mode: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

SMS Marketing Application
  * in mailing view for SMS: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 seconds to be completed which is considered as ok.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:59 +00:00
ryv-odoo 8e2da3b4d6 [IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
Thibault Delavallée 5450415354 [REF] sms: improve onboarding and user experience of SMS composer
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Clean the use and options of sms composer after FP feedback :

  * see https://s.nimbusweb.me/share/3167586/ap1xpy95rz29a5cys576 as basis;
  * globally, do not display invalid recipients, only valid / invalid count
    as well as current selection / active domain counts;
  * consider logging a note as default behavior when using the composer;
  * simplify code: when doing a mass SMS, send SMS and attach a simple note
    to the document;

Some other points

  * make name of sms templates translatable;
  * improve various wording, notably in sms widget;
  * display error code in sms list view;
  * update sms composer actions accordingly by correctly setting active id
    or ids;

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Thibault Delavallée ac212ae65d [IMP] sms: improve composer behavior
PURPOSE

Purpose of this commit is to add options and improve sms composer behavior.
Followup of merge 4287481bf0 .

SPECIFICATIONS

  * mass mode: add an option to keep archives when doing mass sms. This mode
    is actually a _message_sms in batch using the note subtype to speedup the
    process;
  * improve _message_sms_schedule_mass to allow more fine-tuning of options
    when calling it;
  * do not block sending SMS in batch if some recipients are invalid. Indeed
    using notifications there will be traces of failed SMS;
  * avoid reload of form view;

Linked to task 1925950 and 1935280
Part of PR #34864
2019-07-18 09:19:04 +00:00
Pierre RousseauandThibault Delavallee 9ad7a88a08 [IMP] sms: add SMS template and its support in SMS composer
Purpose of this commit is to provide users templates to use when sending
SMS. It is inspired from what already exists for mail templates. This commit

  * adds templates for SMS

    * users can now create template for SMS Text messages similar to mail
      templates;
    * jinja syntax is supported for body like mail templates, which is why
      templates are linked to a given model;

  * refactor the SMS composer

    * templates are supported in composer like the message composer. This is
      supported only in mass mode to avoid bloating the interface in standard
      composition mode;
    * composer code is rewritten to support various use cases (comment, mass
      sms, numbers, ...) and better fits all use cases;
    * composer is extended to support notably mass SMS without posting messages;

Templates will also be used in a near future in mass sms sending (mass
mailing application improvement) and in marketing automation (for enterprise).
Tests are updated and added to ensure feature works.

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
Hiral Bhavsar 29bb709844 [IMP] sms: set action menu 'Send SMS' only for list view
Set action menu 'Send SMS' only for list view of 'res.partner' model.

Linked to task 1984526
Related to PR #33720
2019-07-10 15:07:56 +00:00
Thibault DelavalléeandPierre Rousseau 566244b47b [REF] mail, sms: perform some guidelining (file move) and rename SMS composer model
Purpose is to prepare future improvements in mail and SMS module. In this
commit we apply some guidelines on XML Ids and file naming.

In mail cancel wizard code is separated from the resend one as they have
nothing in common.

More importantly ``sms.send_sms`` model is renamed to ``sms.composer`` to
avoid underscores (which is really really bad, take a look at
ir.config_parameter) and have a meaningful name.

Related to task 1922163
Linked to PR #34516

Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Co-Authored-By: Pierre Rousseau <pro@odoo.com>
2019-07-02 10:39:25 +00:00