Purpose of this commit is to clean mail and SMS composer calls in website_crm
and website_crm_sms by separating composer preparation (context, values) from
customer preparation (check valid data exists, creating partner).
Indeed most of message composer code is based on records having a partner_id
correctly set, unless some templates are used that dynamically creates the
partner. SMS composer is more tolerant and check for phone / mobile numbers to
use.
By the way we make the action name translatable, because why not.
LINKS
Spotted when working on task ID 2056759 (remove crm.partner.binding mixin)
Community PR odoo/odoo#44970
Enterprise PR odoo/enterprise#8307
* = website_crm, website_hr_recruitment, website_sale
It is now possible to change the position of the submit button via
the left panel. Indeed switching to a non-horizontal form left the
submit button aligned with the labels which thus appeared broken.
Part of https://github.com/odoo/odoo/pull/44907
task-2191409
X-original-commit: 60b4c8d04006736be573189accd0dccaafafa651
* = website_crm, website_hr_recruitment, website_sale
Changing label position on existing field was replacing the label with
the default one.
Redirection message was not updating the overlay
Going from show message to redirect without hidding the mesage made the
form d-none
When a select field's label's position was changed the select was not
editable anymore.
Some other miscellaneous fixes
task-2191409
closesodoo/odoo#44911
X-original-commit: 3cf87cc1cb179598cecb736728378e330d3b2e22
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor, website_crm, website_form_project,
website_hr_recruitment, website_sale
The form builder is now using the left panel option system. Many new
options are introduced to build better forms more quickly.
The tests are now running with the new website_form implementation.
Part of: https://github.com/odoo/odoo/pull/42189
task-2092425
closesodoo/odoo#42189
Related: odoo/enterprise#7365
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit fixes the insert_record override where, after calling super,
the visitor is linked a lead with the id got from result, no matter if the
model is lead or not.
This commit adds the check to apply the link between visitor and lead only if
the current model is crm.lead.
Task ID: 2179631
PR #43731closesodoo/odoo#43814
X-original-commit: 37d4fa4385c6c98bff6b5adc7b6aa0ee325c49eb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Try to understand a bit this code with comments. Some unnecessary code is
removed, and some parameters are added to try to understand the various flows,
but main purpose is to understand that mighty spaghetti, not destroy it.
LINKS
Side effect of Task ID 2056759 (remove crm.partner.binding mixin)
Side effect of Task ID 2088565 (crm onchange -> compute)
Community PR #43127
Enterprise PR odoo/enterpreise#7656
Related: odoo/enterprise#7656
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The security file was not loaded in the manifest.
also, the tracking model name has changed to website_track.
Task ID: 2081534
PR #38706
X-original-commit: 0f46998b2b1209eb57cd164b4a5b861f9d2ff71f
Without demo data, for the odoo-master transifex project
closesodoo/odoo#41935
X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía
closesodoo/odoo#41624
X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Lead/Opportunity type
=====================
In the settings, if ``group_use_leads`` is checked, we add the group ``use_leads`` to all users in the group ``base.group_user``
To know if the setting is checked, in the model ``crm.lead``, we compute this code,
```
self.env['res.users'].has_group('crm.group_use_lead')
```
In 12.0
=======
When we compute ``sudo``, we are as the admin user.
The admin user is in the group ``base.group_user`` and so, he can be in the group ``use_leads``,
so everything work fine.
In 13.0
=======
When we perform a ``sudo``, we keep the same user.
But the visitor is not in the group ``base.group_user`` (he is in the group ``base.group_public``)
So, the visitor can never be in the group ``use_leads``
Fix
===
To fix it, we just need to compute the method ``has_group`` as the super user (which is in the group ``base.group_user``).
```
self.with_user(SUPERUSER_ID).env['res.users'].has_group('crm.group_use_lead')
```
Task #2124421closesodoo/odoo#40418
X-original-commit: 8758bdc24297032ba8fd65f637a6990c6351dd27
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When a lead entered a wrong email address in the contact form,
this crashes when loading visitor view.
We were doing a email concatenation to have all the email address
of the leads linked to the visitor.
But as it is a cornet case that shouls not happens often
(to have multiplus email address linked to the visitor)
we will only keep the last email addresse entered by the visitor.
Task ID: 2077182
PR #37472
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit review the design of the visitor kanban view.
There is now two style for kanban card.
Ungrouped : the card takes all the width of the screen. It's simulate a nice tree view.
Grouped : Same design as before. ('normal' kanban card)
Apply visitor kanban views redesign also in :
- website_livechat
- website_crm
- website_sms
Task ID: 2073714
PR #37081
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
since e33172e832,
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
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
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
*= website, website_livechat, website_rating
///// Tracking Product /////
Now when a user browse products in eCommerce, we keep track of the
products he looked at. We use the website_visitor
to store the products viewed. A cookie is added with a TTl of 30 min it
will prevent the RPC for that time. We track the page only if the
product view is tracked.
The recently viewed products are displayed as a snippet but also
with the customize option in product pages of website_sale.
Products that are in cart will not be returned as recently viewed.
It is possible to add a recently viewed product to the cart directly
from the carousel, it will not redirect to the cart. If we are on the
cart page, the product is displayed in the cart.
The Visitor page in website now references products viewed
///// Tracking Page /////
Feature to track a view was remove in: https://github.com/odoo/enterprise/pull/4834
That feature is now reintroduced and will use website_track instead of
leads to be stored.
The track field is now on the view instead of the page.
url field is added to website.track, it will store the url for pages and
views
The Visitor page in website now references urls viewed
Add some tests
task-1984575
closesodoo/odoo#35810
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In order to keep all the visitors from all the leads to merge,
the relation between leads and visitors becomes a many2many.
So that after the lead merge, a lead can have multiple visitors.
This commit re-add the page view stat button that were removed
during website_visitor introduction and page tracking refactoring.
This button counts all the pages views from all the visitors linked
tho the current lead. Clicking on it redirect to the complete
navigation history, from all visitors linked to the lead.
Task ID : 2057428
PR #36180
Since introduction of website_visitor,
we don't need to identifiy the lead with a lead_id cookie.
The visitor is identified and if a lead is created with the
contact form, the lead is created and linked to the visitor.
To avoid losing data, each time a visitor send a contact form,
it creates a new lead. All those leads are linked between them
via the website_visitor.
As the website_visitor already has the lang set on itself,
there is no reason to keep the lang_id of crm_lead at enterprise
side. So that lang_id on crm.lead has been moved to community.
This commit is directly linked to another one in enterprise
See https://github.com/odoo/enterprise/pull/4834 to get more details.
Task ID : 2028059
PR #34624
If a website_visitor submit a contact form (and becomes a lead),
the website_visitor is linked to the crm.lead.
the website visitor name is than adapted to match the name of
the first crm.lead linked to the visitor, ONLY if the visitor doesn't
already have a res.partner.
A visitor can have multiple crm.lead as he can send multiple
contact form and create multiple leads.
Task ID: 34624
PR #2028059
As we now have a new debug mode 'tests' which load a new asset bundle
containing tour-test files, we moved those files to a new folder hierarchy.
That will clean the .js files trees.
Also, those files should be included in the new asset.
Basically, the .js tour files (not test) should be inside /static/src/js/tours
while .js tour test files (test=true) should be inside /static/tests/tours next
to QUnit tests, inside a tours folder.
+ test_new_api: don't run the test in debug assets
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281Closes#33213
This commit improves the ux in CRM by changing a few things:
- Restore the use_leads and use_quotations fields
along with their features as they were in 12.0.
- Hide the email alias if use_upportunities and use_leads
are unchecked.
- Show a link to the general settings instead of the alias_domain
if no alias_domain has been configured.
- fixes the "unassigned lead(s)" link so that
it redirects the user to the actually unassigned leads
Task: #1962182
PR: #32372