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

[MERGE][ADD-IMP] website_* : apply multiple improvements on visitor #36290

Closed

Conversation

@dbeguin
Copy link
Contributor

commented Aug 30, 2019

PURPOSE

Perform a back2basics on recently-merged and recently-under-merged website
visitor concept. Main points to add are sending emails and sms to visitors
as well as improving integration.

SPECIFICATIONS

Applies various improvements:

  • Add graph view on visitors;
  • Remove welcome message if chat request usecase;
  • If a visitor is online: line is green / if offline: line is red (in the
    list view);
  • Visitors list view: add first / last connection fields and remove
    time_since_last_action;
  • Avoid useless leave notification if the livechat channel is empty;
  • Delete the first message "hello, how may i help you?" on a live chat
    request when I start a live chat;
  • Send mail to visitor linked to res.partner or linked to a crm.lead. New
    simplified wizard to post_message on lead or on res_partner if any
    (priority to lead). If the lead has a res_partner and not the visitor, set
    the partner on the visitor If the lead has no partner, create a partner
    based on the lead and link it to the visitor;
  • send a sms to a visitor if the visitor is linked to a least 1 lead that
    has a mobile number or a phone number or is linked to a res.partner with
    mobile number. As in contact form from website, there is only a phone field
    and not a mobile one, we allow to send sms if the lead phone field is
    filled;

Fixes :

  • ACLS on website_visitor_page model (for im_livechat_group_user)
  • Update visitor lang if visitor change the website lang.
  • Create visitor twice when translated website (due to rerouting)

See sub commit for more informations

LINKS

Task ID : 2070272

@robodoo robodoo added the seen 🙂 label Aug 30, 2019

@C3POdoo C3POdoo added the RD label Aug 30, 2019

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch from db2ead5 to 8f687da Aug 30, 2019

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch 3 times, most recently from fd40393 to fa6a39a Sep 9, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[IMP] crm : factorise get_lead_by_confidence_level to prepare next co…
…mmits

In order to prepare the send mail to visitor that are linked to leads,
getting lead by confidence level must be factorised to avoid code duplicates.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix ACLS on website_visitor_page model (for im_livechat_group_user)

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR odoo#36290

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch from fa6a39a to d4cfbc6 Sep 9, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 9, 2019
[ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR odoo#36290

@robodoo robodoo added the CI 🤖 label Sep 9, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] crm : factorise get_lead_by_confidence_level to prepare next co…
…mmits

In order to prepare the send mail to visitor that are linked to leads,
getting lead by confidence level must be factorised to avoid code duplicates.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix ACLS on website_visitor_page model (for im_livechat_group_user)

Task ID: 2056080
PR odoo#36290

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch from d4cfbc6 to 1f6a1a3 Sep 10, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR odoo#36290

@robodoo robodoo removed the CI 🤖 label Sep 10, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix ACLS on website_visitor_page model (for im_livechat_group_user)

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR odoo#36290

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch from 1f6a1a3 to 12148b0 Sep 10, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix ACLS on website_visitor_page model (for im_livechat_group_user)

Task ID: 2056080
PR odoo#36290
dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 10, 2019
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR odoo#36290

@robodoo robodoo added the CI 🤖 label Sep 17, 2019

dbeguin added a commit to odoo-dev/odoo that referenced this pull request Sep 17, 2019
[FIX] website_crm : fix lead's visitor page views
since e33172e,
visitor_page_ids have been renamed into website_track_ids.
But the renaming of this field has not been applied on all usages.

This commit applies the renaming to usage in website_crm.

Task ID: 2056080
PR odoo#36290

@robodoo robodoo removed the CI 🤖 label Sep 17, 2019

@tde-banana-odoo
Copy link
Contributor

left a comment

LGTM

@@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_im_livechat_channel_public,im_livechat.channel.public,im_livechat.model_im_livechat_channel,,1,0,0,0
access_website_visitor_livechat_users,website.visitor.livechat.users,model_website_visitor,im_livechat.im_livechat_group_user,1,0,0,0
access_website_tack_livechat_users,website.track.livechat.users,website.model_website_track,im_livechat.im_livechat_group_user,1,0,0,0

