Commit Graph
122225 Commits
Author SHA1 Message Date
Antoine Prieels (ANP) f68df47ddf [IMP] snailmail: Show the price in terms of stamps
- The price of sending a letter was displayed in the currency of the company, now we express the price in terms of stamps
- Show a different message in the modal depending on the validity of the address
2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) d5ca268438 [IMP] snailmail: Change order of settings and default values
Task #1892473
2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) 2dfa7cd597 [IMP] snailmail: Add form and tree views for snailmail.letter
Add new form and tree views for snailmail.letter available in Accounting > Configuration > Management > Snailmail Letters
Add a many2one field to snailmail.letter to link to a mail.activity in case of an error with snailmail

Task #1892473
2018-11-22 15:38:42 +00:00
wan 182b4d86f4 [IMP] l10n_be/fr/lu: set refund_sequence on sale/purchase journals
Belgium, France and Luxembourg should, by default, have a dedicated sequence for refunds.

Task ID: 1872181

closes odoo/odoo#28639
2018-11-22 10:49:46 +00:00
Yenthe V.G 1b43116ec0 [IMP] uom: add sheet on uom.uom and uom.category form views
closes odoo/odoo#27335
2018-11-22 10:31:21 +00:00
Yenthe V.G fcc3766233 [IMP] membership: add sheet on product.template form view
closes odoo/odoo#27328
2018-11-22 10:36:30 +00:00
Yenthe V.G a5e6bf2397 [IMP] mass_mailing: Add sheet of mail.mass_mailing.tag form view
closes odoo/odoo#27200
2018-11-22 10:12:48 +00:00
Robot Odoo a8a7c248cd [MERGE][REF] survey: break survey composer inherit on mail composer
Purpose of this merge is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as

 * send_mail method of mail composer is overriden and super is not called.
   Nothing from the complex behavior of mail.compose.message is used;
 * templates are just basically supported in survey, notably mass mailing or
   mass posting mode are not used;
 * methods from mail.message should not be available on survey composer;
 * most m2m fields coming from mail.message and composer have no use here;

In this merge we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.

In this merge we also rename survey.mail.compose.message to survey.invite
as it simplifies code and is easier to understand.

This commit is linked to task ID 1909804.

closes odoo/odoo#28783
2018-11-21 15:48:06 +01:00
Thibault Delavallée cb59cb0436 [REF] survey: rename invitation wizard to better match its business use
Purpose is to have a somehow cleaner name for this wizard as its purpose
is to send invitations. Email and composer are details on how it works.

This commit is linked to task ID 1909804 and PR #28783.
2018-11-21 13:27:52 +00:00
Thibault Delavallée ebbe0cac03 [REF] survey: break dependency from survey composer on mail composer
Purpose of this commit is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as

 * send_mail method of mail composer is overriden and super is not called.
   Nothing from the complex behavior of mail.compose.message is used;
 * templates are just basically supported in survey, notably mass mailing or
   mass posting mode are not used;
 * methods from mail.message should not be available on survey composer;
 * most m2m fields coming from mail.message and composer have no use here;

In this commit we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.

This commit is linked to task ID 1909804 and PR #28783.
2018-11-21 13:27:52 +00:00
RomainLibert 8d869b06e2 [FIX] hr_holidays: change selection key type from float to string
In the following commit (744de4e) we introduced some floats as keys
to Selection fields (namely request_hour_from and request_hour_to)

This lead to the ORM creating a column of type int4 to store this
field which rounded the values.

In order to fix that faulty behaviour, we change these keys into strings
and then convert them to floats.

closes odoo/odoo#28891
2018-11-21 11:26:16 +00:00
Christophe Monniez ff051bf829 [IMP] web_tour: better logs in case of failure
With this commit, a failing tour will display more information in the logs,
which may be useful for debugging purpose.

- display full html instead of just the content of body
- display the 'content' flag of the step, which is very useful to see
  which step failed

closes odoo/odoo#28863
2018-11-21 09:23:17 +00:00
Gert Pellin bc1c54dd7a [FIX] point_of_sale: barcode nomiclature required
set barcode_nomenclature_id as required field

barcode nomenclature must be required because the pos session needs it
to be able to work properly. Without this scanning barcodes will always
give an error.

