Commit Graph
137135 Commits
Author SHA1 Message Date
Victor Feyens b932ea75fe [FIX] barcodes: wrong translation specification
String formatting was wrong because the mapping wasn't specified.

Finetuning of
https://github.com/odoo/odoo/commit/8a8d482b43394f834bc0ddf3cb0c0c62f11b90b1
2020-07-22 11:01:28 +00:00
Thibault Francois ec56db3c66 [FIX] base: access right on partner merge wizard are too restricted
Before this commit only admin setting user can merge contact which is a bit to restrictive

Contract Creation group seems more adequate

closes odoo/odoo#54831

X-original-commit: b5d5bc30dd3769deab09cbc0915741a93df229ef
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-23 11:32:39 +00:00
william 1a67344694 [FIX] account: sequence fetch next sequence correctly
Before, if we had PREFIX/9 and PREFIX/10, the highest number was the
lexicographic order, leading to proposing PREFIX/10 again and again.

Because of performances, we can't execute the regex in the SELECT query
and we need to store it in the database. This will allow to do an
indexed search.

closes odoo/odoo#54811

X-original-commit: 8806f33ef68771834496b764aa4c37b7ccf5841a
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-23 09:44:25 +00:00
Aaron Bohy 11857adec0 [IMP] web,barcodes: speed up form view rendering
Large form views (containing a lot of fields), e.g. the crm.lead
form view, take a while to render (~ 250 ms). Most form views
contain several (sometimes a lot) invisible fields (invisible="1"),
whose only purpose in the view is to be fetched, so that they can
be used to evalute domains and contexts.

This commit implements a trivial optimization of the form renderer,
which consists in skipping the rendering of those invisible fields.
With this change, we gain ~25% of rendering time on the crm.lead
form view.

closes odoo/odoo#54368

Related: odoo/enterprise#11875
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-07-16 09:19:46 +00:00
Aaron Bohy 12cc5fd0cc [IMP] web: benchmark: revive benchmark suite
The benchmark suite has been broken for a while, by several
refactorings (e.g. use of native Promise). This commit makes it
work again. We do not use it much, but maybe we should as it can
be useful to track changes (mostly in view renderers) that impact
performances.
2020-07-16 07:03:05 +00:00
Thibault Francois 6f47bfd916 [FIX] base: cloc test and default exclude
- Python code is counted slightly differently
in python 3.8.

```python
a = """
  str
"""
```

is counted as 2 lines until python 3.7
and only one since python 3.8

This change will not impact a lot the count
but we have to make sure the test will pass
if the test are run
on python 3.8

- the folder migrations is not maintained
from version to version and thus should not be
counted for the maintenance.

closes odoo/odoo#54537

X-original-commit: 2a57a156c7b8e81c01afa095b3291361d208611f
Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
2020-07-15 18:49:20 +00:00
Odoo's Mergebot 2ff1ff6364 [FW][MERGE] base, website_event(_track): provide website menu related cleanings
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

base: support format on duration field when not in digital display

website_event(_track): reorganize website menu management code: move it in
order to have it clearly separated from other code, easening future changes

website_event(_track): improve tests and test classes

website_event_track: add missing views for website menu model: this helps
debugging and tracking what happens with those event-specific menus

LINKS

PR #54801
Task ID 2304817 (Event Preparation 3)
Prepares Task ID 2252655 (Main Online Event task)
Prepares Task ID 2283796 (Event B2Basics)

closes odoo/odoo#54822

Forward-port-of: odoo/odoo#54801
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-07-23 12:47:22 +02:00
Thibault Delavallée 5079891144 [IMP] website_event_track: add views for website menu model
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Add missing views for website menu model. This helps debugging and tracking
what happens with those event-specific menus.

LINKS

PR #54801
Task ID 2304817 (Event Preparation 3)
Prepares Task ID 2252655 (Main Online Event task)
Prepares Task ID 2283796 (Event B2Basics)

X-original-commit: 92f4e01c35460afd8aeee5ed9790e10850b68109
2020-07-23 09:55:03 +00:00
Thibault Delavallée cbee702ba4 [REF] website_event(_track): improve tests and test classes
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff., ...

SPECIFICATIONS

Improve website_event and website_event_track test coding style, notably

  * use specific users when performing tests to trigger access rights issues
    (this notably allowed to find an issue with event groups not allowed to
    update menus);
  * define common classes;

LINKS

PR #54801
Task ID 2304817 (Event Preparation 3)
Prepares Task ID 2252655 (Main Online Event task)
Prepares Task ID 2283796 (Event B2Basics)

