Commit Graph
442 Commits
Author SHA1 Message Date
Thibault Delavallée 3a7b08e5cf [REF] website(_crm): improve code about contacting visitors
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
2020-02-13 15:29:40 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
fja-odoo 07bb2e4591 [FIX] website_form, *: add submit btn position option
* = 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
2020-02-11 17:35:06 +00:00
fja-odoo 67d9eafd2e [FIX] website_form, *: fix new website form
* = 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

closes odoo/odoo#44911

X-original-commit: 3cf87cc1cb179598cecb736728378e330d3b2e22
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 18:34:34 +00:00
fja-odoo 617eba9417 [IMP] website_form, *: entirely review s_website_form snippet
*: 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

closes odoo/odoo#42189

Related: odoo/enterprise#7365
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-05 16:13:25 +00:00
David Beguin 95fe5f8baa [FIX] website_crm: fix link visitor to lead on insert_record override
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 #43731

closes odoo/odoo#43814

X-original-commit: 37d4fa4385c6c98bff6b5adc7b6aa0ee325c49eb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-23 08:38:08 +00:00
Thibault Delavallée f82eadf9d0 [IMP] crm: add comments in code about crm lead to opportunity
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>
2020-01-10 16:06:44 +00:00
Prakash Prajapati c6d8b2a01d [IMP] website_crm: review some english terms
task-2082970

closes odoo/odoo#42390

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 10:57:31 +00:00
David Beguin 83a170360e [FIX] website_crm : add acls to salesmen to see visitors and page views
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
2019-11-20 13:32:59 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Debauche Stéphane a7d029afa7 [FIX] crm_website: fix the type of a lead created with the contact form
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 #2124421

closes odoo/odoo#40418

X-original-commit: 8758bdc24297032ba8fd65f637a6990c6351dd27
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-18 11:49:28 +00:00
Xavier-Do eb2f0aabcf [FIX] *: various fixes in xml views 2019-11-13 11:05:14 +00:00
Jeremy Kersten fef7ec7c97 [FIX] website,*: remove useless route from sitemap
preparation for cleaning of v13
task-2065018

closes odoo/odoo#39051

X-original-commit: 8a0fc6476c70a4126043de3b3efbd1096e41f968
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-18 14:59:02 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
fja-odoo 950f252ba6 [FIX] website: rename user_partner_id -> partner_id
It is just a partner_id not a user related field

task-2072877

closes odoo/odoo#37102

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-01 19:50:00 +00:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
David Beguin 218f1c63ea [FIX] website : fix visitor email and phone computing
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>
2019-09-27 08:47:50 +00:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Martin Trigaux c667e95224 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37274

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 07:33:09 +00:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
David Beguin 7f485c8d10 [IMP] website, website_* : improve visitor kanban view
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>
2019-09-20 09:40:26 +00:00
David Beguin 83e67319f0 [FIX] website_crm : fix lead's visitor page views
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
2019-09-17 14:12:22 +00:00
David Beguin 78c3952c3e [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
2019-09-17 14:12:20 +00:00
David Beguin 6f5abf933b [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
2019-09-17 14:12:19 +00:00
fja-odoo e33172e832 [IMP] website_sale, *: keep track of products viewed
*= 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

closes odoo/odoo#35810

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-16 09:38:53 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 73e70673e7 [I18N] *: export saas-12.5 source terms
closes odoo/odoo#36853

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-13 11:38:37 +00:00
David Beguin 7759db881d [REF-IMP] website, website_crm : handle visitors at merge leads and readd page_views stat button on leads
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
2019-09-11 14:12:06 +00:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
David Beguin 3977e28baf [MOV-IMP] crm : move crm.lead.lang_id from enterprise to community
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
2019-08-19 06:34:20 +00:00
David Beguin 498d2a8080 [IMP] website_crm : link crm.lead to website.visitor
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
2019-08-19 06:33:37 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Odoo Translation Bot 5a438cec13 [I18N] Update translation terms from Transifex 2019-07-07 06:07:54 +02:00
Odoo Translation Bot 57320593f7 [I18N] Update translation terms from Transifex 2019-07-07 01:19:07 +02:00
Odoo Translation Bot 53b6ab9f05 [I18N] Update translation terms from Transifex 2019-06-23 01:17:13 +02:00
Martin Trigaux 52936ec260 [I18N] *: export saas-12.3 source terms
closes odoo/odoo#34068

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-12 12:39:50 +00:00
Martin Trigaux 00ef2653da [MERGE] Forward port of 12.0 to saas-12.2 up to 3b1d00acda
closes odoo/odoo#34732

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 10:14:06 +00:00
Romain Derie fdbf11643f [IMP] *: move test and tour files to new folder hierarchy and asset
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/4281
Closes #33213
2019-06-05 05:56:33 +00:00
Odoo Translation Bot 28382b76d8 [I18N] Update translation terms from Transifex 2019-06-02 01:18:32 +02:00
qmo-odoo 0d2be38333 [IMP] crm,sale,*: Improve UX
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
2019-07-30 11:46:30 +00:00