closes odoo/odoo#28750
2018-11-16 10:14:08 +00:00
Géry Debongnie 5a97faab5b [DOC] doc: add information on javascript testing
The documentation on JS testing was almost completely useless.  With the
introduction of our new test utility functions, it is time to document
properly how the testing system works.

closes odoo/odoo#28834
2018-11-20 12:51:09 +00:00
RomainLibert ba63b44717 [IMP] hr_payroll: remove inheritance on hr_payslip_line
hr_payslip_line was inheriting from hr_payslip_rule which meant that we
were copying useless data from the rules on the lines (namely the
computation rules which are only used in _compute_rule on
hr_payslip_rule).

closes odoo/odoo#28711
2018-11-19 10:25:19 +00:00
Robot Odoo 43638b0b28 [MERGE][REF] mail : store normalized email addresses
Add a mixin that can be used to store a normalized version of the primary
email address of the parent model. The email_normalized field can
than be used on that model to search quickly on emails (by simple
comparison and not using time consuming regex anymore)

Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.
That simplify also the comparaison to - and the searches on - the
blacklist.

Use the email.normalized from mail.address.mixin to get always a normalized
email address in the unsubscribe link. That allows to simplify the search
on email address in the controllers -> Check blacklist, send feedback, etc..

This merge is linked to task ID 1896677

closes odoo/odoo#28205
2018-11-20 14:11:59 +01:00
David Beguin ede0f03e15 [IMP] mail : use email_normalized in mail_channel _notify_email_recipients
If recipient has email like 'A <a@a.com>', the email_to returned by this
method will be incorrectly formatted. -> 'A <A <a@a.com>>'
2018-11-20 11:37:06 +00:00
David Beguin 692f0062fb [IMP] mail, mass_mailing, crm : stringify _primary_email
_primary_email was an array to be able to use it directly in the
depends. Typically a 'depends' with a computed value (lambda) needs
an array. Otherwise, it will only take the first character of the
field name string.

By setting _primary_email as a string, the lambda should always get
an array. But it simplifies a lot the usage of the _primary_email.
also, having an array was confusing as we could think that more than
one field can be considered as the primary email. This is not the
goal hare. So having the _primary_email as a single string is more
'self describing'. Only one field should be the _primary_email.
2018-11-20 11:37:05 +00:00
David Beguin 1007df3dc3 [IMP] mass_mailing : apply email_normalized on _get_opt_out_list
To avoid sending mail to an opted-out mass_mailing_contact with email address
that is not strictly an email address (a <a@a.com> instead of a@a.com),
the the get_opt_out method must be adapted to use the email_normalized field,
as this method is only useful for that specific model.

Task ID : 1896677
2018-11-20 11:37:05 +00:00
David Beguin e69b89b8fa [IMP] tools, mail : adds email normalization method in mail tools
In order to normalize email independently from the
mail.address.mixin model.
2018-11-20 11:37:05 +00:00
David Beguin fc2a8d63ee [IMP] mail, mass_mailing, mass_mailing_crm : Use normalized email in unsubscribe link
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..

Task ID 1896677
2018-11-20 11:37:05 +00:00
David Beguin 0fe50a01d2 [IMP] mail : apply mail.address.mixin on blacklist
Apply the mail.address.mixin on blacklist mixin. So that every model
inheriting the blacklist.mixin will also inherit the address.mixin.

That simplify also the comparaison to - and the searches on - the
blacklist.

Task ID 1896677
2018-11-20 11:37:05 +00:00
David Beguin 8d3fcf42c9 [IMP] mail : add mixin to normalize email address
This Mixin can be used to store a normalized version of the primary
email address of the parent model. The email_normalized field can
than be used on that model to search quickly on emails (by simple
comparison and not using time consuming regex anymore)

This commit will be usefull to simplify the email address comparison
in the blacklist mixin but also for any models storing non normalized
email address.

Task ID : 1896677
2018-11-20 10:39:11 +00:00
gde-odooandtwa-odoo 097c8afb74 [IMP] web: propagate "on_attach_callback" to all widgets in form renderer
Co-authored-by: twa-odoo <twa@odoo.com>