This comment has been minimized.

Copy link
@tde-banana-odoo

tde-banana-odoo Sep 17, 2019

Contributor

Typo: access_website_tack_livechat_users -> access_website_track_livechat_users

dbeguin added 7 commits Aug 28, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)
  - Avatar for visitor banner in discuss. (image_64 instead of old image_small)

Task ID: 2056080
PR #36290
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR #36290
[IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR #36290
[ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR #36290
[ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR #36290
[FIX] website,website_livechat : restore chat request feature
since e33172e,
a chat request could not be sent to a visitor as the website was not
set anymore on the visitor and the mail_channel could then not be
assigned to a livechat_channel (using the website_id).

This commit restore the feature using the new temporary model
website.visitor.lastconnection.

Task ID: 2056080
PR #36290
[FIX] website_crm : fix lead's visitor page views
since e33172e,
visitor_page_ids have been renamed into website_track_ids.
But the renaming of this field has not been applied on all usages.

This commit applies the renaming to usage in website_crm.

Task ID: 2056080
PR #36290

@dbeguin dbeguin force-pushed the odoo-dev:saas-12.5-website-visitor-imp-dbe branch from 2a94028 to 9dc11f3 Sep 17, 2019

@tde-banana-odoo

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

@robodoo r+ rebase-merge

@robodoo

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

Merge method set to rebase and merge, using the PR as merge commit message

robodoo pushed a commit that referenced this pull request Sep 17, 2019
[IMP] crm : factorise get_lead_by_confidence_level to prepare next co…
…mmits

In order to prepare the send mail to visitor that are linked to leads,
getting lead by confidence level must be factorised to avoid code duplicates.

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)
  - Avatar for visitor banner in discuss. (image_64 instead of old image_small)

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[FIX] website,website_livechat : restore chat request feature
since e33172e,
a chat request could not be sent to a visitor as the website was not
set anymore on the visitor and the mail_channel could then not be
assigned to a livechat_channel (using the website_id).

This commit restore the feature using the new temporary model
website.visitor.lastconnection.

Task ID: 2056080
PR #36290
robodoo pushed a commit that referenced this pull request Sep 17, 2019
[FIX] website_crm : fix lead's visitor page views
since e33172e,
visitor_page_ids have been renamed into website_track_ids.
But the renaming of this field has not been applied on all usages.

This commit applies the renaming to usage in website_crm.

Task ID: 2056080
PR #36290
robodoo added a commit that referenced this pull request Sep 17, 2019
[MERGE][ADD-IMP] website_* : apply multiple improvements on visitor
PURPOSE

Perform a back2basics on recently-merged and recently-under-merged website
visitor concept. Main points to add are sending emails and sms to visitors
as well as improving integration.

SPECIFICATIONS

Applies various improvements:
  - Add graph view on visitors;
  - Remove welcome message if chat request usecase;
  - If a visitor is online: line is green / if offline: line is red (in the
    list view);
  - Visitors list view: add first / last connection fields and remove
    time_since_last_action;
  - Avoid useless leave notification if the livechat channel is empty;
  - Delete the first message "hello, how may i help you?" on a live chat
    request when I start a live chat;
  - Send mail to visitor linked to res.partner or linked to a crm.lead. New
    simplified wizard to post_message on lead or on res_partner if any
    (priority to lead). If the lead has a res_partner and not the visitor, set
    the partner on the visitor If the lead has no partner, create a partner
    based on the lead and link it to the visitor;
  - send a sms to a visitor if the visitor is linked to a least 1 lead that
    has a mobile number or a phone number or is linked to a res.partner with
    mobile number. As in contact form from website, there is only a phone field
    and not a mobile one, we allow to send sms if the lead phone field is
    filled;

Fixes :
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)

See sub commit for more informations

LINKS

Task ID : 2070272

closes #36290

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

Merged at 2476be9, thanks!

@robodoo robodoo closed this Sep 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.