Commit Graph
154285 Commits
Author SHA1 Message Date
Xavier-Do 31b04aa44b [IMP] base: batch access rules for visible_menu
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
2022-09-12 13:48:59 +02:00
Xavier-Do 93a9eb0a32 [IMP] *: avoid useless bundle generations
Some bundle are exactly the same as other one, we can avoid generating
them by using the original one.

Part-of: odoo/odoo#99176
2022-09-12 13:48:59 +02:00
Xavier-Do ae3e68c1f4 [IMP] web: add tests for bundle pregeneration.
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
2022-09-12 13:48:59 +02:00
Xavier-Do b58967d8d1 [IMP] loading: pregenerate assets bundles after install
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
2022-09-12 13:48:59 +02:00
Samuel Degueldre 3db59860cb [IMP] web: display full tracebacks for error chains
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)

closes odoo/odoo#98157

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-12 13:48:49 +02:00
Lucas Lefèvre 3a2196d73c [MOV] spreadsheet_dashboard_account: move dashboard to account_accountant
closes odoo/odoo#99985

Related: odoo/enterprise#31221
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-12 12:43:49 +02:00
Romain Derie 62ad91eb58 [FIX] website: remove confusing comment
The comment was introduced alongside its related line with [1].
The line was removed with [2] but its comment was not, leading to
confusion now.
Instead of removing it in master, might as well remove the confusion in
lower version..

[1]: https://github.com/odoo/odoo/commit/3542a27f9c4c44472184bbedc348ad646d46f20a
[2]: https://github.com/odoo/odoo/commit/0effbe3ca628460b9a0c257ea0bd6060c3eeb253

closes odoo/odoo#99979

X-original-commit: 7258c82a46713f404df5cf1bdfa0e29975011fcf
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 12:43:47 +02:00
Alexis de Lattre 43bd951943 [IMP] sale: renumber menu sequences to leave space
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.

closes odoo/odoo#99972

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-12 12:43:44 +02:00
Alexandre de Pape (alpa) 092151a461 [FIX] fix tour using demo data
task_id=2943578

closes odoo/odoo#99906

X-original-commit: aa61bf648b9d9cdf6c087cdb90e13e60598ea9b5
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-12 12:43:41 +02:00
Hubert Van de Walle (huvw) 04b3a890d4 [FIX] web: duplicated breadcrumbs when discarding settings
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.

closes odoo/odoo#99904

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 11:38:18 +02:00
Rob Coekaerts a3eec47f35 [IMP] hr_timesheet: Move timesheet_cost into a separate module.
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

closes odoo/odoo#97988

Related: odoo/enterprise#30359
Related: odoo/upgrade#3853
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-12 11:38:11 +02:00
Ruben Gomes 04aa56e9f0 [IMP] l10n_si: update CoA, taxes and tax report
Update chart of accounts, taxes, tax report and fiscal positions for Slovenian localization

closes odoo/odoo#97893

Task-id: 2724396
Related: odoo/enterprise#30282
Signed-off-by: Ruben Gomes <rugo@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-12 11:38:05 +02:00
Nicolas Bayet 10af6e83bf [IMP] web_editor,mass_mailing: adapt fields to use owl
- adapt the html field and mass_mailing_widget to be owl components
- adapt the mass mailing view to be an owl view

task-2898432

closes odoo/odoo#94875

Related: odoo/enterprise#30915
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-12 11:38:00 +02:00
Nicolas Bayet 1d1e934db2 [FIX] web_editor: ensure _makeHint receives an element
Make a hint in the editor only if the first element is an element,
otherwise the method `_makeHint` would crash.

task-2898432

Part-of: odoo/odoo#94875
2022-09-12 11:37:59 +02:00
Nicolas Bayet e363c1d12d [FIX] web_tour: properly split iframe selector
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
2022-09-12 11:37:59 +02:00
Nicolas Bayet 586ef5465b [FIX] web_editor: properly stop collaboration bus listeners
Prior to this commit, the collaboration channel was never deleted
when the wysiwyg was destroyed or resetted.

task-2898432

Part-of: odoo/odoo#94875
2022-09-12 11:37:59 +02:00
maximilien(malb) 4645bdd5a7 [FIX] account, account_sepa_direct_debit: Typos fix
closes odoo/odoo#99890

