Commit Graph
9 Commits
Author SHA1 Message Date
Thibault Delavallée 5d4208d44d [FIX] sms, various: fix override of sms and phone fields methods
There are two mixin involved in SMS notifications

  * mail.thread: standard SMS sending capabilities;
  * mail.thread.phone: advanced use with support of blacklist;

Both require to define fields to use when searching for phone numbers
(generally phone and/or mobile). Those are ``_sms_get_number_fields`` for
mail.thread standard implementation (in SMS module) and ``_phone_get_number
_fields`` for mail.thread.phone advanced implementation (in phone_validation
module).

In this commit we make mail.thread.phone act like a more advanced version
of mail.thread by making _sms_get_number_fields use result of _phone_get_number
_fields, and not the inverse. It allows to remove some overrides notably in
CRM having to define twice fields.

Task ID-2528169

closes odoo/odoo#71111

Related: odoo/enterprise#18428
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-20 15:02:24 +00:00
Aurélien Warnon 1f73a652be [IMP] crm[_sms]: align crm list view with "My Activities" view
Some of the feature of the "My Activities" list view of the crm app were not
available on the regular crm tree view.

This commit aligns the 2 views by sharing these features, notably:
- You can "snooze" your next activity if there is one
- You can contact the lead by email with a direct button on the row/list header
- You can contact the lead by sms with a direct button on the row/list header

The "team_id" column is now optional="hide" since not required most of the time
when you go to check your own leads (and can be activated in a few clicks if
needed).

Finally, the "Email" action at the end of the tree row is now in "single" mode
to allow adding contacts on the fly. This implied re-introducing an action that
was recently removed in 8c65d7c5f7
Further demonstrating that R&D is just an eternal loop.

UPG PR odoo/upgrade#2064
Task-2390500

closes odoo/odoo#62289

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-08 10:10:27 +00:00
Thibault Delavallée 80e1987869 [MOV][IMP] crm(_partner_assign): reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:31:14 +00:00
Lucas Perais (lpe) 559a9cf018 [IMP] *: adapt some list views to the action button in controlPanel
task-2246383

closes odoo/odoo#54593

Related: odoo/enterprise#11992
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-29 09:11:52 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
Pierre Collinet (pic) f844b47757 [IMP] crm: Allow CRM users to easily see and process their To-Do list
General Purpose : Introduce a new "My Activities" view so that CRM
users can easily overview and process their To-Do list

- new button in "My Activities" tree view : Send Email
Purpose: allow users to send email in one click to the client

- new button in "My Activities" tree view : Send SMS
Purpose: allow user to send sms in one click to the client

- new button in "My Activities" tree view : Snooze
Purpose: easily Snoozes the activity for 7 days
--> today + 7d if deadline < today
--> deadline + 7d if deadline >= today

- New view crm_case_tree_view_my_activities to show "My Activities"
Purpose: Use this view so that CRM users can have a "To Do List"
Domain of this action is : crm.lead, type = opportunity
Filter is : My Activities (at least an activity assigned to me)

- Rename filter "assigned_to_me" to  "My Activities"

- Change crm_case_tree_view_oppor to be clearer for the user.
Purpose: allow the user to have an good idea of what he has to do in
a view.
Remove all decorations set on the CRM tree views
Add the widget remaining_days to the field activity_date_deadline
Add the field activity_ids with the widget list_activity

- New menu item and corresponding act_window to display the new views

Task ID 2243124
Community PR odoo#51537

closes odoo/odoo#53376

X-original-commit: 2382c01956feda617b7d207d1bc4d69de1e8b6b3
Related: odoo/enterprise#11314
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-22 07:33:44 +00:00
Benjamin Vray 39f4920039 [FIX] crm_sms: bug when send SMS in batch
It was no longer possible to send SMS in batch in the list view
This is because it was missing the default_res_ids  key in the action context

task_id: 2070836
2019-10-01 11:45:27 +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 ed4c67adb2 [ADD] crm_sms: integrate SMS in CRM
PURPOSE

We want to integrate SMS with crm.lead in the same way it is integrated
with res.partner.

SPECIFICATION

Add phone/SMS widget on 'phone' and 'mobile' to call the same 'Send sms' modal
than on partner. This modal can also be called from the action menu in list
view. This modal should behave the same as for res.partner (same number
selection and warnings). The SMS text message should also be logged in the
chatter (similarly to res.partner)

SMS sent in batch should be logged in the chatter of the corresponding record.

Linked to task 1925950
Part of PR #34864
2019-07-18 09:19:04 +00:00