Commit Graph
297 Commits
Author SHA1 Message Date
Christophe Simonis 6ce408c824 [MERGE] forward port branch saas-15 up to a0d832efdc 2018-09-26 12:41:31 +02:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Olivier Dony fe2df80d73 [FIX] mass_mailing: make campaign default to non-A/B testing
In A/B testing mode, a given recipient will only ever receive a single
email from a given mass-mailing campaign, no matter how many mailings
were sent to them.

This is useful for A/B-testing various mailings in order to check their
results. But is very difficult to understand for users who simply want
to organize their mailings into campaigns.

Additionally, the A/B testing option is hidden as a technical feature, so
it is hard to discover in order to troubleshoot unexpected number of
emails sent by a given mailing.

It will be safer to keep it off by default.
(keeping the parameter explicit, to better show that it is on purpose)

This partially reverts dee5c31264
2018-09-21 14:28:10 +02:00
Toufik Benjaa 0c8a244e68 [FIX] mass_mailing: check duplicate recipients on mass mailing
- When checking if a recipient has already received a mass mailing, the
  record model for the recipient was not checked.

  Which leads to false positives.
2018-09-13 15:48:09 +02:00
Nicolas Martinelli ea4502ceab [FIX] mass_mailing: bounced statistics
A mass mailing can be considered both as bounced and opened. This can
occur with some email providers, such as Gmail. Indeed, Gmail sends
out-of-office replies to the `Return-Path` address, which is also used
for bounced emails. Therefore, it is not possible to determine
accurately if a message sent to to the `Return-Path` is a genuine
bounced email, or an out-of-office reply.

However, if the recipient opens the email, it is possible to determine
that the bounce was counted incorrectly. In this case, we empty the
`bounced` field. Similarly, we only write on the `bounced` filed if the
`opened` field is empty. This could occur if the recipient opens the
email before the out-of-office reply is received.

As a bonus, we also make sure to avoid updating the status if no route
was found. No route means that the email was bounced, so no reason to
set it as opened.

opw-1869957
2018-08-13 13:57:13 +02:00
Christophe Simonis e7f0dffb6a [MERGE] forward port branch saas-15 up to c301122b5f 2018-06-05 15:10:45 +02:00
Christophe Simonis c301122b5f [MERGE] forward port branch saas-14 up to a002210d93 2018-06-05 12:00:11 +02:00
Christophe Simonis a002210d93 [MERGE] forward port branch 10.0 up to c25b68f324 2018-06-05 11:50:03 +02:00
Christophe Simonis bc8f5c5e42 [MERGE] forward port branch 9.0 up to 0046bf7292 2018-06-05 10:54:09 +02:00
Nicolas Martinelli b837bbdd8b [FIX] mass_mailing: unsubscribe if trailing '/'
If the `web.base.url` contains a trailing `/`, the replacement of the
`/unsubscribe_from_list` link won't work since the string to replace
will be `my_url//unsubscribe_from_list` instead of
`my_url/unsubscribe_from_list`.

Fixes #24731
opw-1848572
2018-06-05 08:35:50 +02:00
Christophe Simonis 3051d1dd2f [MERGE] forward port branch 9.0 up to 34f567dd39 2018-05-24 16:55:28 +02:00
Christophe Simonis 34f567dd39 Revert "[FIX] mass_mailing: unsubscribe not working in multi lang"
commit a3ab33f212 introduced invalid code
2018-05-24 16:50:09 +02:00
Christophe Simonis 299b613da3 [MERGE] forward port branch 9.0 up to 919a1af936 2018-05-24 16:31:23 +02:00
Goffin Simon a3ab33f212 [FIX] mass_mailing: unsubscribe not working in multi lang
When installing the website with a lang  different than the one set
on the user, the button unsubscribe in the mass mailing snippets
didn't work because the unsubscribe link contains the code of the
language. The function send_get_email_dict in model mail.mail didn't
expect this behavior and so couldn't set the right unsubscribe link
in the mail.