Related: odoo/enterprise#31192
Signed-off-by: maximilien(malb) <malb@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-12 10:07:29 +02:00
Xavier BOL (xbo) 174b83a534 [IMP] resource: move resource_type below the company one in form view
task-2971572

closes odoo/odoo#99693

Related: odoo/enterprise#31110
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-12 10:07:23 +02:00
Hubert Van de Walle (huvw) 50b47fee1b [FIX] web: innergroup separator should add a new line
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.

closes odoo/odoo#99641

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-09-12 10:07:20 +02:00
Odoo's Mergebot 0f7a9ab863 [MERGE] web: ListRenderer review and optimise scss
This merge simplifies and uniformize the ListView's styling.

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2946835

closes odoo/odoo#98234

Related: odoo/enterprise#30482
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-09-12 10:06:57 +02:00
stefanorigano (SRI) 8add0bf5ec [IMP] web: ListRenderer improve design, simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2946835

Part-of: odoo/odoo#98234
2022-09-12 10:06:56 +02:00
stefanorigano (SRI) eb1fa44652 [IMP] web: o_optional_columns_dropdown, move into thead
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
2022-09-12 10:06:56 +02:00
Arnaud Baes dffa40f744 [FIX] account,sale: View crashing when missing permissions.
Domains could not be computed when the user requesting the view don't
have the right permission for accessing the field
`partner_credit_warning`

Reported via p/feedback

closes odoo/odoo#99673

X-original-commit: https://github.com/odoo/odoo/commit/d145b140a077c26a714fa9a8d0542d4584ca7459
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-11 12:22:40 +02:00
pedrambiria 8e81e00813 [FIX] point_of_sale: get the archived products in pos UI for a refund
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

closes odoo/odoo#99965

X-original-commit: 084d3800f3cbd84941f0761c6668f959504f83cb
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-09-10 11:55:21 +02:00
Lucas Lefèvre db7322c260 [IMP] web: add dashboard modules to web tooling
closes odoo/odoo#97606

Related: odoo/enterprise#26856
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-10 02:54:54 +02:00
Lucas Lefèvre 1be7a96dab [ADD] spreadsheet_dashboard_pos_hr: add point of sale dashboard
Part-of: odoo/odoo#97606
2022-09-10 02:54:54 +02:00
Lucas LefèvreandNathan Grognet 3a86b9d903 [ADD] spreadsheet_dashboard_event_sale: add events dashboard
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:54 +02:00
Lucas LefèvreandNathan Grognet c623ea6686 [ADD] spreadsheet_dashboard_sale: add sales dashboard
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:53 +02:00
Lucas LefèvreandNathan Grognet 82f9297af1 [ADD] spreadsheet_dashboard_hr_expense: add expense dashboard
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:53 +02:00
Lucas LefèvreandNathan Grognet 123a0fc739 [ADD] spreadsheet_dashboard_account: add finance dashboards
Part-of: odoo/odoo#97606
Co-authored-by: Nathan Grognet <ngr@odoo.com>
2022-09-10 02:54:53 +02:00
Lucas LefèvreandPierre Rousseau cb5cca73a8 [ADD] spreadsheet_dashboard: introduce spreadsheet based dashboards
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>
2022-09-10 02:54:53 +02:00
Lucas Lefèvre bf5e59ddaf [MOV] spreadsheet: move filter components to community
Part-of: odoo/odoo#97606
2022-09-10 02:54:52 +02:00
Lucas Lefèvre 5f826b2b69 [FIX] spreadsheet: throw loading when additinal field is fetched
Part-of: odoo/odoo#97606
2022-09-10 02:54:52 +02:00
Lucas Lefèvre 2c06b1dd68 [IMP] spreadsheet[_account]: update o-spreadsheet to latest version
This update contains the following commit:
https://github.com/odoo/o-spreadsheet/commit/50e7c2006837f9c080d6d917920a04b1361b8b6a
https://github.com/odoo/o-spreadsheet/commit/7bc2a8f7c6c6ef33f38f87126a46b6093424b61f
https://github.com/odoo/o-spreadsheet/commit/90d64243a1ba13da402cf5b7611c762d5bba70f8
https://github.com/odoo/o-spreadsheet/commit/cb7534a9f6068bf9a1e008810ab3a3d83ae45d6c
https://github.com/odoo/o-spreadsheet/commit/a5236ad4b8a7a83a62c4806f2c7aa69d92535b8f

