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#54036closesodoo/odoo#54078
Forward-port-of: odoo/odoo#54036
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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>
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>
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
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
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
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)
closesodoo/odoo#54690
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
In #45174, the original_id field was added on ir.attachment, so that
derived images in the web-editor (cropped, resized, optimized, ...)
could keep a trace of the original, such that if the user wanted to
revert it or change the crop/size/optimization parameter, we could do it
from the original again so that for example the quality can be increased
or the crop region made bigger.
The addition of this self-referencing many2one from ir.attachment to
itself however will cause DELETE queries on ir.attachment to do a
sequential scan on the table to update potential records referencing the
deleted record in their original_id field. As the ir.attachment table
tends to be one of the biggest tables in production databases (millions
of records), this scan can take multiple seconds per DELETE operation,
and since attachments are used everywhere in odoo to represent files,
DELETE operations on them are frequent.
Adding an index on the original_id field should make these DELETE
operations substantially faster (scaling with the log of the number of
filled original_id fields, which will be very small, instead of scaling
linearly with number of records)
closesodoo/odoo#54676
X-original-commit: 2b5064a00b7a5c8dc66429869287386f244b1257
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Since the wizards now requires ACLs, the access rights
set on the lead forward partner and the lead assignation are
incorrect.
Only the Sales/Administrator are able to use them.
With this commit we introduce the intended behavior where
the sales are able to perform those tasks.
closesodoo/odoo#54568
X-original-commit: 3081ca828e4a7de3861ee5b1fb9600b248c3ea07
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
The tax mapping is only readable by internal users. As the calling
method can be used by portal routes, we should browse the fiscal position
in sudo mode.
closesodoo/odoo#54524
X-original-commit: 46e9a9683967600c55bf43895740fff1d61eb49b
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create a product with routes MTO + Buy.
- Create a vendor pricelist with a minimum quantity:
Min. Qty 1000 for 10 USD
- Create a SO, sell 1000 quantity
=> A PO is created automatically in draft.
- Go back to SO and update quantity to 1200.
The following message pops up: "There is no matching vendor price to
generate the purchase order for product..."
We select the supplier based on the procurement quantity, which is lower
than the minimum quantity of the supplier.
To avoid this situation, we fall back on any supplier like it was the
case in v12.
opw-2297001
closesodoo/odoo#54526
X-original-commit: 4d4913fc366dcd62740b91eda3aa3f81270affda
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Bank reconciliation widget allows creating a writeoff with tax lines, in order to simulate both the invoice and the payment into a single entry, from one statement line. Before this fix, the tax repartition used by this feature was always the one defined for invoices. Also, in some cases, the amounts reported in the tax report had the wrong sign, because of the way the tax report applies the sign multiplicator on lines' balances. This multiplicator cannot be computed properly from a payment or miscellaneous operation, so we need to rather impact the sign of the tags directly.
With this fix, we guess whether or not we are refunding something from the data entered by the user, and modify the signs of the tags accordingly so that the tax has the same impact on the report as it would have had with an invoice doing the same operation.
closesodoo/odoo#54691
X-original-commit: ac2662b67c878eb2ef6e9462a0e6c9f1fbdb6adb
Related: odoo/enterprise#11948
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
When launch a consumption warning wizard by clicking the "Mark as done
and close mo" button, always close the MO. And return to tree view if we
open the tablet view from a 'start' button, return to workorder kanban
if we open tablet from that.
Task 2278147
X-original-commit: 4d03cf5e8d29933d5f96099f8f662c9084b20197
The record is invisible when active=False, not the field
Correct rst arrow syntax
Sign CLA
closesodoo/odoo#54714
X-original-commit: 055cb50b4e12488266e9f9418788c4057257324f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When setting the inverse many2one field on a record, the record is not
removed from its inverse relation if the field's current value is not in
cache. Fix this by setting the field's value in cache before updating.
closesodoo/odoo#54711
X-original-commit: df12c85816dfa59f298c3e6a077bd88e4b7aa6a6
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Issue is specifically in the case of an onchange removing a record in
an o2m in an o2m (so a sub-o2m) if loading an *existing* record in the
SSF: since the server pretty much only returns a REMOVE_ALL followed
by the records to keep or create, conserving the removal information
requires diffing the value currently stored in the form and the result
fo the onchange.
Diff which was properly done for top-level o2ms, but not for the ones
below that (apparently forgot this bit when improving support for
nested o2ms earlier this year).
X-original-commit: 177d009541cca589c6ebb85fc051b893ec001536
Otherwise the reStructuredText parser thinks the first definition
title is part of the preceding paragraph, and the definition item is
interpreted as a quote due to the indentation.
closesodoo/odoo#54709
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When the server execute the job 'Mail: Fetchmail Service'
if it's processed an attachment having a Notes field with None values
the following traceback will occur
AttributeError: 'NoneType' object has no attribute 'split'
//IdentificativoSdI','//DataOraRicezione','//Descrizione','//MessageId','//Note'.
seems to be not mandatory
opw-2277722
closesodoo/odoo#54636
X-original-commit: f96be5eb77a998037bdf0b88f96160b856dfc67a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
There is no field 'ids' on a gamification.goal, but one called 'id'
Without this commit, calling _get_serialized_challenge_lines (or
indirectly, calling report_progress) with a non-empty subset_goals was
failing due to an invalid domain.
This is not supposed to happen on standard flow but can be triggered
with manual modification of date fields and refreshing a challenge.
Fixesodoo/odoo#25913closesodoo/odoo#54387
X-original-commit: 1e3483d2fc99763940396936758cf99b14d0a118
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Clicking on mark as read on a given message would move all messages in
inbox to history instead of only selected message(s). This commit fix
that behaviour so that only the selected message(s) move(s) to history.
task-2284543
closesodoo/odoo#54688
X-original-commit: 3304b89fc799b979b028aa4c7efe902b2f5276c1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Follow-up of odoo/enterprise#11881, in order to eliminate all similar
typos.
The CSS pseudo-class selectors are spelled `:first-child` and
`:last-child`, and never take any argument, as opposed to
`:nth-child(<nth>)` for example.
Ref: https://developer.mozilla.org/docs/Web/CSS/Pseudo-classes
jQuery doesn't care and matches with or without the `()`, but CSS
engines don't, and now libsass SCSS compilation crashes due to the empty
argument list (cfr. opw-2299465)
Better avoid confusion and fix the typo everywhere.
closesodoo/odoo#54685
X-original-commit: 82244e17339615615535073e6f9e1ddbcf0b57d9
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Before this commit, in case you were in --dev-mode, if a json request crash,
it was wrongly intercepted and return a Internal Server Error with status 500
and without the JSON Response
For the change of http code, since it is only in dev mode, it could not impact
a production server (in theory) with custom code based on it.
After this commit, if your rpc fails, you will not have anymore a breakpoint in
the code to help the developer to debug. But you will have a status 200 on the
rpc request.
closesodoo/odoo#54668
X-original-commit: 534cca311db1ecf1005a24d5cbd50e166094ba2a
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, it might happen that text field columns in list
views were completely crushed, to let space to the other columns.
This commit fixes the issue by preventing text fields from being
wrapped during the ideal column widths computation. Doing so, text
fields will take space they deserve according to their content.
They will then be wrapped if necessary, so that they aren't trimmed,
unlike e.g. char fields.
Task 2275747
closesodoo/odoo#54664
X-original-commit: 5c54111127bd99eedb4e0331aba5a0200feb461c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
We now allow invoicing of finalized orders in an open session in this first
iteration of order management in the pos frontend. Additionally, receipt
reprinting is also introduced. With this feature, we can now reprint the
receipt of old orders.
closesodoo/odoo#51141
Task-id: 1981354
Related: odoo/enterprise#11690
Related: odoo/upgrade#1472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
A term was present twice in Italian, making the installation of
Italian crash for the Swich CoA
Introduced at a3029a8
Remove some reference to company accounts (it is handled by
l10n_multilang, should not be set manually as working only for company
wiht id 1)
closesodoo/odoo#54658
X-original-commit: fb10cc6d0af59d255c0c3f2dd52c97b2cf31a628
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commits fixes the case where you click on
edit address in eCommerce payment flow and you
type a wrong coupon code.
Without this commit, you are redirected at
/shop/payment instead of /shop/checkout
OPW-2290188
closesodoo/odoo#54646
X-original-commit: 0d658349483054bf30c8be483e2f42671e0ba024
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Improve tooltip style/design to get rid of black background and purple title,
instead design tooltip like popover design, to have tooltip with white
background and light grey title
task-2266829
closesodoo/odoo#53723
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Ipsita Borisagar <ibo@odoo.com>
Keep the selected image after moving it in the gallery. So that the
options for moving the current image are always displayed.
Part of https://github.com/odoo/odoo/pull/45096
task-2162952
Add the width option for each slides in the carousel snippet.
Remove share links from the third slide of the carousel.
Part of https://github.com/odoo/odoo/pull/45096
task-2162952
Snippet image gallery retains only the slideshow mode and a new snippet
called 'image wall' takes the 3 other modes.
Part of https://github.com/odoo/odoo/pull/45096
task-2162952
In gallery snippet with slideshow mode, the right/left indicators have
now the same behavior in editor and outside. Before this commit, these
indicators were always visible in editable mode.
Part of https://github.com/odoo/odoo/pull/45096
task-2162952
The permission check in BaseModel:export_data was checking if the
current user was the administrator user, instead of checking if the
environment was administrator (i.e. it should also check if the sudo bit
is set on the environment).
This commit fixes this and allows to export_data with a simple `sudo()`
instead of needing a `with_user(SUPERUSER_ID)`.
closesodoo/odoo#54647
X-original-commit: f69f47b6ba5c6c462bf617f4876a39233f60034f
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
In some complex cases, some snippet editors were destroyed but were
still referenced in memory.
E.g.
1) Reorder a snippet gallery image
2) The code is implemented in such a way that reordering create a new
wrapping column for each image and moves the images in them.
3) This result in having the snippet editor linked to the old columns
to be explicitely destroyed and removed from memory, but not the ones
linked to the images as they are still in the DOM (just moved).
4) ... but the snippet editors linked to the images are children of
the snippet editors linked to the columns. They are thus implicitely
destroyed... but not removed from memory.
closesodoo/odoo#54643
X-original-commit: e4bf37c7fc892cdba57f0acac8e10f5698184e67
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The bug was already solved with [1] but was reintroduced later for
another reason. [1] solved the problem by checking that the current
option is not destroyed before asking for an UI update thanks to a
trigger_up (the option was destroyed because of image reordering). The
bug is now reintroduced for the same basic reason: a new trigger_up was
added between the potential option destroy and the destroy check, so
if the option is destroyed, that trigger_up fails to be triggered and
the editor is locked.
This commit solves the problem once and for all, hopefully, with a
more robust solution: only destroy options when none is being
processed. That way we ensure that all trigger_up occuring during an
option activation / update can be properly done.
[1]: https://github.com/odoo/odoo/commit/9eeea4c4107dc15984c475582d5ee58a17cd2568
X-original-commit: 7770430f78ee9e122a732fa042226d362467158e
Commit [1] broke the background videos feature. This is because the
'we-imagepicker' widget is now a sub-widget of a new 'we-button-group'
widget, acting as a selection choice (same as we-button in a we-select).
When selecting a selection choice, the appropriate option method is
called, with the selection value and params... but the params were
actually the ones of the 'we-button-group' element and not the ones
of the chosen widget 'we-imagepicker'.
This has never been important for we-select widgets but it could have
been. The problem is only solved here in master, generically for all
selection widgets (currently only 'we-select' and 'we-button-group').
The params received are the ones of the active sub-widget combined with
the ones of the selection widget.
[1]: https://github.com/odoo/odoo/commit/bb0cd4d5c82a9c2311f8c45ced0e9fdc0397d292closesodoo/odoo#54629
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Bug
===
Register to an event with a public user.
Sometimes an ACL error will be raised.
Technical
=========
Before flushing the environment (after the creation of the event
registration in the endpoint `registration_confirm`), the ORM will
recompute all needed stored fields. As we didn't write on some of them
(`date_closed`, `utm_campaign_id`, `utm_source_id`, `utm_medium_id`)
they are in the list `Environment::all.tocompute`. So, the ORM will recompute
the fields even if the state didn't change (this behavior can be verify
in `BaseModel::recompute`). This is done after the "create" call of the
event registration and so without the SUDO flag.
Task-2299227
closesodoo/odoo#54624
X-original-commit: 38f37cd483b7907b20171e2c44e14e69e3e00596
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
1. Methods associated to touchmove and touchstart listeners should not
call preventDefault because they are passive by default. Calling preventDefault
will do nothing but in chrome browser, error message is issued.
2. We now allow resize based on touch events.
closesodoo/odoo#54612
X-original-commit: c6b7133d9c9dc52a8d283124b5a4497940e54682
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The primary goal of disableRubberbanding is to disable scrolling during
touch event by default and to allow only selected descendants to have scrolling
active during touchstart+touchmove event. Only elements with class="touch-scrollable"
are allowed for touch scrolling. This restriction can be a good idea but it
results to bug-ridden explicitness which is not necessary because scrolling
should be allowed automatic by default in the first place. In this commit, we
allowed scrolling by default by:
1. We remove disableRubberbanding.
2. We set the position property of .pos to fixed. This is to accomplish the
original goal of disableRubberbanding (fixing the root element in its position).
3. We remove the touch-scrollable class as they are not needed anymore and
no style associated to it.
Removing the disableRubberbanding method also fixes the Intervention error during
touch scrolling event. The reason for that error is we are calling preventDefault
in the event that is passive. touchmove and touchstart events are passive by default
- which means that preventDefault won't work.
X-original-commit: 54f7fb49dae3aab6a005402a1ac60262bbd15edc
After the commit 2a57a156c7b8e81c01afa095b3291361d208611f
Cloc excluded by default one more folder, it should appear
in the documentation of the tools
closesodoo/odoo#54609
X-original-commit: 93261c787d1152c94856ef31a1600a4cdab8b83b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This allows user to close multiple windows with ESC key.
task-2283891
closesodoo/odoo#54604
X-original-commit: bac3d7792a48f86a39f92e0fcfc18d522ce00d94
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, try to post a comment will raise a traceback in front end
because textarea is not found.
Now, we check that we are writing in textarea content and no more in textarea
comment.
closesodoo/odoo#54595
X-original-commit: 867458456b13daf9b5586c17b7475e68d9d008e1
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>