opw:1850696
2018-05-24 09:46:36 +02:00
Christophe Simonis 45b4a4a4dd [MERGE] forward port branch saas-15 up to 62d93dad02 2018-05-14 20:25:16 +02:00
Christophe Simonis 62d93dad02 [MERGE] forward port branch saas-14 up to da7f280d8f 2018-05-14 20:18:21 +02:00
Christophe Simonis da7f280d8f [MERGE] forward port branch 10.0 up to 1bcc856e4c 2018-05-14 20:14:27 +02:00
Christophe Simonis 1bcc856e4c [MERGE] forward port branch 9.0 up to 0450868391 2018-05-14 20:08:31 +02:00
Denis Ledoux e48767fe65 [FIX] mass_mailing: force to not use a template for the rendering
If the user configures a default `template_id` for
the `mail.compose.message`,
this template was used by the mass mailing to render the email,
and, among others,
it therefore used the `email_to` of this email template,
to render the recipients,
and it was configured empty or something else than `object.id`,
it did not used the `active_ids` passed in the context to the
`mail.compose.message` `create` call to compute the correct
recipients

To reproduce:
 - In developer mode (?debug)
 - Open the full mail compose message
   e.g. in app sales, open a so, hit new message,
   and hit the button to open the full message composer
 - Set the template to the quotation template is not there already
 - In the debug menu of the dialog, View > Set defaults,
 - Click the radio button to all users, and the default to Use template = ...
 - Then, try to send a mass mailing. It will fail because it cannot
   compute the `email_to` values correctly because the `email_to`
   of the quotation template is empty.

