diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-02-13 12:59:47 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-03-25 15:51:25 +0000 |
| commit | 52ac7f2ddb5c27a177f9bd0c088f2a8a08ab676f (patch) | |
| tree | 7a8e4d546729efc550229768665f745f4c30d9f8 /addons/website_crm/tests/__init__.py | |
| parent | a2e5514b8a720b531b2b853d49ae88c07c12f7e2 (diff) | |
[FIX] website(_crm): fix email and phone computation of visitor
Currently there are several limitations in visitor email and phone
computation, notably phone of partner is not taken into account (only mobile)
and computation does not work in website_crm if there are no leads.
In this commit we
* support both mobile and phone fields of partner. Indeed generally all
SMS flows check for those two fields and not only for mobile;
* replace the SQL by standard ORM computation. As those fields are not stored
and displayed in list views ORM should be capable of managing them;
* avoid crash when creating visitors through the UI (no ids -> don't go
into raw SQL);
* correctly keep partner-based values when no lead is linked to the visitor;
Tests are also added in order to ensure behavior.
Task ID 2196869
closes odoo/odoo#48369
X-original-commit: 02ceb42e204be2b40b334b4e554eef6dfaffd228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_crm/tests/__init__.py')
| -rw-r--r-- | addons/website_crm/tests/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website_crm/tests/__init__.py b/addons/website_crm/tests/__init__.py index 1600ebf1a27..ba4af1674ec 100644 --- a/addons/website_crm/tests/__init__.py +++ b/addons/website_crm/tests/__init__.py @@ -2,3 +2,4 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import test_website_crm +from . import test_website_visitor |