closes odoo/odoo#27711
2018-11-20 08:21:37 +00:00
Aaron Bohy de924f41ee [IMP] web: testUtils: ensure backward compatibility
Rev. 7c3d5dc0 recently added new helpers to use in the tests, and
moved some existing helpers to testUtils sub groups (like .dom or
.mock).

This rev. adds a compatibility layer to ease forwardports.

closes odoo/odoo#28824
2018-11-20 10:44:24 +00:00
Christophe Monniez 153c2a9f94 [FIX] web: remove testUtils helpers from click_everywhere
During the refactoring of the js test suite, in abf32b8b, the
click_everywhere test was inadvertently updated to use the helpers.

Some missing semi-colons were fixed too.

closes odoo/odoo#28820
2018-11-20 09:31:47 +00:00
Thibault Delavallée c95b14944a [REM] survey_crm: remove module
This module only adds an action allowing to send some invitations to surveys to
leads. It is safer to go through the survey module especially that its use is
about to be improved.

Commit linked to task ID 1910982.

closes odoo/odoo#28801
2018-11-20 09:05:57 +00:00
Geoffroy Larue ed86434a19 [IMP] mass_mailing: improve onboarding
Purpose : this commit improve various elements of the mass mailing interface :
- make recipients field in mass mailing form required and add "mass mailing contact" in selection
- new "Archive" button and color picker in dropdown menus of mailing lists and mailings
kanban views.
- various little improvements in labels

closes odoo/odoo#28497
2018-11-15 14:32:26 +00:00
Christophe Monniez 51ee0c3cb5 [FIX] packaging: add qrcode package to docker file
After the Odoo package is built, the package.py script uses a Docker
image to test the package. After that python3-qrcode was added as a
dependency for the package in 2ff49c5f , it revealed some issues.

A missing cli parameter and a forgotten '&&' in the Dockerfile prevented
the installation of the depending packages.

Also, the script shebang was wrong by launching python2.

Finally, the fact that python3-xlwt is missing in Debian stretch was
highlighted. With this commit, the python3-xlwt is explicitly removed
from the dependencies and the documentation is updated accordingly.

