Before this commit, the title of the container "Fiscal Localization"
was always displayed, even though it has an invisible modifier. The
reason is that the container was never hidden (it always contained
at least an empty div), because the corresponding modifier was set
on a child in the container (its unique child). This commit fixes
the issue by moving the modifier to the container itself. Note
that it also prevents from having an empty div in the DOM.
closesodoo/odoo#100031
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With the integration slides-knowledge,
slides can be set on the team, so that the user can be redirected
to them when searching for help.
We want to use the same view as for all slides,
but limit the records presented to the user.
With this commit, we create two distinct methods:
one that prepares the values
one that renders them.
This way, we can hook into the first one to replace the records
before rendering them, when the `/helpdesk/<team_id>/slides`
route is used.
task-2890043
closesodoo/odoo#97739
Related: odoo/enterprise#29283
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
*: web_editor, website_blog
This commit improves the mobile preview of websites. A mobile phone
image has been added around the iframe during the mobile preview. This
image was already used for the themes mobile preview, this is why the
css code has been unified to be used in these 2 mobile previews.
Parallel to this commit, we have modified the websites displayed in the
iframe of the preview of the themes so that the scrollbar of these is
visible (before it was hidden behind the image of the phone) but with a
smaller width in mobile mode.
This commit also improves the button to switch to mobile preview by
coloring it green when mobile preview is active.
task-2890050
closesodoo/odoo#98061
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The goal is to easily re-use these 3 common methods
for unit tests in module implementing new type of views,
such as `web_cohort`
closesodoo/odoo#100021
Related: odoo/enterprise#31239
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
This allows easier parsing of the logs for indeterministic errors, so
that when the same error happens in different build, it has the same
error message, as the stack trace contains the file name of the assets
which get generated with a different hash every time, while also
preserving the existence of potentially useful tracebacks to debug
indeterministic issues.
closesodoo/odoo#100028
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
*: test_website, website_blog, website_crm, website_event,
website_forum, website_hr_recruitment, website_mass_mailing,
website_sale, website_sale_wishlist, website_slides
- Make sure that all website tours reaching the website preview before
their first step use the related website util to register their tour.
- Rename the website util to register a tour starting on the website
preview from `registerEditionTour` to `registerWebsitePreviewTour`.
Having a method using "Edition" in its name and having a boolean
parameter named `edition` was a bit... strange.
- For both non edit mode and edit mode as a first step, ensure the util
sets a high timeout for the first step. Indeed loading both the
backend and the frontend (in the iframe) and potentially starting the
edit mode can take a long time in automatic tests. We'll try and
decrease the need for this high timeout of course.
- Review the implementation of those utils to be more consistent and
also fix one or two mistakes in them.
closesodoo/odoo#100024
Related: odoo/design-themes#588
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, `false` was displayed as column title in kanban
views grouped by date(time) fields, for the column containing
records with unset value. When grouped by relational and date(time)
fields, we expect `None` to be displayed. This commit restores the
legacy behavior.
closesodoo/odoo#100020
Signed-off-by: Géry Debongnie <ged@odoo.com>
The no content helper logic (determining when it is displayed) in
kanban is quite complicated. Apparently, in a kanban view grouped
on a field that isn't a many2one, with no groups (and thus no
records), and where we don't have the "group_create" permission,
we want the no content helper to be displayed. At least, this is
how it used to work in the legacy kanban view. This commit restores
the previous behavior and encodes this situation in a test. In the
future, it would probably be a good idea to sit down and challenge
the corner cases of this feature.
closesodoo/odoo#99914
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.
closesodoo/odoo#99769
Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
*: website_event, website_links
This commit fixes the navbar on the enterprise mobile mode. With the
enterprise modules, in mobile mode, the navbar menus are removed and
displayed in an an additional systray item, the BurgerMenu.
This behavior was not adapted to the website systray and contextual
custom menus, introduced in [1].
For the website systray, some elements are hidden in mobile:
- the "edit" and "translate" buttons,
- the mobile preview,
- the "+ new" new content button,
The logic for displaying the contextual custom menus is moved from the
navbar patch to a service, so that we can define a patch for the
BurgerMenu that uses that logic and has the same behavior as the
navbar.
For now, the "Menu Editor" and the "HTML/CSS Editor" menus are hidden in
mobile.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#99605
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, `beforeStepIndex` (now `_powerboxBeforeStepIndex`),
was set at the wrong time.
The callback `onOpen` was called after opening the powerbox from the
`_onInput`. The calculation of `beforeStepIndex` presuposed the step
that add `/` happened. Thefore the calculation
`this._historySteps.length - 2` was made rather than
`this._historySteps.length - 1`.
But that presuposition is wrong.
The best time to know until which step index to revert is before any
possible step occurs.
task-2980550
closesodoo/odoo#100009
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In switchThemes and commitChanges, the editor was reset by directly
setting the html in the editable. This caused a mutation to potentially
set a truthy value for `odooEditor._toRollback`. As we reset the editor
content, we now use `odooEditor.resetContent` to ensure
`odooEditor._toRollback` be falsy.
task-2980550
Part-of: odoo/odoo#100009
Before this commit: it was possible to use the pos reference of a validated
order for another order. It causes the order to miss because the server
wouldn't save a new order if there is an existing order with the same pos
reference.
Steps to reproduce the issue on the runbot:
Open a PoS session
Throttling the network
Create an order by selecting some items
Pay the order
Validate the order and just before it finishes the job, go back
Now it's not possible to add an item or change the quantity
Now click on one of the order lines
The order will save to unpaid order, and if you reload the page, it will
be possible to modify the order and use it for a new PoS order.
Solution
The solution is to prevent it from saving it again.
opw-2951938
closesodoo/odoo#99946
X-original-commit: a8bd9f8bd2191469471d740052821233359b324a
Signed-off-by: Masereel Pierre <pim@odoo.com>
Prior to this commit no visual feedback was provided when, clicking a
filter or category, the page loads and redirect.
This commit reduces the products grid's opacity after clicking, proving
the user that his click triggered an action.
task-2907955
Part-of: odoo/odoo#98558
This commit improve the design and simplify the implementation.
Popovers have been removed and the overall integration with boostrap is
increased allowing customization with the default boostrap variables.
Variables for (multi-)range input have been exposed at "theme-level"
allowing to customize these components when creating a new theme.
task-2907955
Part-of: odoo/odoo#98558
This commit improves the overall 'website_sale' sidebar design and solve
minor usability issues.
Design overrides has been removed in order to allow customization
thought SCSS variables and ensure consistency between components.
task-2907955
Part-of: odoo/odoo#98558
Improve checkbox/radio design and the overall consistency, removing
'website_sales' overrides and defining `:hover` behaviors globally.
The odoo 'css_attribute_color' field has been adapted too in order to
match user's fields customization.
task-2907955
Part-of: odoo/odoo#98558
If the source field widget emitting a field_changed event is a m2o,
the field changes of the event will all be considered
as changes targeting a m2o and converted accordingly, resulting in
server errors because the `onchange` call received a [None, None] value
for a standard field (e.g. float).
closesodoo/odoo#100007
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Bootstrap 5 changed the display of `dropdown-menu` to be absolute,
meaning w-100 would take the whole screen.
We set it as relative to take the width of the input.
closesodoo/odoo#100005
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When selecting on site picking and/or onsite payment the public user was
presented with an access error while it shouldn't.
closesodoo/odoo#100001
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, we didn't apply the default favorite (if any),
when there was an active_id or active_ids in the context. This was
a mistake. Note that it only impacted owl views.
closesodoo/odoo#99989
X-original-commit: 1e13e6cd073e57b3744caefc4b8f3795c35a4c10
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In a form view, have a o2m field (A), with a nested o2m field (B).
The A field should have multiple pages, with each record having at least one record
in their B field.
Have a (C) field that will modify a record in the nested o2m when changed.
Change the C field, and save.
Before this commit, the record's nested o2m from the other page had a wrong value
(a mere 4 command).
After this commit, their value is a command 4 and a command 1, with the right values.
closesodoo/odoo#99986
X-original-commit: e45e3b83f0f3116cc983c6bd8a9212e815b4d4f5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
PR [1] removes some `<field/>` node attributes from view archs that
were transfered into the `modifiers` attribute (e.g. `invisible`).
However, the `invisible` attribute was still used in some views
(e.g. graph, pivot, search and cohort). This issue hasn't been
spotted by the tests as the MockServer was still sending archs
with both `invisible` and `modifiers` attributes.
This commit adapts the MockServer to make it behave like the real
server, which makes some tests fail, and adapts the impacted
views to make them look into the `modifiers` attribute, which fixes
the failing tests.
Closesodoo/odoo#99920
[1] odoo/odoo#99619closesodoo/odoo#99948
Related: odoo/enterprise#31220
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
In some buisness case when the invoice is done before the receipt, the
`stock.valuation.layer` price unit will be taken on the invoice rather
than the `purchase.order.line`
Part-of: odoo/odoo#99411
Be able to define a cost share on kit's components. The purpose, define
a cost repartition closer to the reality.
If the cost share is not define, it will split by the number of lines.
Part-of: odoo/odoo#99411
Invoice a different amount than on the purchase order will not
use the price difference account anymore. Instead it will create
a layer with the difference. It means the stock valuation will be
base on real quantity invoiced rather than the purchase order.
Since the price different account does not exists:
- Invoice correction is only done on `account.move.line` linked to a
`purchase.order.line`. It means that additional lines won't be
corrected and will debit the stock_input instead (that should be empty
manually)
Part-of: odoo/odoo#99411
Quick win in standard price. First check if we are in standard before
computing the price unit. If not do the standard process.
Part-of: odoo/odoo#99411
Visible_menu check per_read model per model leading to a lot of queries
We can get all readable fields with one query
Computation time goes from ~400 total to less than ~50 total
The different would be even bigger on a server with a distant database.
(higher ping)
Part-of: odoo/odoo#99176
Since bundle generations should be generated before post install tests,
a loading of a /web shouldn't try to save a new version
This is currently breaking for / because of the website_id added in the
extra part of the attachement. Even if the content is the same.
Part-of: odoo/odoo#99176
During tests on runbot, the main reason tours are slow to start is
because the first loading of "/web" need to generate assets bundles.
Generation can take up to 5 seconds time the number of tour.
Before this, the first requests to /web takes around 7 seconds on
runbot and the next ones less than 1 second.
After this commit, the first request to /web takes around 1.5 seconds
Note that the main difficulty is to choose when to generate the assets.
(With optimisations from following commits) the generation time is
arround 30 seconds (21 css + 12 js) the first time, for all modules.
If the attachements exists the generation time is arround 3 seconds
(2.5 js + 0.5 css) mainly because of globs to find usefull files.
In practice for runbot the ideal would be to generate them at
the end of the install so that it is shared for all post_install builds.
Doint it at the end of an install is not wanted in all cases, saas
pregenerated templates and upgrade may avoid doing that.
Doing it in a special runbot step (subcommand) is not possible for niglty
execution (no split, in one go). This needs to be in the code.
It is also not practical for devs wanting to have the same behaviour on
a local machine.
A solution to make the test conditionnal at install is to base the
condion on an existing test_module. test_assetsbundle is a good
candidate here. On runbot, the at_install step (befor split) will
automatically generate assets with this solution.
Assets are also generated before post_install tests. This should be fast
if they already exists and ensure that assets are up to date after
modifying sources locally or after downloading a database on runbot.
It should be fast enough for small database and may be even faster
in the future for small diffs.
Part-of: odoo/odoo#99176
Since owl now uses error chains/causes when errors happen in the owl
lifecycle, when an error happens in the owl lifecycle, the displayed
tracebacks generally only contain the stack trace of where owl called
the corresponding lifecycle hook.
This commit modifies the error service and the error utils so that now,
when completing/annotating a traceback, we also add the tracebacks
(annotated when appropriate) of the error cause chain, as it contains
valuable debugging information.
This commit also makes it so that the QUnit suite logs the source of
each test failure (which may be an error with a chained stack trace)
closesodoo/odoo#98157
Signed-off-by: Géry Debongnie <ged@odoo.com>