X-original-commit: 774211c7e4667c5350ac090510e72c106f2d10b6
2020-07-23 09:55:02 +00:00
Thibault Delavallée 1db746419f [REF] website_event(_track): reorganize website menu management code
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

In this commit we simply move some code in website_event and event_track to
better separate code about menu management from other code. It allows to
understand code organization and will lessen diff of future commits improving
menu management.

LINKS

PR #54801
Task ID 2304817 (Event Preparation 3)
Prepares Task ID 2252655 (Main Online Event task)
Prepares Task ID 2283796 (Event B2Basics)

X-original-commit: 35b265f1950e9f2977edc940645c35efef19e3c9
2020-07-23 09:55:01 +00:00
Thibault Delavallée 309d090ff1 [IMP] base: add format support on duration field
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

In this commit we add support of formatting on duration widget. Possible values
are long, short and narrow (see babel formatting options). This option is not
used in digital display mode.

LINKS

PR #54801
Task ID 2304817 (Event Preparation 3)
Prepares Task ID 2252655 (Main Online Event task)
Prepares Task ID 2283796 (Event B2Basics)

X-original-commit: 468a30b0057f4f1c4fba409f4b4baa4f889aad12
2020-07-23 09:55:00 +00:00
Rémi Rahir 3d08f7d4c8 [FIX] sale_timesheet: correctly trigger compute
Revision fad3ed7ce4 introduced a forced
recompute of `billable_type` which unfortunately has repercutions
(compute triggers) upon every single task of a project, meaning that it
will not scale properly as the number of tasks grows and it is now
called everytime we want to access a project view form whch is a
terrible performance drop.