closes odoo/odoo#28807
2018-11-19 15:34:13 +00:00
Robot Odoo 7c3d5dc067 [MERGE][REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.

closes odoo/odoo#28784
2018-11-19 15:38:25 +01:00
jem-odoo 8fc246da31 [MOV] purchase_requisition: split models and views files
This commit simply move code into the right file.
The goal is here to fit the guidelines and prepare
the module for some changes. This will ease the
reading of module code.

Task-1851286

closes odoo/odoo#28795
2018-11-19 12:52:07 +00:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Aaron Bohy bcbb7ee3fe [REF] web: properly name relational fields test files 2018-11-19 11:24:28 +00:00
Aaron Bohy 72f53c43b3 [IMP] web: force mobile screen size for mobile suite
Before this rev., the mobile js tests suite was run on a desktop
like chrome-headless (1366x768). This can be a problem for this
suite which tests mobile behaviors and thus clicks on parts of the
interface that are only visible on small devices (thanks to scss
media queries).

This wasn't really a problem until now, because the test framework
allowed to click on invisible elements. But it's no longer the
case since the introduction of click helpers.
2018-11-19 11:24:28 +00:00
qmo-odoo 6f5748d288 [MOV] slides: Rename and split files according to their underlying models
Purpose of this merge is to polish a bit this module before turning
it into "courses" (see task #1902304 for more details on this)

Contains
 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * rename files according to guidelines;
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;
 * Split javascript widgets into their own separate files

No functional behavior change should occur with this commit. Only move
has been performed.

Note that we might lose part of the history as splitting files creates a new
history for new files.

Task: #1909281
Closes: #28679
2018-11-19 08:28:34 +00:00
Robot Odoo 2b896bcf82 [MERGE][IMP] sale,base,account : improve sales onboarding
Purpose : Ease navigation in default screens of Sales app to better onboard new
users and fix various issues in the views.

- onboarding tour : fix "quotations" filter and tooltip appearance
- config bar :
  -remove "Default incoterm" field in "company info" form and move it in
  "invoicing" settings.
  - improve "document layout" form design, set "paper format" as required
  field and add a "preview" button
  - rename FieldReportLayout "Preview" link and put standard report layout (the default one in odoo) as first image
  - fix small design issue in widget
  - "done" button design

- customer form :
  - improve address type tooltip
  - various changes in "accounting" and "sales & purchases" tabs (stat button, fields reorganizing)

- product form : fix "re-invoice policy" field hazardous hiding behavior and improve field appearance
- customer portal :
  - reorganize fields in "customer details" view
  - minor changes in "quotation" view

- Correct "sales order" model description

This merge is related to task ID 1892500 .

closes odoo/odoo#28254
2018-11-19 11:55:01 +01:00
Christophe Monniez 76d29d15bf [REF] tests: add parameter to choose chrome size
When using the HttpCase browser_js method, the window size is fixed to
1366x768.

With this commit, the default window size is still '1366x768' but a test
class that inherits from HttpCase may change it to test mobile layout
by changing the browser_size class attribute.

The browser is instanciated once per test class, for that reason the
window size cannot be changed in the class methods.

To use different sizes in tests, the tests have to be splitted in
classes.

closes odoo/odoo#28760
2018-11-16 14:35:18 +00:00
Robot Odoo 1c1ae3bef9 [REF] base_geolocalize: support multiple provider
- Make it generic: geo_coder (logic) / geo_provider (list of provider)
- Add support for openstreetmap since google make it more complicated: https://cloud.google.com/maps-platform/user-guide/account-changes

Courtesy of @ecino

closes odoo/odoo#28747
2018-11-17 18:41:18 +01:00
Christophe Simonis 6faad524cf [MERGE] forward port branch 12.0 up to bc744a1da4 2018-11-16 19:30:20 +01:00
Robot Odoo bc744a1da4 [MERGE][FIX] mail: several fixes in discuss, chat window, chatter
This merge fixes a crash in discuss, in addition to re-introduce some _quality of life_
features that have been mistakenly removed from the chatter and from chat windows:

### 1. No crash when searching messages

This was caused by the addition of moderated channels. In short, fetching twice
the same message was performing a re-render of the thread due to a mis-consideration
of a moderation status change. When the fetch reaches the fetch limit, the re-render is
considered as a "load more" fetch, which only works when there is at least one message
registered for the current search.

This is fixed by re-render when there is a change of moderation status only.

Task-ID 1910180

### 2. Easily mention followers and employees in chatter

When mentioning a user from the chatter in a document, it was always
fetching all partners in a arbitrary order. As a result, it was hard to mention
followers and employees.

This is fixed by re-introducing the previous behaviour on mentions, which
groups them by followers, then employees, then all partners.

Task-ID 1910111

### 3. Show message document link in chat window

When a message is linked to a document, it usually shows a
link next to the message. This still works in the Discuss app,
but not in chat windows.

This erroneous regression was caused by a refactoring.
This is fixed by re-introduced document links on messages in chat
windows.

Task-ID 1910119

closes odoo/odoo#28744
2018-11-16 17:53:55 +01:00
Jeremy Kersten 6c67539b92 [REF] base_geolocalize, base_setup: ref + make it configurable in settings
Migrate in v12 and Refactor a part of the code
Allow to configure it in setting
2018-11-16 16:24:49 +00:00
Alexandre Kühn e3f36b10ac [FIX] mail: no crash when searching messages
Revision on https://github.com/odoo/odoo/commit/299ebb2cdf63de2e3967da0d2f3e7effd239812b

The commit above added the notion of moderation, which
requires re-rendering the thread when a message has its
moderation changed (i.e. the message is deleted on reject
or is no longer marked as 'pending moderation').

However, this condition was triggered even when the
moderation status on the message has not changed.

This introduced a crash when using the search in discuss:

- Access a channel with more than 30 messages, so that
  not all messages have been fetched.
- Search messages in this thread so that it displays more
  than 30 messages, and the last message of those has already
  been fetched.
> It crashes with "Cannot read property 'getID' of undefined".

The bug comes from re-fetching messages: it behaves as a
"load more" fetch, although no message has been stored yet.
A "load more" fetch requires at least one message in order to
determine the minimum message ID to fetch, thus the crash due
to having no message to get such an ID.

Here's the explanation why it fetches with load more:
when performing the search and fetching the same last message,
it will detect that it has already been fetched. Its moderation
status is 'accepted', and it will assume a change of moderation
status. This will trigger a fetch and render of the thread.
At this moment, if the search exceeds the fetch limit, not all
messages will be fetched, so that this fetch is considered as a
"load more" fetch.

This commit fixes the issue by only re-rendering the thread
when there is a change of the moderation status on an already
fetched message. Since changes of the moderation status are
handled by means of the longpolling, it should be rare to run
into the case of having a change of moderation status on a
message while using the search on a thread.

Task-ID 1910180
2018-11-16 14:04:46 +00:00
Alexandre Kühn 7613db4178 [FIX] mail: show message document link in chat window
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

The commit above consisted of refactoring the JS mail module.

A small regression was introduced on messages linked to a document
from a chat window: it was no longer displaying the link to redirect
to the document that this message originates from. This issue was
only isolated to chat windows: it was working fine in the Discuss app.

This commit re-introduces the displaying of the document link on
messages from chat windows.

Task-ID 1910119
2018-11-16 13:43:41 +00:00
Alexandre Kühn 9eff26367f [FIX] mail: easily mention followers and employees in chatter
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

Resulting of the mail JS refactoring, the list of prefetched suggestions
has been changed as follow:

- before: list of list of mention suggestions `{Array<Object[]>}`
- after: list of mention suggestions `{Object[]}`

The change resulted in wrongly thinking that wrapping the list of
suggestions in a list was pointless, thus simplifying it as a simple
list of mention suggestions.

However, because of this change, it has become much harder to
mention employees and followers of documents from the chatter:
it now always fetches all partner suggestions at all time, whereas
before it was suggesting followers, then employees, and finally all
partners based on the input of the user.

In fact, there was a purpose of using a list of list of prefetched
mention suggestions, which is to group suggestions by "priority":
followers first, then employees, and all partners as a last resort.

This commit re-introduces prefetched mention suggestions as a list
of list of partners, so that it re-becomes easier to mention
followers and partners of a document from the chatter.

Task-ID 1910111
2018-11-16 13:43:41 +00:00
Toufik Ben Jaa 6f7262f508 [FIX] mail: do no try to send notification to inactive users
- This commit prevent to send notifications to inactive users.
- This fixes a bug where two partners have been merged and one of its
  users is archived.

  If one of the two users is inactive the code might use its `notification
  type` preferences instead of the active user's one.

closes odoo/odoo#28730
2018-11-16 11:13:56 +00:00
Olivier Dony 8ee02ad136 [FIX] digest: correct a few typos 2018-11-16 16:35:22 +01:00
Olivier Dony 8545e05fc0 [FIX] mass_mailing: fix slow contact number query
The query was computing the count for all mailing lists, not just the
one being requested. This prevents optimizing the SELECT with indexes.
In addition, using a subselect for the blacklist forced a full table
scan on the contacts - switching to a LEFT JOIN avoids that.

With a blacklist of a few hundred thousand entries, and a table of
mailing list contacts in the same order of magnitude, this brings the
SELECT from 3+ seconds down to 3 milliseconds - with the same result.

Bonus: no need to perform the regexp extraction of emails to test for
NULL values -> substring(x) is NULL iff x is NULL.
2018-11-16 16:35:22 +01:00
Olivier Dony a103d4a43e [FIX] mail: use strict email matching for bounces
When a bounce is received, we look for matching partners in order to
increment the bounce counter. However by using [`ilike','email`] we carry
the risk of matching emails that contain the bounce email:

   ['email', 'ilike', 'john@hitmail.com´]

will also match 'random.john@hitmail.com' for example.

Using strict equality is safer, and the worst that can happen is that
we fail to count one bounce.
2018-11-16 16:35:22 +01:00
Christophe Simonis eafda0469a [FIX] calendar: adapt test version 12
*/ Use existing partner name
 */ correctly compare dates
2018-11-16 16:29:21 +01:00
Christophe Simonis 4b8bd36219 [MERGE] forward port branch saas-11.3 up to bab2a191d2 2018-11-16 15:39:02 +01:00