Company used to get defaults was user.company_id and not current company
in the environment.
Fixes#41679closesodoo/odoo#42153
X-original-commit: af50c694445d49f1098de4236b6e8bdd9b1c93f2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
If a visitor has access to a task through access_token, he should have
access to the task attachments. He already see the list of attachment
and their name, but since the task access_token is not propagated to the
attachment he doesn't have the rights to see them.
In this PR, we generate the attachments access_token and provide them to
the user that is viewing a task with an access_token.
opw-2125252
closes#41881closesodoo/odoo#42121
X-original-commit: e7984c4968cde2019edca6c767d2acce2f7fe3f4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Issue
- Download the customer db: stargue-inc
- Go on the website in mobile mode
Traceback & the second item in the carousel is not displayed.
Cause
Traceback: we use `this.$iframe` without checking if it's defined
Second item not displayed: the first video promise is overriden
by the second video promise.
Solution
Check if this.$iframe is defined and resolve the old promise
instead of overriding it.
OPW-2152690
closesodoo/odoo#42139
X-original-commit: f5f569b4705f37865cb976a4df10a0d9f388fae2
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
- Create a move line from stock to shelf1 with PACK1
- Create a move line from stock to shelf2 with PACK1
- Validate
It should be be blocked. The contents of a package should all
be in the same location since the pack itself is in a location.
It's due to commit 78d6f46 that fix a rounding error.
However it should check for quants that have quantity since they
represents the package content.
closesodoo/odoo#42134
X-original-commit: 78fba949790f2b1ecd3ba1bf60fb34c30d17769e
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
* web_editor
Previously, increasing the number of columns on the tabs snippet would
cause the newly created tabs to toggle the original tabs instead of its
own, this was caused by an oversight where the columns were clone
directly using jQuery, and the snippets' the onClone method was not
called on the newly created columns (here, tabs). This commit move the
responsibility to clone onto the SnippetsMenu so that it can create the
appropriate snippetEditor if needed and call its onClone method.
task-2070643
closesodoo/odoo#42130
X-original-commit: 77ebadfe6ada8ad1fa4d6e476b9534f252499d92
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The attribute "groups" on filters and fields in a search view arch was not taken
into account anymore.
Now items that should be invisible are not anymore available for selection
in the interface (as expected) but are still activable as search defaults
(and the corresponding facets appear if needed).
Task ID: 2081450
closesodoo/odoo#42125
X-original-commit: ca2514a9fbcd693752367cb566d5c11165b40bd4
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
If a long-running transaction holds a write-lock on any row in
ir.attachment, the GC job can wait an indefinite amount of time to
acquire its table-wise SHARE LOCK.
While sitting in the queue for this lock, it will conflict with any
future transaction that tries to acquire a write-lock on any row [1].
So the GC transaction, which would normally execute very fast and
immediately release its lock, will start to block other transactions and
cause severe delays in response time. It basically depends on how long
the tx holding the lock takes to complete... which is unknown.
As a workaround, we force an arbitrary (but short) lock_timeout in the
GC tx before attempting the lock. If it fails to acquire it, it will
fail and raise, causing the whole operation to abort. The cron job will
be rescheduled quickly because it failed to complete, giving the GC
another chance to complete.
10 seconds seems a reasonable compromise, as it gives the blocking
transaction(s) some time to complete before bailing out, yet should
not be long enough to bring the system to a halt due to other
transactions blocked by the GC one. I have no hard data to back this
claim, though.
[1] See the LOCK conflict table in the documentation:
https://www.postgresql.org/docs/10/explicit-locking.htmlclosesodoo/odoo#42128
X-original-commit: 8a093c74c209d492f066c927cc4ac61325aee3ae
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
If getLangDateFormat is called right in loading the js file, it returns
default format. We now call it when translations are ready.
closesodoo/odoo#42126
X-original-commit: e7a58430a382ca1161131e562d53bef3ea0e6ce0
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
In this commit,
-Change the price of the three-seat sofa 60.000 to 1.500
-Change invoicing policy based on ordered qty
closesodoo/odoo#41980
Task-id: 2153140
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
The background position snippet option makes a copy of the snippet to
use in the overlay, such that it is over all content and the user can
easily see the end result of dragging the background. However, an
oversight in the CSS didn't account for the possibility of the copied
element to have a relative max-width (% of its container), because of
this, the overlay for those items was incorrect. This commit fixes that
issue by overriding the max-width and max-height properties of the
copied item.
closesodoo/odoo#42106
X-original-commit: 3b8cadd579f3309640a938bcce39ac83ac7a6942
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When running multiple odoo on the same machine (in order to test
multiple things concurrently, etc...) it's easily enough to start them
on 8069, 8070, 8071, ... and that *seems* to work, but then they start
walking on one another and *losing* chromes entirely, so you end up
with hundreds of chrome processes: right now with 2 Odoo running tests
my machine is at 365 Chrome processes, 550 process and 3180 threads
total (should be ~160 and ~700 with 2 chrome processes at most).
Instead, ask the OS to ask for a devtools port, then close the socket
and pass that to the child process. There's a race of sort for the
instant between closing the socket and Chrome reopening it, but:
* the window is very short
* we got a random port from the ephemeral range, it's possible
somebody else gets it inbetween but unlikely (the 50% on a birthday
attack is 200 for Linux's ephemeral range, it's a somewhat lower 150
for the IANA range used by BSDs and Windows)
Sadly chrome doesn't stop if it can't bind to the port it's given.
closesodoo/odoo#42102
X-original-commit: 897ded1cb8b675024d75c6975ca171dbefdfc333
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit, the log displayed "set as done"
before actually trying to put the transaction in done.
If an error then occurred in the'_set_transaction_done'
function and the transaction could not be processed,
this could lead to a misinterpretation of these logs.
This log is therefore moved after the transaction is
processed and is only displayed if it is actually successful.
This is valid for'done','pending' and'cancel'.
closesodoo/odoo#42089
X-original-commit: dd7552b1a48020f3f48cd40a5fc1cbc4c38a7f90
Signed-off-by: jev <jev-odoo@users.noreply.github.com>
We are looking for the "Bom Count" stat-button, which can be hidden
behind the "More" dropdown, depending on the number of installed modules
and views inheritance order loading.
closesodoo/odoo#42085
X-original-commit: dc4a40cc130175a60aa77a0660613b23c4bb916f
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Without this commit the multi-company dropdown breaks the page on mobile
closesodoo/odoo#42080
X-original-commit: e074dca861bedb89952d3788e711e261ce903295
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Was added at 958f9106dd but lost during design change
closesodoo/odoo#42061
X-original-commit: 560dba5313c5ca5265190dacc3bce7cbe509d30a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Reorganize the website folder to gather the large amount of snippets
that will become standard. Also prepare for a new system of snippet
versioning.
Note: this merge contains a lot of commits because the files were
split in such a way the history is not lost. A better way could
exist to achieve this with less commits but in the end all the
commits are gathered in an unique merge commit anyway.
task-2158361
closesodoo/odoo#42067
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>