The underlying issue that it tried to address was that the field
billable_type was not correctly computed when deleting the linked
sale_order_id from the project. This happens because when deleting a
record, it is PSQL that sets relational m2o value (in this cas
sale_order_id to NULL and the ORM has no way to catch that information.

A proper fix consists to change the dependency of the computed field
from the m2o to one of its fields. This will properly mark
'billable_type' to be recomputed when unlinking the sale order.

Note that to avoid useless recomputation which would lead to the sale
result, we rely on a filed that should not change once the sale order is
created.

closes odoo/odoo#54817

X-original-commit: 4f2b532c3ef4ebd9beb2a448f59c4e645ba1e8a1
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-07-23 09:21:18 +00:00
Andrea Grazioso (agr-odoo) b8df944416 [FIX] payment: fix payment processing via external link
Select a sales order.
Go to action > generate payment link.
Open private browser, reach the link.

User will receive error message because of access denied to the
res.partner data.

opw-2287534

closes odoo/odoo#54808

X-original-commit: 3b4f3a8ad2880721cf6de9fb08387412df85d356
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-23 08:04:43 +00:00
Nasreddin (bon) 25d35310d0 [FIX] website_slides: Google drive video not starting
Issue

	- Install "eLearning" app
	- Add video to course
	- Open video course in fullscreen mode

	1. Google drive error message
	2. Video still loading

Cause

	1. The base google drive video url has no params,
	   and when adding params, missing the "?" before them.
	2. 'autoplay' param make crash the launcher.

Solution

	1. Use URL javascript library to append params.
	2. Let "autoplay" param only for non google drive video.

opw-2294344

closes odoo/odoo#54793

X-original-commit: 6da17c3ee1e0c63b0cace60da2f98cfc4fe8ac57
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-07-22 16:14:26 +00:00
root e3f68b9ba8 [IMP] base: specify which order is invalid
Before this commit knowing which _order option was having issues may
be non-obvious.
This changes makes it a bit more obvious.

closes odoo/odoo#54703

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-23 08:58:48 +00:00
Robin Heinz c6d5948c75 [FIX] Delivery: Endless decimal display on list price
When creating a new delivery method with a provider based on rules, if the base list_base_price was equal to x.8, that ended to a float with endless decimal. (eg: 2.8000000000003)
This fix modify the display to show a rounded value.

closes odoo/odoo#54177

Task-id: 2272472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-22 12:47:37 +00:00
Simon Lejeune 5adb0463ea [FIX] stock: default quantity to return
The code was wrongly always taking the reserved quantity on the already
returned moves, but if they're done their value is zero.

task-2291973

closes odoo/odoo#54807

X-original-commit: 7b08f0ae0a39e8f575b21e744de16264b6365704
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-23 08:00:08 +00:00
Benjamin Frantzen (bfr) f81c83153e [FIX] l10n_se_ocr, account : renamed old reference to invoice_payment_ref to payment_reference
closes odoo/odoo#54735

X-original-commit: a44db615d1fa6443810e88cc55471aff110c1393
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-22 06:37:26 +00:00
Benjamin Frantzen (bfr) 6827951451 [FIX] l10_ar: fix constrains
- type has been renamed to move_type
- l10n_latam_use_documents is not writeable

X-original-commit: 048248d4c7b0ebd04652cc82652b2e11bfd1780b
2020-07-22 06:37:26 +00:00
Andrea Grazioso (agr-odoo) ff64332424 [FIX] account: No account on invoice lines
Create a product category with no accounts defined
Create a product [DEMO] in such category with no account defined
Create an invoice with the default journal which will have the default
account

Create an invoice line with [DEMO]
Upon selecting the product the default account taken from the journal
get cleared and there will be no replacement.
Since the account field is mandatory the account should be preserved

opw-2299228

closes odoo/odoo#54751

X-original-commit: f4c41997cfd560ded6d387324e5dbcf1b7183a36
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-22 09:37:07 +00:00
Nicolas Lempereur 3922182c97 [FIX] portal: hide public user avatar in chatter
On a chatter portal, when the user is using access token to display
record and is not connected, the message will be posted as the record
partner_id.

But then the preview of avatar in the composer is wrong: you see a
broken image (because you don't have access to "public user" partner
avatar) and when you post it anyway you see the avatar of the record
partner and not public user.

In this commit, if we are seeing the record with token and are logged
out as public user, we will not show the avatar in composer.

(note: before 13.0, the "public user" partner avatar was working)

opw-2276498
closes #54720

closes odoo/odoo#54782

X-original-commit: 97473f6a25336e8994730e7722cffb6fd0dbc6d7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-07-22 13:51:34 +00:00
Robin Heinz 5cb25d43eb [IMP] point_of_sale: add setting for manual discount.
Add an option in the pos config to disallow the use of manual discount per order line.

closes odoo/odoo#51172

Task-id: 2082140
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-17 13:55:45 +00:00
Odoo's Mergebot 0fd287badd [IMP] web, web_tour: no dropdown for only one CTA
**PURPOSE:**
When there's only one CTA, the Action button is not necessary and add one extra clicks.

**SPECIFICATION:**
When there's only one CTA, do no group in an Action button.

**LINKS:**
Task ID: 2225270

closes odoo/odoo#51265

Related: odoo/enterprise#10602
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-07-22 15:57:27 +02:00
Romeo Fragomeli e15b5e16f5 [IMP] web: allow to override statusbar's buttons renderer
Related PR odoo/enterprise#10602
Task ID: 2225270
2020-07-22 12:58:46 +00:00
Siddarth Gajjar d4e3298b8b [IMP] web_tour: adapt statusBar CTA helper function
Now that for a single visible button there is no 'Action' dropdown, the
tour helper function has to be adapted.

Related PR odoo/enterprise#10602
Task ID: 2225270
2020-07-22 12:58:35 +00:00
Nicolas Martinelli 9bc3760af0 [FIX] point_of_sale, pos_hr: move image in appropriate module
Commit 987951a8d4 moved the CSS file from `point_of_sale` to
`pos_hr`. A file was forgotten.

opw-2293465

closes odoo/odoo#54771

X-original-commit: c0fd47d0993cdbf84cf4d13723e172399d119da5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-22 11:15:18 +00:00
qsm-odoo d8e05bd64d [FIX] web_editor: restore custom snippet delete button
Clicking on the delete button of custom snippets was not working anymore
since [1]. Indeed, that button is placed inside the snippet thumbnail
which is the drag handle for the drag and drop feature. Since we now
start the drag as soon as the mouse is mousedown-ed, then the click on
the delete button cannot be intercepted.

This commit solves the problem by placing the delete button out of the
thumbnail element.

[1]: https://github.com/odoo/odoo/commit/ab72fe6c4681f62dc670f1cf1ac6fa47abd301f6

closes odoo/odoo#54770

X-original-commit: dac122935ac5c20526e529b09bf019f15a290d59
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-22 11:29:04 +00:00
Odoo's Mergebot 958c66011f [FW][MERGE] event_*: provide various fixes
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

event_sale: do not copy SO information when duplicating a registration.
Indeed it makes no sense and leads to incoherent billing information.

website_event: fix ACL issue when updating menus through event fields
while not being website editor.

website_sale: fix visitor tests, make them independent from demo data.

LINKS

Task ID-2300907 (Event Bugprovements 2)
Prepares Task ID-2283796 (Event B2Basics)
Prepares Task ID-2252655 (master Online Event task)

closes odoo/odoo#54769

Forward-port-of: odoo/odoo#54627
Forward-port-of: odoo/odoo#54621
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-22 14:06:10 +02:00
Thibault Delavallée f7e7a273cc [IMP] website_sale: make visitor test independent from demo
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

Make visitor tests in website_sale independent from existing visitors and
specially about demo data. Adding demo data makes tests crash which is not
the expected assert of visitor tests.

LINKS

Task ID-2300907 (Event Bugprovements 2)
PR #54621

X-original-commit: 971f26a14d5cbafd65f4370eac14f4cd762b5b44
2020-07-22 11:13:18 +00:00
Thibault Delavallée 97c6a79fba [FIX] website_event: allow event users to update menu entries
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

Fix issue when updating menu organization fields on an event. Indeed it implies
some website menu and pages creation or unlink. Currently it crahes as only
website people can do it. Being an event user or manager should be sufficient
to update those menus

LINKS

Task ID-2300907 (Event Bugprovements 2)
PR #54621

X-original-commit: 264ebb6af3e991030a2f803281b90267502a0f84
2020-07-22 11:13:18 +00:00
Xavier Dubuc c43cdd3f19 [IMP] mail: hide message error notifications if not origin thread
task-2282370

closes odoo/odoo#54768

X-original-commit: 4f693105bcaac7546590302cdc25c2b11b0f42cd
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-22 11:12:35 +00:00
David Beguin 1c2bc40a95 [FIX] survey: count answer as incorrect only if no correct answer in survey finish page graph
Before this commit, when computing the result graph data in the survey finished
page, a user answer for a question with no correct answer was counted twice,
once as correct, once as incorrect, as :
correct_answer == question_correct_answer == none

After this commit, we count an answer as correct only if question has a correct
answer.

Task ID: 2176630

closes odoo/odoo#54755

X-original-commit: 74a00111908556bce10ea3a5e748f5a5c81f6a40
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-22 10:06:28 +00:00
Mohammed Shekha e5ef19b730 [IMP] web: improve explanatory comment in owl_compatibility
after this commit, to update legacy widget from owl component,
one need to override renderWidget and updateWidget instead of
render and update method, this has been changed from commit
https://github.com/odoo/odoo/commit/f2de55322e4d417815e6757517163dd0cff544cc

but comment were still has render and update method to override,
so with this commit update comments as well.

task-2238551

closes odoo/odoo#54763

X-original-commit: 16713aaacbd4f4a25bed435bfa9045fab29a8c53
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-22 10:40:14 +00:00
Hiral Bhavsar d8284d84bc [FIX] mail: update and re-render the activity view
Before this commit: when props change, the internal state of the widget not
updated for the activity view. So it creating many issues:
    - The count of the progress bar doesn't go to update while scheduling
      the activity of the same type.
    - Date displayed on cell not getting updated while changing the
      due date by clicking on the cell.

This commit will update legacy widget from owl component, one need to override
renderWidget and updateWidget instead of render and update method as this has
been changed from commit https://github.com/odoo/odoo/commit/f2de55322e4d417815e6757517163dd0cff544cc

After this commit: the acivity view will be updated based on activity changes

Task-2238551
PR https://github.com/odoo/odoo/pull/54734

X-original-commit: 02c7d121935ab1b26d896e31eb0c90bf2b7abff8
2020-07-22 10:40:13 +00:00
yhu-odoo b3c8287dc5 [IMP] mrp,stock(_picking_batch): improve empty screen
1. Batch transfers: set demo data backgroud for Kanban & Tree
2. Packages: set demo data backgroud for Kanban & Tree, update the
helper message.
3. Lot/SN: improve helper message.
4. Stock inventory: use a scanner instead of the smilling face in the
helper.
5. Replenishment: Enable sample data and use new helper image.
6. mrp: Enable sample date and use new helper image for workorder.

Task 2253588
PR #54415

closes odoo/odoo#54741

X-original-commit: 7c75ec9951f6d55121d6dc8cb4942e96641b4a66
Related: odoo/enterprise#11957
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-22 08:53:36 +00:00
yhu-odoo d976eb072a [IMP] mrp: Add empty screen sample to work center overview
Enable empty screen sample for work center overview, and improve the
helper message of work center and work order. We also removed create
button in the list view of work orders, and no create in calendar.

Task 2253588
PR #54415

X-original-commit: 26c7802f64b37fdb3159bef9b23741ec3fca4f01
2020-07-22 08:53:36 +00:00
yhu-odoo b9ffee84e4 [IMP] product: Add helper to vendor pricelist
How can we don't have the smiling face before?

Task 2253588
PR #54415

X-original-commit: ce7a16e649908a88f962a6b4c6c05e113457428b
2020-07-22 08:53:35 +00:00
qsm-odoo 85531edd1b [FIX] web_editor, *: restore editor UI for selected CSS variables
*: website

Commit [1] broke the UI for some options related to CSS variables when
using Chrome. The commit made sure the string-value CSS variables are
printed with quotes, so that the JS representation of the CSS values can
distinguish them (strings = strings with surrounding quotes, others like
colors, numbers, etc = strings without surrounding quotes). With chrome,
the printed surrounding single quotes are read as double quotes for
strange reasons though... so the value "a" was not considered equal to
the value 'a'.

This commit makes sure surrounding quotes are normalized. This is done
through a new utility function to read CSS variables. This also makes
sure the values are trimmed, and colors normalized.

[1]: https://github.com/odoo/odoo/commit/3a34e39caa8544059dfb1888edc29c62c3efde31

closes odoo/odoo#54757

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-22 10:31:28 +00:00
Ivan Yelizariev 6d96111196 [FIX] doc: fix typo in guidelines
You can see on example below the updated line that it's module_name and not model_name

<!-- security -->
<record id="module_name_group_user" model="res.groups">
    ...
</record>

closes odoo/odoo#54756

X-original-commit: 56de03befa16eeaaec211b5fc08116ce778b52b7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-22 10:15:12 +00:00
Jeremy Kersten 79807d6907 [IMP] base, website_sale: handle required zip/state on eCommerce
task-2172788

closes odoo/odoo#54746

Related: odoo/upgrade#1509
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-22 09:56:03 +00:00
Antoine Prieels a2a8a91b9f [FIX] point_of_sale: Refresh customer display on payment line change
The customer display was not refreshed when changing the amount of a
payment line.

closes odoo/odoo#54747

X-original-commit: 6e114dcd4e3569b005f5fa2770b4261d53b348fb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-22 09:28:24 +00:00
Odoo's Mergebot affa40bc21 [FW][MERGE] website: improve visitor synchronization and tests
RATIONALE

Event will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff and have a smooth integration in a stable
version (13.3).

PURPOSE

Purpose of this merge is to clean visitor synchronization and tests. It
prepares further improvements to visitor model linked to Event Online.

SPECIFICATIONS

Clean existing visitor tests. Use HttpCaseWithUserDemo. Make tests
independent from existing database data, notably existing visitors.
Currently if any visitor is present in db tests crash as they are badly
designed.

Introduce a mock for visitor from request allowing to shortcut some visitor /
user synchronization and test directly expected results without too much
boilerplate in tests.

Add anchor methods to somehow merge visitors and update partner linked
to visitors and their sub records. In this stable we cannot remove current
unlink of duplicate visitors due to constraint of partner_id / visitor_id.
However those methods allow to tweak behavior by override. This will be
done in future tasks.

Introduce a new configuration parameter in website allowing to set number of
days before de-activating visitors: ``website.visitor.live.days`` . It is
set to 30 days instead of 7 as before.

See sub commits for more details

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares  Task ID 2284043 (Visitor-based track wishlist)
PR odoo/odoo#54036

closes odoo/odoo#54078

Forward-port-of: odoo/odoo#54036
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-22 11:45:03 +02:00
8ae4544b76 [REF] website: improve visitor / user synchronization at authenticate
RATIONALE

Event will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff and have a smooth integration in a stable
version (13.3).

PURPOSE

Purpose of this merge is to clean visitor synchronization and tests. It
prepares further improvements to visitor model linked to Event Online.

SPECIFICATIONS

Add anchor methods to somehow merge visitors and update partner linked
to visitors and their sub records.

Main idea would be to be able to

  * avoid unlinking visitors, notably because we have keys linked to them
    allowing push notifications. As a given user may be linked to several
    devices (different keys / different visitors) keeping them in database
    improves push efficiency;
  * allow to link sub-records to a main visitor, like tracked pages history,
    even if multiple visitors are linked to the same identity;

In this stable we cannot remove current unlink of duplicate visitors due
to constraint of partner_id / visitor_id. However those methods allow to
tweak behavior by override. This will be done in future tasks.

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares Task ID 2284043 (Visitor-based track wishlist)
PR #54036

X-original-commit: 8a8d2d4412d1b58545ee4f0240cca5114e541b6a
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-07-22 09:02:55 +00:00
2648840624 [REF] website: allow to configure delay before archiving visitors
RATIONALE

Event will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff and have a smooth integration in a stable
version (13.3).

PURPOSE

Purpose of this merge is to clean visitor synchronization and tests. It
prepares further improvements to visitor model linked to Event Online.

SPECIFICATIONS

Introduce a new configuration parameter in website allowing to set number of
days before de-activating visitors: ``website.visitor.live.days`` . It is
set to 30 days instead of 7 as before.

Purpose of extending delay is to be able to use visitor information a bit
longer in business flows. For example one could contact visitors 2 weeks
after an event to get their feedback. Adding a bit of delay allow to keep
those visitors alive a bit longer by default. Allowing to configure it gives
more flexibility to admins and deployment.

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares Task ID 2284043 (Visitor-based track wishlist)
PR #54036

X-original-commit: f83af1d53716499dcad94f363aff609a2f8e55d9
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-07-22 09:02:55 +00:00
Thibault Delavallée 17d83775db [IMP] website: improve visitor tests
RATIONALE

Event will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff and have a smooth integration in a stable
version (13.3).

PURPOSE

Purpose of this merge is to clean visitor synchronization and tests. It
prepares further improvements to visitor model linked to Event Online.

SPECIFICATIONS

Make tests independent from existing database data, notably existing visitors.
Use newly-introduced tools and data. Clean tests and make them easier to
understand, notably connection / disconnection effects. Make more tests about
visitor data: name, partner_id, tracks move from visitor to authenticatedf
visitor, ...

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares Task ID 2284043 (Visitor-based track wishlist)
PR #54036

X-original-commit: 015f70dd1ce1394d279f8fbb949948f4845c65fc
2020-07-22 09:02:55 +00:00
Thibault Delavallée 150a24ad81 [IMP] website: use HttpCaseWithUserDemo for tests and clean boostrapping
RATIONALE

Event will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff and have a smooth integration in a stable
version (13.3).

PURPOSE

Purpose of this merge is to clean visitor synchronization and tests. It
prepares further improvements to visitor model linked to Event Online

SPECIFICATIONS

Clean existing visitor tests. Use HttpCaseWithUserDemo and clean bootstrapping
of data.

Introduce a mock for visitor from request allowing to shortcut some visitor /
user synchronization and test directly expected results without too much
boilerplate in tests.

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares Task ID 2284043 (Visitor-based track wishlist)
PR #54036

X-original-commit: 4e0d4e7c315b5a9d880754e02966debd6a59c728
2020-07-22 09:02:55 +00:00
Thibault Delavallée f8b87c959a [IMP] base: have user_admin / partner_admin available in HttpCaseWithUserDemo on self
Purpose is to simplify future tests to have admin data directly available at
hand, both its user and partner. It will ease future test writing.

LINKS

Task ID 2290016 (improve visitor synchronization and tests)
Prepares Task ID 2252655 (main Online Event task)
Prepares Task ID 2284043 (Visitor-based track wishlist)
PR #54036

X-original-commit: f51fd6e54da5ee8aee0df74e6d510dc0b077eba8
2020-07-22 09:02:55 +00:00
Jeremy Kersten 3beb4545c4 [IMP] http_routing: add cache on rewrite computation
Before this commit each url was processed each time, now with have a cache
with the path (withtout query string) as key on each worker.
It reduces drastically the time of the rewrite check on hot. (~10x)

closes odoo/odoo#54690

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-22 07:25:00 +00:00
Jeremy Kersten 9577dcbc3a [IMP] website_[blog/shop/forum]: rename routes to remove 'useless' part
Retro-compatibility routes
2020-07-22 06:53:37 +00:00
Jeremy Kersten 01c17707bd [IMP] website_[blog/shop/forum]: rename routes to remove 'useless' part
Url for a product become:
/shop/productname-id instead of /shop/product/productname-id

Url for a blog post become:
/blog/blogname-1/blogpost-1 instead of /blog/blogname-1/post/blogpost-1

Url for a question on forum become:
/forum/forumname-1/title-1 instead of /forum/forumname-1/question/title-1

task-2295016
2020-07-22 06:53:37 +00:00