Part-of: odoo/odoo#97606
2022-09-10 02:54:52 +02:00
Lucas Lefèvre f78691a6b8 [MOV] spreadsheet_account: move module to community
The spreadsheet_account module is moved to the community version
for the upcoming spreadsheet dashboards

Task 2799682

Part-of: odoo/odoo#97606
2022-09-10 02:54:52 +02:00
Lucas Lefèvre a20032cc1c [MOV] spreadsheet: move module to community
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
2022-09-10 02:54:51 +02:00
qsm-odoo 45b1d99c8f [IMP] website_links: move "Link Tracker" menu in "This page" section
With the menu reorganization at [1], "Link Tracker" was moved as a
main menu inside the "Site" menu. It better be in the "This page"
section after all since the UI is autocompleted with the current page
being visited (to create a tracking link for it).

[1]: https://github.com/odoo/odoo/commit/7aaef54fe2fee39979e643b7579c1b1e1d9f6799

closes odoo/odoo#99940

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-10 01:54:15 +02:00
Xavier-Do 0a695ab6b2 [IMP] web: one log per qunit module.
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)

closes odoo/odoo#99912

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-09-10 01:54:12 +02:00
Xavier BOL (xbo) 91d25c932f [IMP] project,hr_timesheet: no open project in list view
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.

closes odoo/odoo#99949

Related: odoo/enterprise#31212
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-09 22:49:57 +02:00
Romain Derie a879938b7f [IMP] website: don't warn people when enabling cookies bar
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/3028e9a8649ae5d9b23a1bdb989b903645ede5fe

closes odoo/odoo#99917

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 21:47:46 +02:00
qsm-odoo 273cdd7150 [IMP] *: review website content pages views and minors in related apps
*: 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/da3f4c2aff92cca23ca2d7a87fa0eb5b1d7ce5fe

closes odoo/odoo#99937

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-09 19:53:39 +02:00
Antoine Guenet 76c2b5574e [IMP] web_editor: give editor code view a minimum height of 400px
The editor's code view had no minimum height so it was impractically
small.

closes odoo/odoo#99932

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-09 19:53:34 +02:00
roen-odoo 9d095e4ecf [FIX] calendar: fix traceback when using studio color
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

closes odoo/odoo#99929

X-original-commit: 7f73cecdf0816aabbfbaeb478b602b194df03d65
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-09-09 19:53:32 +02:00
Valentin Chevalier 9c1549915c [FIX] payment_demo: test provider code doesn't exists anymore
Missing rename of `test` to `demo` following commit e648489401.

closes odoo/odoo#99846

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2022-09-09 18:53:54 +02:00
Valentin Chevalier 049d817a58 [FIX] payment_stripe: show Allow Express Checkout when supported
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
2022-09-09 18:53:54 +02:00
Valentin Chevalier 757a8a9c69 [FIX] account_payment: transfer provider code doesn't exists anymore
Fine-tuning of 61b8c0c1a2.

Missing rename of `transfer` to `custom` following commit 5f41f15.

Part-of: odoo/odoo#99846
2022-09-09 18:53:53 +02:00
Valentin Chevalier a12257d470 [FIX] website_payment: fix website_id position in form view
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
2022-09-09 18:53:53 +02:00
Stanislas Gueniffey 281100bdda [IMP] base, account: bank accounts management
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

closes odoo/odoo#94801

See: odoo/enterprise#29916
Task: 2856231
Related: odoo/upgrade#3637
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-09 18:53:40 +02:00
Stanislas Gueniffey c41d9ab869 [REF] account: merge res_bank & res_partner_bank
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
2022-09-09 18:53:39 +02:00
Aaron Bohy e28c581a62 [FIX] web: fix tests failing randomly
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] de6cd189a4

closes odoo/odoo#99919

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-09 17:29:55 +02:00