Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] website(_crm): fix email and phone computation of visitor #48369

Closed

Conversation

@fw-bot
Copy link
Contributor

fw-bot commented Mar 25, 2020

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;

Task ID 2196869

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #45663
Forward-Port-Of: #45296

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

X-original-commit: 02ceb42
@fw-bot

This comment has been minimized.

Copy link
Contributor Author

fw-bot commented Mar 25, 2020

Ping @tde-banana-odoo
This PR targets master and is the last of the forward-port chain.

To merge the full chain, say

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@tde-banana-odoo

This comment has been minimized.

Copy link
Contributor

tde-banana-odoo commented Mar 25, 2020

@fw-bot r+

@robodoo robodoo added the r+ 👌 label Mar 25, 2020
@C3POdoo C3POdoo added the RD label Mar 25, 2020
@robodoo robodoo added the CI 🤖 label Mar 25, 2020
robodoo pushed a commit that referenced this pull request Mar 25, 2020
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 #48369

X-original-commit: 02ceb42
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo robodoo closed this Mar 25, 2020
@robodoo robodoo deployed to merge Mar 25, 2020 Active
vtu-odoo added a commit to odoo-dev/odoo that referenced this pull request Mar 30, 2020
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#48369

X-original-commit: 02ceb42
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@fw-bot fw-bot deleted the odoo-dev:master-13.0-fixes-12-tde-eNxe-fw branch Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.