Tours are automatically disabled when the demo data are enabled on
at least one module. To ensure that, when giving the session_info
object, we read on the `ir.module.module` model to check whether some
of them have demo data.
Before this commit, this check only relied on the user's `is_admin`
flag, which does not give read access on the `ir.module.module` model.
Now, a `sudo` ensures that any admin user can read on the model.
closesodoo/odoo#76864
X-original-commit: 3a8d30d51a392f42d83d24b5f865f77b05205b50
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Because the field is stored it doesn't make much sense to have a
context dependency and that can cause significant issues. However
`name_get` looks pretty innocent and it's not necessarily insane to
have a context dependency *there* (or even in the average
`display_name` as they're normally non-stored computed fields).
`_compute_display_name` previously blanked (blacklisted) just a few
context values, but doing the opposite is probably the better idea.
See also: odoo/odoo#68946
OPW-2453956
Task 2500978
closesodoo/odoo#76469
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
This will close the RTC session when a user leave a channel with a RTC session
open.
task-2646095
closesodoo/odoo#76849
X-original-commit: c5d2a17888d79e4b37cd8f9a690132b9cd556fbd
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
A bug currently prevents opening the editor from a translated version
of the homepage, for example /nl_BE (it works for other paths though).
Before this commit the url computed by _goToMasterPage was:
/website/lang/default?r=/nl_BE?enable_editor=1&rde=2
which will first redirect to the default language and then again to the
translated version. The bug was introduced by commit
119d9437e0 which chose an url without a
trailing slash as the canonical one for the homepage.
However, the bug can already be reproduced in 13.0 since commit
269aa59411 if the user manually
navigates to /nl_BE instead of /nl_BE/. No flows are redirecting to the
url without trailing slash in our codebase before 14.4, so the problem
is rarely seen.
When clicking on the "Edit in master" button, _goToMasterPage now
correctly removes the language code and redirects to the master
version, solving the problem.
task-2622270
closesodoo/odoo#76837
X-original-commit: 141c15d5dae137df11a73146ff4c991add7a2ff3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Issue: The button # To Process in mrp/views/stock_picking_views.xml
at line 33 uses the domain state confirmed, draft, planned, or progress
But the default filter, which is called "to do", show those 4 states +
to_close (in mrp/views/mrp_production_views.xml line 309)
Side-Note: Issue also present in 14.0, so starting the bug fix from
here. 12.0 doesn't seem to have a to_close state but the count and
filter domain also do not match
Steps to reproduce in 14.0
On Runbot, go to Inventory click on the "# to process" button on a
Manufacturing card.
- Choose any MO and create a work order. On this work order, click
"Start", then "Done".
- The MO is now in the "To Close" stage.
- Go back to Inventory Overview. The number to process has gone down by
one.
- Click on the "# to process" button, you will see that the "To Close"
MO appears in the list but is not counted by the button.
(written by dido)
For 13.0 I haven't been able to find steps to reproduce but the button
has not changed between the two versions
opw-2636447
closesodoo/odoo#76834
X-original-commit: 7f3b65bb42444ccb02bfb80931b52a94924fcdb0
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
This module sends the taxes information (mostly VAT) of the
vendor bills and customer invoices to the SII. It is called
Procedimiento G417 - IVA. Llevanza de libros registro. It is
required for every company with a turnover of +6M€ and others can
already make use of it. The invoices are automatically
sent after validation.
How the information is sent to the SII depends on the
configuration that is put in the taxes. The taxes
that were in the chart template (l10n_es) are automatically
configured to have the right type. It is possible however
that extra taxes need to be created for certain exempt/no sujeta reasons.
You need to configure your certificate and the tax agency.
closesodoo/odoo#76615
Task: 2492978
Forward-port-of: https://github.com/odoo/odoo/pull/70302
X-original-commit: ff4cb972b6a8b61caeac13d8eb5c6a4d43a62ccb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
After this commit, in the Time Off dashboard, the user can see the validity
period of the available days in case if the related allocation
has a validity end.
If the time off has more than one allocation, we display the validity of the closest one.
task - 2636403
closesodoo/odoo#76257
Signed-off-by: Kevin Baptiste <kba@odoo.com>
For searches, Odoo uses `unaccent` if it's available. On some
technical fields this is completely unnecessary and precludes the use
of indexes.
This PR provides:
* an opt-out (`unaccent = False`) on `String` and `Text` fields
* a warning if `unaccent` is enabled on *parent_path* fields as their
performance can be rather critical and not using the index is quite
an issue (note: the check that `parent_path` fields have been moved
outside of the check for their existence as we want to check that
the field is declared and correctly configured in all cases,
probably)
Task 2627454
Part-of: odoo/odoo#76436
`website` added its own sql-compatible version of
`get_unaccent_wrapper` in order to use `psycopg2.sql` for safety.
That is very sad.
Add a condition in the "standard" unaccent wrapper which checks
whether the input type is a `Composable`, and in that case return an
`SQL`. This increases the cost of the wrapper a tad but probably not
to a really sensible amount.
Task 2634851
Part-of: odoo/odoo#76436
After the conversion of the graph and pivot views done in https://github.com/odoo/odoo/pull/73311,
it was no more possible to open the forecast_graph and forecast_pivot views.
This is due to the fact that the new View component cannot manage a legacy
view: every extension of a converted view must be converted. We thus
convert forecast_graph and forecast_pivot.
closesodoo/odoo#76793
X-original-commit: ff28db335fa77dadc3198e754f1e0649811fba7b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Remove hardcoded value and extra space.
closesodoo/odoo#76782
X-original-commit: 093a8b4fd7fc9b44f66d3404f097b35cdd4b6315
Signed-off-by: Josse Colpaert <jco@openerp.com>
Menu and footer background colors are retrieved from scss and added
to the palettes. The chosen palette is sent to iap-service for the
theme preview svg generation. From now on iap-service will be able
to use specific menu and footer color for the svg preview generation.
task-2602521
closesodoo/odoo#76774
X-original-commit: 857022c5955f173f5814beb5345ec9e13f089964
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When the user search for an industry in the industry autocomplete
input, an information message is now displayed if no industry match
the user's search.
task-2602521
closesodoo/odoo#76773
X-original-commit: 93df93c966b097f671ab63de2e778ad1662953d6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
commit bc1a6faa51fef60bb64ea09f4e43f1120f9855bd add a rule to fix
tracability report but on a global level. However we won't this behavior
everywhere in odoo or at least if it's the case it shouldn't be specify
there
closesodoo/odoo#76713
X-original-commit: f96c78f701831ed7aa1798765e3e5f81d1a689c1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Purpose: From the dashboard, the user sees the number of left time offs,
but does not have an information regarding how it is calculated.
In this task, we add an information tag on the Time Off dashboard
next to each Time Off type that requires allocation.
When we hover over the tag, we see how is the number calculated.
For example, it could look the following way:
Allocated : 20 days
Approved: 5 days
Planned: 3 days
-----------------
Left: 12 days
task - 2643115
closesodoo/odoo#76682
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit simplifies the API of the ControlPanel by removing a
feature that isn't really necessary. It was used only once, in
web_dashboard, and there are simple alternatives.
closesodoo/odoo#76776
X-original-commit: 6ddc9b3256266fc393faaaddb1b49140e6a1990f
Related: odoo/enterprise#20990
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue: When changing the bill date (invoice_date) of a vendor bill,
the due date (invoice_payment_term_id) is not updated correctly
Steps to reproduce :
1) Install Accounting, Purchase
2) Create a vendor bill
3) (debug) Edit the view, remove the invisible attr for the div with
label invoice_payment_term_id
4) For the vendor bill, in that order, set the Vendor, then the due date
to 30 days, then bill date, then add a product
5) Due date is now set to 30 days after the bill date
6) Change the Bill Date
-> Due Date stays unchanged
Thanks to @smetl for writing the test !
opw-2627686
closesodoo/odoo#76736
X-original-commit: d15e0a678b021d842b96bce9c8880ed28f7fff77
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Issue : When selecting mrp_operation as picking_type, the product
variant is not changed
Steps to reproduce:
Install Quality, MRP
Disable variants
Edit View: Form (debug mode) and remove
groups="product.group_product_variant" to show the variants
(This is done so we can see the issue in the backend)
Set a product
Changing product changes the variant
Set the operation to manufacturing
Set another product
-> The variant is not updated
Why is that a bug:
It can lead to some problems if the variants are disabled and then
enabled at a later time for the company
Side-Note:
The original bug related to the related commit was not present in
v13 as said in the related commit opw discussion
Related commit 2dc2003
opw-2515100 (related to opw-2490412)
closesodoo/odoo#76707
X-original-commit: 441fb1e9ee97e2dcc1c2bd1a9fdb393d006aa1a5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Since d1e227b07 and 242b1caa, the Pivot and Graph don't have the
viewType attribute set anymore.
Moreover, their filters don't have an "a" tag anymore.
closesodoo/odoo#76634
X-original-commit: 7d24a87a51c8202320ecf9abcfecb8a861463b0c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
PR #75856 introduced a default implementation of group_expand for
Selection fields that set the value of group_expand to True.
However the PR lacked the necessary bits that allow the same behavior
for fields created on the fly instead of through code.
This commit allows the propagation of the group_expand attribute for
fields of type Selection, this commit also exposes the checkbox in the
UI to enable/disable the setting.
closesodoo/odoo#76775
X-original-commit: 1cacc3e53cf722a31bedff7a76f8e5cc6ed45ce0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Configure payment stripe to be available on the web shop
- Let's consider a product with P (sales price = 100€) invoice policy based on delivered qty
- Set in the config parameter sale.automatic_invoice to True
- Create a SO with P and generate a payment link PL for 50€
- Go to PL and pay it
Bug:
An error was raised because there was no invoicable line when computing the
invoice of SO
opw:2635175
closesodoo/odoo#76735
X-original-commit: 846bc047fcd546bf5b8e7fe224b8a98e876eba21
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
* website, website_form_project
In master, there was an error when adding a form to a website and
selecting "Create a Task" with no active projects. This issue was solved
in PR #73269, by allowing tasks without a project associated. This
introduces a new problem: if a user wants to create a project (e.g. if
there is no active project), they will have to save their changes, close
the editor, navigate to Project, and only then will they be able to do
it. This issue could happen for other modules, so the solution has to be
generic.
In this commit, we add the possibility to add a button to the form
editor, next to a we-select item, which will redirect the user to a
specified action after prompting them to save their work. This button
can be added by specifying an action window in the corresponding
registry.
We also add the action window to the website form project editor, so
that the user can be redirected towards the Project app if they want
to create a project to select in their form.
task-2580436
closesodoo/odoo#76772
X-original-commit: e4233643b93b521454cc146c6a2ae876781fb9ba
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When making a payment intent from Adyen terminal with the POS, the payment intent was validated by Adyen
but Odoo stopped polling because a connection failure happened.
With this fix we use the remaining_polls already implemented to get the adyen status with a interval of 3 secondes.
If after 3 tries of 3 seconds each it still fails we can retry manually.
Related to dcb1e2b4823c917f4c547d2cad604187f893948d and f83d1b13a96f8df559918b5905b949009d2ece88
opw:2587625
closesodoo/odoo#76768
X-original-commit: 325b7dde0da6cca27f0d468d1358702d52b8cbaa
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Bug introduced by this commit: https://github.com/odoo/odoo/commit/f05db8b122140a9d0f124484ab22eb094b4e36e9
Steps to reproduce the bug:
- create a journal entry with 4 ”account.move.line”:
- two `”account.move.line”` with accounts of type ('receivable' or 'payable') > with the amount of both in debit or both in credit
- two `”account.move.line”` with accounts other than the type ('receivable' or 'payable')
- save
- duplicate the `“account.move”`
- validation error will be triggered: https:github.com/odoo/odoo/blob/14.0/addons/account/models/account_move.py#L3209-L3211
Problem:
The payment terms must be recomputed only if the `”account.move”` is an invoice
OPW-2642826
closesodoo/odoo#76779
X-original-commit: 52482ae43f38a95bce9e17f2e455378d1badc893
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Commit [1] fixed a bug in the legacy graph view and introduced a
test. This was done while we were re-writting the graph view in
owl. This commit adds the test added by [1] in the new graph test
suite.
[1] 11eb4542abclosesodoo/odoo#76778
X-original-commit: c5ac7fc541cbdb0a7fe7c9d01849bcc9a615a78c
Related: odoo/enterprise#20992
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Let's assume the following scenario in a graph view
- toggle a filter on a slow network s.t. it takes a while to load
- while it's loading, toggle a measure
Before this commit, the view was kind of locked after those two
steps, i.e. toggling measures or changing graph mode did not work
anymore (it could be unlocked by interacting again with the search
view though). The reason is that the new filter triggered a
re-rendering of the withSearch component (the parent of the graph
view), thus calling willUpdateProps on the graph view, which reloads
the data. Toggling a measure cancels the current load operation
(via keepLast), and the promise returned by willUpdateProps is thus
pending forever. From that point, only another re-rendering from the
parent (withSearch) could unlock the situation by cancelling the
previous rendering.
To solve this, we use the new Race primitive. It ensures that the
promise returned by load resolves as soon as the view is actually
reloaded (whether it came from the load itself, of by toggling a
measure).
This commit also refactors the pivot model to use the Race
primitive.
X-original-commit: ceebab7128cb9838024029aefe3910a18cf14e44
Part-of: odoo/odoo#76778
This commit adds a new concurrency primitive inspired by
Promise.race, except that it is dynamic (promises can be added to
a Race instance anytime).
X-original-commit: 4a487524d69ac7ede68296ea4e1f51e1b769d642
Part-of: odoo/odoo#76778
This reverts commit 7ddcebfcda.
The 8756e69b5de993d22de908606a328b607ea0a68a commit moves
computeAppsAndMenuItems out of menu_service. So we can remove
menu_service from pos again.
closesodoo/odoo#76777
X-original-commit: dfcfe63c976a017460a1f786f212452d64466272
Related: odoo/enterprise#20991
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
We move /commands to /core because DebugMenu depends
on /command/command_hook. All the files in /commands depend only
on /core or /commands except for menu_providers which we will move to /menus
X-original-commit: eca8cd478b72d81b2293c22d2c9c41d1f94be16a
Part-of: odoo/odoo#76777
Computed fields with no depends are not computed before record creation
rendering those fields empty instead of being computed on the first
request.
By adding a depends (the field does not actually depend on it) the field
is computed correctly and may be used directly.
TaskId-2647225
closesodoo/odoo#76744
X-original-commit: f03e74317a40957a355235b92dacff6310fbdd5b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Some tests in this test class are leading to uncertain results and fails
randomly.
With this commit, the whole test class is deactivated until a fix is found.
closesodoo/odoo#76743
X-original-commit: 39545ba5b3c080ae3e651c4f9d25aa190582429a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Byproduct moves with same cost_share can be merge but only if there is
no other move with different cost_share in the list of move. This commit
allow merge move with same cost_share in any cases.
closesodoo/odoo#76709
X-original-commit: 41bd26f6522cf9f4e11962399504030c36512c39
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
In UserMenu Shortcuts Table, we correct the shortcuts for MacOs and
we add the shortcut to open the command palette.
closesodoo/odoo#76614
Task-id: 2646058
X-original-commit: af69aef93a1bec4eccf0813aeacb26e3bd1098ea
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This reverts commit 2623b4591d.
The command+m shortcut on safari is not listenable. Safari prevents to
catch events of some shortcut reserved for OS actions. Command+m is
used to minimize the app. This makes it impossible to open the command
palette on safari. So we decided to use again the command+k (ctrl+k)
to open the command palette.
X-original-commit: ca0e37cc20da907d74245e935416d66a52976c5e
Part-of: odoo/odoo#76614
The classes PyDate, PyDateTime, and PyTime used in py.js to evaluate
python expressions did not have a toJSON method. As a consequence, the
dynamic domains manipulating date/datetime but forgetting to use strftime
didn't work anymore. This fix simply defines a toJSON method in the three
above mentionned classes
closesodoo/odoo#76699
X-original-commit: 53eefe36f39e6c9ad355e78bcabbba4e0039aa35
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Michael Mattiello <mcm@odoo.com>
When a user leave a channel with an RTC session open, we need to notify others
user and remove the leaving user from the room.
task-2646095
closesodoo/odoo#76719
X-original-commit: 6b498a0969b63e190637f112c6a7d5f8177c772c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In the interest of time, we previously pulled a lot of dependencies into
the assets_discuss_public bundle so that all dependencies were met.
While this worked well as a first approach, this makes the bundle
dependent on many files managed by different teams, limiting their
freedoms in modifying those files, or forcing them to stuff even more
things into the bundle.
This commit cuts out a significant amount of unneeded dependencies to
allow this bundle to be more self contained and less fragile.
closesodoo/odoo#76688
X-original-commit: 9da13113467b7f445c2aeafe7ecfccb1b2064314
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
On very small editors the restriction on the toolbar size
and position could generate issue (blocking text visibility).
So we changed the rules to allow the toolbar to overflow
outsize of the editable zone.
task-2648156
closesodoo/odoo#76710
X-original-commit: 6390a4225ea8a97fd0bc0b267d0d016846d27e46
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
Signed-off-by: Sébastien Geelen <sebgeelen@users.noreply.github.com>
In master, when editing a date, the same date will be shown multiple
times next to each other. This is because each date is comprised of a
few times the same field with different formats, and when editing them,
they all remove their formatting and show the entire date.
In this commit, we allow adding the class `oe_hide_on_date_edit` to date
fields we don't want to show when editing, which will be dynamically
hidden (by adding the `d-none` class) when a user clicks on a field with
the same date.
We also add this class to some date fields in website_event.
task-2618494
closesodoo/odoo#75205
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Philémon van Helden <pvh@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>