diff options
| author | Romain Derie <rde@odoo.com> | 2018-03-01 11:49:10 +0100 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2018-03-07 14:25:16 +0100 |
| commit | 1c015283753df0bdc201b2e010a27be398960b03 (patch) | |
| tree | 7c65ad26efd78e2d8a2bed867036a55c2be354e1 /addons/web/static/src/js/views/basic/basic_renderer.js | |
| parent | 69c7d696d888e2415e1e99bc36d54257c53e123a (diff) | |
[FIX] hr_expense: ensure message_new has only one record (singleton)
Before this commit:
Expense emails title are parsed to find a product that match the given [CODE].
For example, an email title like '[CARD] Graphic Card $900' will create an
expense for the product having 'CARD' as internal reference.
Since the search is done with an 'ilike' and with no 'limit', it could return
multiple product: all the one containing the CODE in their internal reference.
This would throw a singleton error when trying afterward to read product.id.
Then, the mail would not go through the mail.thread flow and it would return
a Mail System Delivery fail saying the address does not exist.
Users would get stuck with this, having no way to understand where the error
comes from.
Now, we ensure to find only 1 product.
To avoid breaking the ilike behavior that could be used by users only typing
the first caracters of a long CODE, we still use ilike but force exact match if
there is multiple results.
Closes #23419
opw-1816340
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions
