Commit Graph
154061 Commits
Author SHA1 Message Date
stefanorigano (SRI) f9a0d656a3 [REF] website_sale: improve overall navigation
task-2907955

closes odoo/odoo#98558

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-12 15:30:45 +02:00
stefanorigano (SRI) 072144c353 [IMP] website_sale: add categories images
task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:45 +02:00
stefanorigano (SRI) 93f1607091 [IMP] website_sale: sticky sidebar
task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:45 +02:00
stefanorigano (SRI) 9fbae35099 [FIX] website_sale: allow products to match the grid
task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:44 +02:00
stefanorigano (SRI) e3aae30cc0 [IMP] website_sale: provide a visual feedback changing filters
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
2022-09-12 15:30:44 +02:00
stefanorigano (SRI) af3330bad8 [IMP] sale, website_sale: sidebar select fields design
task-2907955

Part-of: odoo/odoo#98558
2022-09-12 15:30:44 +02:00
stefanorigano (SRI) 46e5387974 [REF] website: multirange input
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
2022-09-12 15:30:44 +02:00
stefanorigano (SRI) ef10da0a36 [IMP] website_sale, website: ecommerce sidebar, improve design
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
2022-09-12 15:30:43 +02:00
stefanorigano (SRI) d16693b927 [IMP] web, website, website_sale, sale: checkbox/radio design
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
2022-09-12 15:30:43 +02:00
Victor Feyens 74aec75de9 [FIX] web: legacy fields
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).

closes odoo/odoo#100007

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:49 +02:00
William Braeckman 98df7cdb41 [FIX] website_sale_autocomplete: fix styling
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.

closes odoo/odoo#100005

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-12 13:49:46 +02:00
William Braeckman f129fd3e57 [FIX] website_sale_picking: fix access error as public user
When selecting on site picking and/or onsite payment the public user was
presented with an access error while it shouldn't.

closes odoo/odoo#100001

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-12 13:49:43 +02:00
Yolann Sabaux 5d5ff83a07 [FIX] account: fix double display of invoice
Steps to reproduce:
- Create a vendor bill with payment terms "30% Now, Balance 60 Days"
- register a partial payment and select "Mark as fully paid"
- open the payment and print the payment receipt

Issue:
the lines are printed twice

Addendum:
In Master (post saas-15.3), the `_get_reconciled_invoices_partials` returns a tuple:
https://github.com/odoo/odoo/blob/45e540b624268e65060f6b1aeaf2d87d7220b620/addons/account/models/account_move.py#L2475-L2493

opw-2964480

closes odoo/odoo#99997

X-original-commit: 9525c112e4048583e9b347b5703a416563085421
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-12 13:49:40 +02:00
Aaron Bohy 5f499d170e [FIX] web: apply default favorite even if active_id(s)
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.

closes odoo/odoo#99989

X-original-commit: 1e13e6cd073e57b3744caefc4b8f3795c35a4c10
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:37 +02:00
Florian Damhaut b3489af4c1 [FIX] web: basic_model: save a paged nested o2m
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.

closes odoo/odoo#99986

X-original-commit: e45e3b83f0f3116cc983c6bd8a9212e815b4d4f5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-12 13:49:31 +02:00
Aaron Bohy e9aac69e6b [FIX] web: adapt views to invisible attr removal in archs
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.

Closes odoo/odoo#99920

[1] odoo/odoo#99619

closes odoo/odoo#99948

Related: odoo/enterprise#31220
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-09-12 13:49:25 +02:00
Arnold Moyaux c38965e457 [FIX] stock_account: small typo in action_open_reference
move_id doesn't exist, it should be stock_move_id

closes odoo/odoo#99411

Related: odoo/upgrade#3878
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-12 13:49:17 +02:00
Arnold Moyaux 9f046d538f [IMP] purchase_stock, stock_account: handle invoice before receipt
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
2022-09-12 13:49:17 +02:00
Arnold Moyaux ccc1fa5d37 [IMP] purchase_mrp: cost share for kit
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
2022-09-12 13:49:16 +02:00
Arnold Moyaux 35d6c58f86 [REF] purchase_stock, stock_account: remove price difference account
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
2022-09-12 13:49:16 +02:00
Arnold Moyaux 7016337331 [IMP] stock_account: Add partner on account entries
Add the partner references on account entries created from
a purchase order receipt or a customer invoice

Part-of: odoo/odoo#99411
2022-09-12 13:49:16 +02:00
Arnold Moyaux 4adfeecdcf [IMP] stock_account: check if standard price before computation
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
2022-09-12 13:49:15 +02:00
svs-odoo 8bce06f9b6 [REF] stock_account: _get_in_svl_vals for stock.move
Part-of: odoo/odoo#99411
2022-09-12 13:49:15 +02:00
svs-odoo acc1c48921 [MOV] purchase_stock: create stock_move own file
Separates the inheritance of the `stock.move` model in `purchase_stock`
in its own file.

Part-of: odoo/odoo#99411
2022-09-12 13:49:15 +02:00
svs-odoo 2bc141e6ba [REF] purchase(_stock): Removes price diff account
- Removes related fields in views and models.

Part-of: odoo/odoo#99411
2022-09-12 13:49:15 +02:00
Xavier-Do c764c38d7c [IMP] website: pregenerate frontend assets
closes odoo/odoo#99176

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-09-12 13:49:00 +02:00
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