summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorNans Lefebvre <len@odoo.com>2019-09-04 06:19:33 +0000
committerNans Lefebvre <len@odoo.com>2019-09-04 06:21:22 +0000
commit116dda06a767598dfdf1147e0e6baee105f5c860 (patch)
tree240368621bb35ed32d061909e7fa38b9152c738e /addons/web/static/tests/fields/basic_fields_tests.js
parent450269b26805b21428b16bd6deab30d4a8d9dd16 (diff)
[FIX] account: do not sent user as vendor when sending bill by email
On purchase journals, there is the possibility to set up an alias to automatically create vendor bills from incoming email. Three types of emails can send the bill: - the vendor, with email matching a partner in database - an internal user, possibly forwarding the bill he received from the vendor - an unknown address In the third case, the address will be ignored. In the first, we found the vendor, so he can be set as partner_id of the bill. The tricky one is the second case, where we try to guess the vendor. Before, the code would take only the first email found in the body; if it found a matching partner, then it used that partner anyway, even if that partner belonged to a user and was skipped before. After the fix, we get the partners for all emails and take arbitrarily the first vendor, then backup on the first non-user. Note also that email_addresses would duplicate every address read in the body; we make a set to avoid duplicate processing. opw 1885070 closes odoo/odoo#36399 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions