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>
Menu sequence of the sale module are now numbered 10/20/30 instead of
1/2/3 to allow third-party modules to introduce a new menu entry between
two existing menu entries.
closesodoo/odoo#99972
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce:
- Go to settings
- Click on discard
-> the breadcrumbs contains twice the "Settings" entry.
This commit fixes the issue by restoring the legacy behavior in
the "Discard" button handler, that is, calling doActionButton with
the special="cancel" param. This had been changed by mistake during
the conversion of the settings form view.
To make the fix work, a slight changed has been done in the model
as well, as reloading a datapoint could lead to the creation of
a new datapoint (typically when it's a new record), so the handle
must be updated in this case.
closesodoo/odoo#99904
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The field timesheet_cost defined on hr_employee in hr_timesheet would be
useful in other modules (eg planning and MRP) as well. Therefore with this
commit the field is moved into a separate module upon which
hr_timesheet will have a dependency. In addition this field is renamed
to employee_hourly_wage, which is a more accurate and neutral name for
this field, as it will not only be used in timesheets.
task-2929518
closesodoo/odoo#97988
Related: odoo/enterprise#30359
Related: odoo/upgrade#3853
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- adapt the html field and mass_mailing_widget to be owl components
- adapt the mass mailing view to be an owl view
task-2898432
closesodoo/odoo#94875
Related: odoo/enterprise#30915
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Having a specific iframe selector like `div iframe.specificIframe div`
passed to `get_jquery_element_from_selector` would not work.
Before this commit, it would be split into:
- 'div iframe' outside of the iframe
- '.specificIframe div' inside of the iframe
After this commit, it is now split into:
- 'div iframe.specificIframe' outside of the iframe
- 'div' inside of the iframe
task-2898432
Part-of: odoo/odoo#94875
Steps to reproduce:
- Go to Accounting > Configuration > Chart of account
- Click on the setup button on the "Current Assets" line
- items are not correctly aligned
Cause of the issue:
`<separator/>` should take an entire row
The separator was on the same row as the field label.
closesodoo/odoo#99641
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This merge simplifies and uniformize the ListView's styling.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2946835
closesodoo/odoo#98234
Related: odoo/enterprise#30482
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit moves the element inside the table to avoid that the
dropdown may overlap thead column labels.
Part of the overall v16 SCSS optimization/restyle, task-2704984
task-2946835
Part-of: odoo/odoo#98234
Before this commit: If one of the PoS order lines' products were
archived, when clicking on the "Refund", it wouldn't show any line and
got an error.
Steps to reproduce the first issue:
- Install the' Point of Sale' module
- Open a PoS session
- Add a product to the order
- Validate the order and close the session
- Archive that product_product
- Clear your browser cache
- Open a new PoS session
- click on the "Refund"
You get an error, and it wouldn't show any order lines.
Solution
An archived product shouldn't be shown on the PoS UI, but it should
be available for the refund if it exists in one of the order lines. So
the solution is to modify the domain to get archived products if needed
for the refund.
opw-2849240
closesodoo/odoo#99965
X-original-commit: 084d3800f3cbd84941f0761c6668f959504f83cb
Signed-off-by: Masereel Pierre <pim@odoo.com>
Our reporting dashboards are too tedious to use for the average user, and
doesn't allow for edition or advanced computations.
Using spreadsheet formulas allows almost endless possibilities.
Task-id 2799682
Part-of: odoo/odoo#97606
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
The spreadsheet module is moved to the community version
for the upcoming spreadsheet dashboards
This module is the core engine of spreadsheets in Odoo.
It contains `o-spreadsheet` library (o_spreadsheet.js) and all basic
integrations with odoo such as accounting formulas, lists, pivot, filters, etc.
This module alone does not have any action or menu to open a spreadsheet.
Those actions come with `documents_spreadsheet` module or the upcoming
`spreadsheet_dashboard` module.
Task 2799682
Part-of: odoo/odoo#97606
Right now the qunit will log all results at the end.
This means that the runbot may wait for all qunit before detecting the
failure.
This also mean that all failure are in one ir.logging on runbot, making
the automated parsing difficult if multiple modules fails during the
same build.
We could also log all failure immediately, but grouping them my qunit
module will avoid duplicating logs for linked causes (one failure
leading to a `Expected %s assertions, but %s were run` message)
closesodoo/odoo#99912
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, the project field in task and timesheet models is
clickable in list view of those models.
This commit prevents to open the form view in the list view since the
form view of project is now more a view to configuration the project and
so once the configuration is done, the user will not always need to go
to that view.
closesodoo/odoo#99949
Related: odoo/enterprise#31212
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This was introduced alongside the introduction of the cookies bar in
odoo with [1].
It's not something we wanted but for some internal reason, we were not
allowed to introduce the cookies bar on the website without that warning
when enabling the settings (which also comes with Cancel button as
primary button..).
The compromise was accepted as having a cookies bar was something we
really needed.
It has now been accepted to get rid of it.
While some internal people still think we should educate people about
GDPR and cookies law, I doubt that this settings was the right place to
do it.
Indeed, it was more leading to bad UX as most people just clicked on
"activate anyway" without realizing they still had to save the settings
afterward.
[1]: https://github.com/odoo/odoo/commit/3028e9a8649ae5d9b23a1bdb989b903645ede5feclosesodoo/odoo#99917
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: event, website_event, website_sale, website_sale_stock,
website_slides
With [1], new list views were created in the website app to display all
key models in the "Site" menu. Each view is based on the related model
base view in their related app, with some more website-related fields
(like the content URL, the SEO optimization, ...), etc. This commit
simplifies those views by removing some columns (make them optional) to
not make them feel bloated. Some changes were done in the base views.
- Products: simplify the website view by hiding 5 columns. Two were
stock related so it had to be done in a new view in
website_sale_stock.
- Events: simplify the website view by hiding 3 columns. Also move the
"stage" column at the end, in the base view too.
- Courses: simplify the view by hiding 1 column, this change is done
in the base view.
[1]: https://github.com/odoo/odoo/commit/da3f4c2aff92cca23ca2d7a87fa0eb5b1d7ce5feclosesodoo/odoo#99937
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Current behavior:
In calendar, when using studio to change the color (e.g. select : Created By)
you will get a traceback if you select the option to see everyone's calendar
Steps to reproduce:
- Install Studio and Calendar
- Go in calendar and start studio
- In the color field select "Created By"
- Save and go back to calendar
- Select the option to view everyone's calendar
opw-2971360
closesodoo/odoo#99929
X-original-commit: 7f73cecdf0816aabbfbaeb478b602b194df03d65
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Before this commit, when Stripe was installed, all providers would
display the option `Allow Express Checkout`.
Now, the `Allow Express Checkout` field is only shown on providers that
support this feature, even if Stripe is installed.
Part-of: odoo/odoo#99846
Fine-tuning of 0501bbd62e.
Now that `company_id` is present in the header, the XPath of the
provider form view defined in the `website_payment` module puts the
field `website_id` in the wrong place.
This commit moves the field where it belongs.
Part-of: odoo/odoo#99846
Class ResPartnerBank modified to:
- Add field 'allow_out_payment', true iff account can be recipient
of out payments
(False by default for new accounts except when created from res.partner)
- Enable chatter tracking for base fields
- Remove barely used/useful view view_company_partner_bank_form
closesodoo/odoo#94801
See: odoo/enterprise#29916
Task: 2856231
Related: odoo/upgrade#3637
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Two files were used to define the same class ResPartnerBank
There was no point in keeping both
ResBank is also a class that exists, so we keep res_partner_bank.py
While at it, cleaned up the code a bit
Part-of: odoo/odoo#94801
This commit fixes several tests involving the Autocomplete
component that would sometimes fail because it delays its
next rendering on input (by a setTimeout 0 in the tests). This is
sometimes not enough as it may imply that the next rendering
occurs after the next animation frame, which isn't what we wait
for in the tests (we expect the next rendering to be applied
before the next animation frame).
This commit fixes remaining tests that we forgot in [1]
[1] de6cd189a4closesodoo/odoo#99919
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>