opw-1840287
2018-05-14 16:48:20 +02:00
Christophe Simonis e8f630e44d [MERGE] forward port branch saas-15 up to 7a45296cf1 2018-03-21 18:20:22 +01:00
Christophe Simonis 7a45296cf1 [MERGE] forward port branch saas-14 up to 78dced6bc2 2018-03-21 16:49:15 +01:00
Christophe Simonis 78dced6bc2 [MERGE] forward port branch 10.0 up to c2b3ad1899 2018-03-21 15:55:26 +01:00
Jairo Llopis 6bd3bae04e [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
on the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 13:48:49 +01:00
Goffin Simon c3b49b3a5f [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
ont the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 11:42:11 +01:00
Christophe Simonis 1d884bec75 [FIX] mass_mailing: set related field on model as readonly
This avoid writing on `ir.model` for unprivileged users.

Courtesy of Jose Suniaga (suniagajose)

Closes #22496
2018-01-25 11:05:28 +01:00
Martin Geubelle 8b5440c2b4 [FIX] mass_mailing: open duplicate in edit mode
Since the new views, the flag `initial_view` on an action has been removed.

There were in fact multiple ways to do the same thing (open a form view in edit
mode directly with an action) (the supported option is `form_view_initial_mode`
in the context) ; the options have been cleaned up a little bit.

This was the only remaining recurrence.

Closes #22353
2018-01-22 13:14:44 +01:00
Adrian Torres b7ce07ad2a [FIX] website, mass_mailing: same field defined twice (#21503)
The ORM does not currently, an probably won't support two fields with
the same name in different modules that do not depend on each other.

This is obviously a nasty hack, but it's the best one can do for a
stable branch.

THIS IS WHY WE HAVE DEPENDENCY MODULES, PEOPLE.
2017-12-11 10:43:48 +00:00
Martin Trigaux e1e3b5a56e [IMP] i18n: better terms and labels
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot

was unclear, courtesy of the translators
2017-10-30 10:40:01 +01:00
Yannick Tivisse 55af66dcda [FIX] mass_mailing: redefine the usable models in mass mailing
Displaying all the model is not readable for a common user. We should only display models that are fit to be used in a mass mailing campaign.
2017-10-17 11:58:51 +02:00
dbh a203eaccbf [IMP] mass_mailing: Fix traceback on onchange when removing recipients model 2017-09-22 15:08:42 +02:00
Christophe Simonis 66ca687324 [MERGE] forward port branch saas-17 up to ed901bedcb 2017-09-15 18:09:39 +02:00
Christophe Simonis ed901bedcb [MERGE] forward port branch saas-16 up to 80f916e8e0 2017-09-15 17:20:01 +02:00
Christophe Simonis 80f916e8e0 [MERGE] forward port branch saas-15 up to 27cd03e032 2017-09-15 16:45:53 +02:00
Christophe Simonis 27cd03e032 [MERGE] forward port branch saas-14 up to 82aaf1aa17 2017-09-15 16:21:03 +02:00
Thibault Delavallée 2cdf080d5e [IMP] mass_mailing: do not auto commit emails in testing mode
Otherwise the database state is committed and this leads to funny things
when having mass mailing tests.
2017-09-15 15:56:23 +02:00
Thibault Delavallée d635547760 [IMP] mass_mailing: consider replying to an email imply opening it
Currently when people answers an email its statistics are set to replied
updating its replied field. However if the blank gif used to track the
opening fails for whatever reason we could have mail considered as replies
but not opened.

We consider that it is not common to reply to an email people did not
open. Let us therefore set a replied email as also opened.
2017-09-15 15:56:23 +02:00
Yannick Tivisse 51b5ee7c3c [IMP] mass_mailing: choose model among all chatter models
This commit removes the strange selection box based on a magic flag and
some strange methods returning a string. Instead just allow to send mass
mailing on all models inheriting from mail.thread using the is mail
thread flag.

Various addons are updated to remove the _mail_mass_mailing class
attribute used to determine mass mailing capability.

We consider people could send a mass mailing on every model inheriting
from mail.thread. It makes no sense to limit it to a given set of addons.
2017-09-15 15:56:23 +02:00
Thibault Delavallée e9fca14452 [IMP] mass_mailing: add support of clicked event on statistics
Currently there is no way to know on mail statistics if the customer
clicked on a link or not. This commit adds support of click like what
is already implemented for opened or replied. It stores the date when
the first tracked link has been clicked. A clicked mail is considered
as being opened related to its state if no other statistics has been
checked.
2017-09-15 15:56:23 +02:00
Thibault Delavallée ae455fb1f5 [FIX] mass_mailing: fix issue in _get_mailing_model
getattr crashes and in this case we probably meant to use hasattr as we
have a fallback behavior.
2017-09-15 15:56:23 +02:00
Thibault Delavallée 7accd77999 [REF][FIX] link_tracker, mass_mailing: factorize method creating link tracker click values
This commit factorizes the link.tracker.click values computation out of
the add_click method. This method is called when customers click on links
in email that are tracked in Odoo.

Purpose of this commit is

 * to effectively put mass mailing related code into mass mailing.
   Currently link_tracker holds code related to mass mailing which is
   not in its dependency tree. Let us therefore try to be a bit modular
   and add a proper inheritance in mass mailing;
 * allow addons to inherit from the click values prepare method to add
   specific values depending on their behavior like mass mailing adding
   links to a mass mailing and a mass mailing campaign;
2017-09-15 15:56:23 +02:00
Thibault Delavallée 83d3b281a4 [IMP] mass_mailing: allow to send a mailing on a given set of records
Currently mass mailing automatically computes the remaining recipients
to mail based on existing statistics and A/B testing. However in some
cases we would like to send the mailing on a given set of records. An
example of use is to use the mass mailing mechanism on records coming
from marketing activities. This commit adds this feature by adding an
optional parameter to send. If not given it falls back on the classic
mass mailing behavior.
2017-09-15 15:56:23 +02:00
Christophe Simonis 82aaf1aa17 [MERGE] forward port branch 10.0 up to bf8f701032 2017-09-15 15:47:58 +02:00
Olivier Dony cd26062a38 [FIX] mass_mailing: add missing statistics index
Indexing `mail_mail_id_int` is useful for locating the statistics entry
that should be updated (bounced/opened/replied)
2017-09-13 18:41:54 +02:00
Yannick Tivisse 736e850a8e [FIX] mass_mailing: Use werzeug.urls instead of urlparse
werkzeug.urls is used instead of urlparse since https://github.com/odoo/odoo/commit/01e35141479b8dfc4a390518f89fc52e7cec5396#diff-f72572eec7ff7bbeca23ba84eda9fc38L35

Error introduced by forwardport https://github.com/odoo/odoo/commit/ba294a397e6ee3eb7dd0153f0726a880f6b77459
2017-09-08 11:51:28 +02:00
Kirti Choudhary be7ac3a503 [FIX] mass_mailing: urlparse is replaced with werkzeug.urls.url_parse 2017-09-07 14:17:21 +02:00
Mahendra barad e38e251588 [IMP] website: Clean and simplify res_config view
Purpose
=======

- Settings are too complex: too long + too many options that shouldn't be suggested with checkboxes

e.g. twitter roller is now suggested as a new snippet to install from website editor
google maps, slides, forum, etc. should show up in the apps store

- When saving the page I expect to stay in the settings -> no redirection to homepage anymore!

Specification
=============

See task 33620
2017-09-06 15:21:25 +02:00
Yannick Tivisse 781a03b2bc [IMP] res_config: Update file names, xmlids, class names according to guidelines
Now that we only have one model (res.config.settings). Uniformize everything according to the guidelines.
2017-09-01 13:03:18 +02:00
Deep Patel 898224f110 [IMP] web,account,...: Regroup settings, add a nav and search bar
Purpose
=======

Settings are often way too long and hard to scan and sometimes you don't know where to find the settings you're looking for.
By adding a left navigation, you can already have an overview of the settings, and switch easily between them.

Specification
=============

- Add a search bar on all the apps that have settings which can search results from all the installed apps.
  (If i'm on sales settings,and I search anything then it shows results from sales settings and also shows
  all the other matching results from all the other apps such as, Inventory...etc) with app name.
- Able to activate feature from the current page results (no matter if the searched result is from another apps).
- Highlight searched word in results
- Delete the sheet, have a full white background
- Add left navigation bar on setting
- Left navigation bar fixed
- List displayed based on installed apps
- On right panel, by default display current app setting and change accordingly
- [Mobile] Left navigation bar displayed on top
- Add Breadcrumb on top of the page: have the name "Settings" + Save / discard CTA + Search
- Add General Settings on the nav bar
- remove "save this page..." notif in all settings
- Delete all recommanded apps section + all checkbox that install app should disappear:
	payroll: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrSkMzWVpuZ0ZoaFE/view?usp=drivesdk
	Events: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrYXlHMHd2NTM2blE/view?usp=drivesdk
	Manufacturing: Delete Repair - Quality Control - Maintenance - Product Lifecycle Management [LAP][ok]
	Timesheets: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrdFg5XzNydkd2TlU/view?usp=drivesdk
	project: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrraWo3NE04TktwcTQ/view?usp=drivesdk
	inventory: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrQkRaVUR5ekFQYTQ/view?usp=drivesdk
	recruitment: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrbDdqLWQweF80UkE/view?usp=drivesdk
	purchase: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrRlAyUDBnb0trQWs/view?usp=drivesdk
	email marketing: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOUZONjhvX2k3Y2s/view?usp=drivesdk
	expenses: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrR0JpN1ZpQmtxU3M/view?usp=drivesdk
	attendances: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrralpjZ1VJclNpMWs/view?usp=drivesdk
- About duplicate settings:
	Docsaway: Delete from Sales + delete Default Print Provider
	Attributs & Variants: Delete from Purchases - Manufacturing
	Multi-currencies: delete from Sales
	Unit Of Measures: Delete from Purchase & Expenses
- Add a scroll bar on the left bar when there's too many apps
- Keep the navbar visible even when you search
- Move General Settings to the bottom of the list
- Update on Settings:
    - Accounting:
        - rename automatic rates
        - Anglo Saxon Account: Should be in technical feature
        - Place Accounting Reports section before Taxes section
    - CRM:
        - Phone Validation: Enforce international format becomes
        - Local Numbers: (2 radio buttons proposals) Add international prefix / No prefix
    - Fleet: typo " ... a new car if ..." + text is too long <br>
    - project: fix tooltip for colab pads
2017-09-01 13:02:54 +02:00
Xavier Morel 481a00dc4b [FIX] P3: hash/hmac payload must be bytes 2017-08-20 23:25:54 +02:00
Christophe Simonis fa3e89064a [MERGE] forward port branch saas-16 up to 104dfe3c07 2017-07-20 11:48:49 +02:00