* im_livechat, test_event_full, website_blog, website_crm,
website_event, website_event_track, website_event_track_quiz,
webite_livechat, website_sale
There is 6 main changes in this commit:
1. Using raw SQL Upsert instead of the ORM methods. While raw SQL should
generally be avoided, it makes sense for such a low level behavior which
is impacting every flows.
Indeed, tracking visitors is a generic behavior done on all pages and
controllers. It is important to optimize it to reduce processing time
and SQL Queries.
Benchmark of that change alone:
> Rendering a tracked page improves from ~19.5ms to ~17ms (using `ab`
with 1000 loop) and the requests involved in the tracking process are
reduced from 8 SQL Queries to 3:
- 1 request to upsert the visitor
- 1 request to fetch the visitor data
- 1 request to add the tracking record
2. Adding in that upsert query the `visitor.track` insert, creating both
records in one go, bringing the query count from 3 to 2.
3. Refactoring of the `parent_id` behavior that was introduced in stable
with [1]. The purpose was to keep track of multiple visitor linked to a
same user to merge the tracking together. Especially useful for tracking
a same visitor on different devices (when logged in).
Only one visitor was kept as active, others would be archived and their
tracks would be set/moved to the main partner.
Removing those duplicate visitor was not possible because those archived
duplicated visitor were holding the devices notification push token.
Since [2], those token were moved to their own table, all related to the
main visitor.
We can then now safely remove those duplicate visitors after merging
their track to the main visitor. Thus, the `parent_id` field is no more
useful. Removing it removes a layer of complexity.
Note that thanks to this part, the `active` field can also be removed.
4. Deeper functionnal change, inspired from Plausible: The access_token
is no more stored in a cookie but is the result of a hashing method
based on <IP Adress, User Agent>.
The reason behind that change is that, in an upcoming refactoring,
sessions won't be stored anymore unless absolutely needed (login, add to
cart..). It will also ship a no cookies policy, trying to get rid of all
cookies.
This change is bringing some functional changes:
- Since the IP is included in the hash to generate the token, it means
that:
A. If an anonymous user switch IP (eg from 4G to wifi), it is
considered as a new visitor.
B. If 2 anonymous users with the exact same user agent (same browser,
same browser version, same exact os or phone) are on the same IP,
those will be considered as the same visitor.
- Since the request host is not included in the hash, it means that
visiting a DB from 2 differents URLs (domain and/or ip) on the same
device and same browser will result in a shared visitor.
It shouldn't imply any issue as this is A. not wrong and B. mostly
used for tests.
As all this is only related to non logged in user, it shouldn't be a
real issue as anonymous visitors are not supposed to be meant to be
business critical, even if we use them for "a bit more" than simple
analytics data.
5. The access_token is now replaced by the partner_id once the user logs
in, so:
- We don't need to either search on the partner_id field or the
access_token field (depending if the user is logged in or not), we can
only use the access_token row/field to do both.
- On logout, everything works out of the box as the access_token will be
regenerated since there is no partner_id anymore.
- On login, if an access_token matches the user's partner_id, that
visitor is returned.
If there is no such token, a new visitor is created for that partner_id.
In both 2 cases, tracks are moved to that visitor and the anonymous
visitor is removed.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from another user eg,
different user login on same device). Indeed, such collision is not
possible anymore as the access_token automatically match the logged in
user.
- We can remove the code that was in charge of checking if the
access_token / visitor cookie was wrong (coming from a logged in user
while the current visitor is not loggedin). Such collision is not
possible anymore as the access_token is (re)generated as an anonymous
token (hash) when not logged in.
6. There is no more check to prevent a track to be created if there was
already a track for that URL in the last 30 minutes.
While this can easily be re-introduced (one CTE on the upsert), it was
adding ~100ms (from ~20 to ~110ms) to the request on a big database as
Odoo where there is ~100 millions tracks and ~100 millions visitors.
It has been validated that it was not a real issue as it is not
fundamentally wrong. If a visitor visited 20 times a product or a
specific page in that short amount of time, you might want to know that
because the user is most likely interested by it.
Changes (1+2), 3, (4+5) and 6 are all independant from each other and
could have existed on their own.
[1]: https://github.com/odoo/odoo/commit/c6b8a44b970a46dcd87a4e2cb1ad52fa340b209f
[2]: https://github.com/odoo/enterprise/pull/16781/commits/f75090fe8b42484e89e933976e8441d2f5eb9415
task-2867045
closesodoo/odoo#87857
Related: odoo/enterprise#28004
Related: odoo/upgrade#3566
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, every visit on the website would create a visitor
and tracks, including visits from bots and crawlers (e.g. google bot).
Now, we prevent that as it doesn't bring any value to track those bots.
Note that it means there won't be any track created if you are using
tools like `ab` for perf investigation or `curl` commands.
task-2867045
Part-of: odoo/odoo#87857
Follow-up of
https://github.com/odoo/odoo/pull/92896
Task-2871688
PR above introduced PopoverManager, but forgot to include it in the
public discuss view. As a result, no popover view were working.
For example, clicking on the Emoji button in the composer was not
showing the emoji list in a popover view.
closesodoo/odoo#92950
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Recurring entries are created using the 'auto_post' selection field
- 'no' for regular entries
- 'at_date' for non-recurring auto-posted entries
- 'monthly', 'quarterly', 'yearly' for recurring auto-posted entries
Auto-posted entries can also be posted manually.
For recurring entries, the next one is created upon posting.
See : odoo/enterprise#27798
See : odoo/upgrade#3543closesodoo/odoo#92348
Task: 2855545
Signed-off-by: William André (wan) <wan@odoo.com>
- Properly compute the free product quantity.
- Free product that generate points not based on quantity
- Same free product from different rewards
- Proper timing of the reward button highlight. If there are products
that are potentially free product when added, then the reward button
is highlighted.
- Don't reorder free product reward lines. Before, if there are multiple
free product rewards, the lines are reordered at each ui action.
- Loyalty points are computed properly, at least when free products are
involved.
- Introduct some tests to protect the fixes.
closesodoo/odoo#92809
X-original-commit: 3e954d26b7e1e5c41c4f5372010f0573c9adcfe9
Signed-off-by: Masereel Pierre <pim@odoo.com>
Bug
===
Since 9c1cdd330e we ignore all incoming
email sent by mailing lists.
They are real use case when people want to be able to receive email
from mailing list (e.g. if they subscribed to an automated service,
or if someone is in leave and has done a auto-replier for that, etc).
Add a model to whitelist some email address. The alias limit
does not apply for those emails.
Task-2862092
closesodoo/odoo#92015
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Refactor the bank reconciliation widget to use more standards views and have a side-by-side kanban/widget views instead.
- Make sure the bank reconciliation widget is doing the same thing as the "reconcile" method on account.bank.statement.line. Then, what you see on the view is exactly what you get on the corresponding journal entry.
- Since the "reconcile" method is gone, clean the matching rules since it's now called only for one statement line at a time. Also, move the auto_validate feature into a CRON to avoid performance issues when opening the widget.
closesodoo/odoo#91448
Task: 2555114
Related: odoo/enterprise#27360
Related: odoo/upgrade#3555
Signed-off-by: William André (wan) <wan@odoo.com>
Since 'check_number' is now part of the journal item's label, the account_accountant_check_printing module is no longer necessary.
Task: 2555114
Part-of: odoo/odoo#91448
This is useful when you need to get the amount to fully paid something in advance, specially in multi currencies.
Task: 2555114
Part-of: odoo/odoo#91448
In some cases, we want to use the regular FieldMonetary widget (performing the amount rounding correctly) but without displaying the currency symbol since the currency code is displayed elsewhere.
This is needed because some currencies are using the same currency symbol like USD / MXN.
Task: 2555114
Part-of: odoo/odoo#91448
The use case is the following:
- Create a kanban view
- Customize it to open a form view on the right when clicking on a kanban card
- The form view is initialized using the context with a 'default_...' key to set a field.
=> Since the context is different every time, the 'load_views' rpc call is always triggered, leading to performance issues.
Task: 2555114
Part-of: odoo/odoo#91448
account.account: code was already in unique constraint
account.journal: inverting compound unique constraint to benefit from indexing company_id
hr.employee: user_id already in unique index
phone.blacklist: number already in unique index
stock.orderpoint: product_id already in unique constraint/index
closesodoo/odoo#92932
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Somehow the already translated term `Save` in french was translated
again from `Sauvegarder` to `Sauver`.
We already faced that issue when forward porting the tour as that
translation was not the same between versions, see [1].
The tour should be adapted to create a new fake language and some
translations for it (the ones being checked in the tour) to make it more
robust and not impacted by the real translation from transifex.
It would also makes the test faster as it wouldn't have to load a real
language which has a lot of translations.
As this is blocking and preventing any r+ in saas-15.3 a day before the
saas-15.4 freeze/release, this quick fix is introduced in the meantime.
[1]: https://github.com/odoo/odoo/pull/84528#issuecomment-1041323974closesodoo/odoo#92938
X-original-commit: 594ac2c9651f27cc1623fcd5b916cb191241651b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit should be reverted once Chrome has been upgraded to v97+ on
Runbot.
closesodoo/odoo#92921
X-original-commit: abac4e9eb4be8e31f776d745ad1fd19a310c608f
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Since Chrome 97+ some assertions in a parseDateTime test was failing.
This commit adapts these assertions as the behavior in this browser
version is more sensible.
X-original-commit: 866133f5b292ae17b68e1e593cf4c9a29f7e8839
Part-of: odoo/odoo#92921
1. Remove useless props category on component `ChannelMemberListCategory`
2. Make fields of model `DiscussSidebarCategory` more declarative,
i.e. by defining values from compute of field rather than imperative
code somewhere in the code of discuss.
3. Introduce a new model `PopoverManager`, which eases use of `PopoverView`s
as they are automatically added in the DOM in a similar way than `Dialog`s
with `DialogManager` or `ChatWindow`s with `ChatWindowManager`.
Doing so also make these popover view no longer deep child in component tree:
this fixes an issue in which popover views could be cut due to DOM tree.
Task-2871688
closesodoo/odoo#92896
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Access `/web/image/82303?height=16`, traceback because the placeholder
image cannot be resized to `"16"`.
closesodoo/odoo#92891
Signed-off-by: Julien Castiaux <juc@odoo.com>
There was a problem loading the demo data, because at the
installation of the CoA, the document types had not been loaded
yet. By changing the order in which the files are loaded
in the manifest, we make sure that the when we upgrade the demo
data to Ecuadorian standards that the right document type is set.
(as it will be there because it will be loaded before the loading
of the demo data)
closesodoo/odoo#92889
X-original-commit: a641cfb470c5454a8772851f1f9c6c0271b23774
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
We need to complete the onboarding of Stripe connect or
record the secret key
Actually there are not a direct link to payment from POS
So we add a link from the Stripe payment method to Stripe view form
closesodoo/odoo#92869
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Small changes to show and hide some fields by default,
and add some in the view.
task-2855459
closesodoo/odoo#92852
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Improvements to the account move form:
- "Reconciled Entries" button -> "Reconciled Items", and goes now to the
Journal Items list view grouped by Matching number
- Removed the unwanted margin next to the "Journal Items" table (in the
"Journal Items" tab)
- the partner can be hidden, in the Journal Items list view
task-2855459
Part-of: odoo/odoo#92852
Improvements to the Journal Items list view:
- readonly set on multiple fields
- hide/optional show by default on multiple fields
- "Tax Grid" string set on tax_tag_ids for more clarity
- Added multiple fields to the "simple" list view for more consistency
with the grouped list view
- Added an edit button on some "group by" lines to edit the
corresponding field
- Removed the Revert and Duplicate button from the "grouped by" view
(on the group by line)
- Added a button to open the corresponding Journal Entry, and removed
the Journal Item form access. The Journal Item form should not be
accessible anymore.
- Show the total sum for Balance
- Added the "Tax Grid" group by
task-2855459
Part-of: odoo/odoo#92852
It was introduced on js refactoring in v15
closesodoo/odoo#92825
X-original-commit: 4dd941150aba0a11f1fb9c604ce11a149018f97a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
Previously, the "Sales Order" button on projects in the kanban view was
defined in a view intheriting the one where the "Timesheets" button
is defined, which made both buttons always appear next to each other.
However, we wanted to insert the new "Documents" button in between.
This commit creates a new view inheritance inheriting the base kanban
view, so that we can give the order we want to the buttons deterministically.
Related: https://github.com/odoo/enterprise/pull/26696
Related: https://github.com/odoo/upgrade/pull/3557
Task-2802803
closesodoo/odoo#92044
Related: odoo/enterprise#26696
Related: odoo/upgrade#3557
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit gives a name to the Analytics section in the settings
to allow us to change its name easily with an xpath.
It also extracts the attachments domain in tasks so that it can be
overriden in documents_project to exclude attachements linked
to a document.
Related: https://github.com/odoo/enterprise/pull/26696
Related: https://github.com/odoo/upgrade/pull/3557
Task-2802803
Part-of: odoo/odoo#92044
Using lazy values allows you to not do query when the content is not
displayed or if it is already cached. Adding `t-cache` only reduces
render time, but combining it with lazy values saves browses, computes
and query.
Thus for the `/shop` page the page is displayed in 60ms (before: 250ms).
Part-of: odoo/odoo#88276
The `t-cache` directive allows you to keep the rendered result
of a template part. The supplied key must be a tuple. This tuple
can contain recordset in this case the zone will be invalidated
each time the write_date of these records changes.
The `t-nocache` directive makes it possible to force rendering
of a part even if it is in a `t-cache`. The values available in
the `t-nocache` are the one provided when calling the template
(and therefore ignores any t-set that could have been done).
Part-of: odoo/odoo#88276
Issue: The `web.tour` always uses the same date for record creation
or write date. This can add indeterminism regarding the order of
some records. It also prevents to make a comparison with the
write_date or the create_date.
Part-of: odoo/odoo#88276
Before this commit, two lazy values could not always be compared. Indeed,
the comparison did indeed use the value for the self, but not the other.
A normally true comparison was returned as false. Inverting the values
causes the code to pass through the lazy functions of the objects. For
example, if we go through `__lt__` the fact of having reversed the
values means that we will necessarily go through the `__gt__` of the
other.
Part-of: odoo/odoo#88276
Before this commit, the behavior is broken if using lazy values, the
condition using isinstance does not work. It's best to use the slug as
if given the correct value. Indeed, in odoo, we don't have any other
object having `id` as attributes in addition to `seo_name` or
`display_name` and not being a recordset and whose slug we want.
If there is an error, it is imperative that we provided a tuple (from
read).
Part-of: odoo/odoo#88276
Currently MRP only allows sequential scheduling of work orders.
This commit allows to specify the dependencies for work orders to be
scheduled in parallel or in a complex diagram.
By enabling the feature in the settings and at the bom level,
you can specify dependencies between operations:
on the operation form, select the operations on which the
current one depends.
The dependencies will be reflected in work orders during planning.
The workorders Gantt view has been adapted for you to visualize
and manipulate the dependencies.
Please note:
- work orders without predecessors will be started first
- they can all be done in parallel
- when all work orders of this step are finished, their successors
will start
- and so on, step by step
Also, with the feature activated at the bom level and no dependency,
the parallel scheme will be applied (all operations at first step).
Finally, without activation at the bom level, the dependencies will
be created in order to satisfy the current sequential model.
Task: 2691328
Part-of: odoo/odoo#87131
Purpose:
- Move PoS settings in general settings to be consistent with the rest
of Odoo (PoS being the only app where settings are split in two locations)
- Clean settings by enabling obvious settings or dropping unnecessary ones.
closesodoo/odoo#84719
Task-id: 2753430
Related: odoo/upgrade#3260
Related: odoo/enterprise#24425
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit, the loyalty_points field, neccessary to
implement the loyalty functionality in PoS in offline mode,
was only loaded properly for the partners at the start of
a PoS session.
After this commit, the loyalty_points are loaded properly for
every partner throughout the duration of the session, including
those that are loaded in the background or fetched when using
the search bar, which was not the case before.
Part-of: odoo/odoo#84719
Before this commit, if the config setting
limited_products_loading was activated,
some reward products might not get loaded
in the frontend. So the UI crashed whenever a
reward product was accessed.
In this commit we force-load all the reward products
at the start of session, regardless of the number of
loaded products (loading_products_amount)
Part-of: odoo/odoo#84719
When limited_products_amout is 0, query is an
empty list. In this case, we do not need to
modify the result further, so we return it
as is.
Part-of: odoo/odoo#84719
Currently, when we unarchive a single article, it works properly by
making it active again and redirecting user to that article. But
when we try to unarchive multiple articles, it throws traceback.
This commit fixes the issue by properly handling the action for
unarchiving, which now will simply reload the same action in
case of multiple articles. Note that behavior for unarchiving
single article is still the same.
taskID-2869659
closesodoo/odoo#92851
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improve the tax report section of the journal audit by adding a
background color to it, as well as reducing the width of the tables.
Ease the navigation from the journal audit report by adding three
new actions:
- Taxes in the tax applied section can be clicked to audit them
- The tax applied and the impacted tax grid sections now have an
audit button to open a group-by view of journal items grouped
appropriately according to the information we need.
closesodoo/odoo#92846
Related: odoo/enterprise#28025
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
The "Time Off Analysis" report was showing Archived (aka canceled) time
off, which was confusing/misleading.
closesodoo/odoo#92778
Taskid: 2864419
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Plans can be available for a specific department or global for the
company.
closesodoo/odoo#92648
Taskid: 2868447
Signed-off-by: Kevin Baptiste <kba@odoo.com>