When you disable the headers through the website editor and try to add
a product to the wishlist, a traceback occurs because there is an animation
that uses the dom element of the wishlist that doesn't exist.
We can avoid the animation in the case where the wish is not defined
reproducible in 14.0 with the wishlist (must be activated in settings)
and in 15.0 with the cart and the wishlist
opw-2722163
closesodoo/odoo#82294
X-original-commit: 2a9768f6a09751af82ccabee3d565f622ea418f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, the `test_05_google_analytics_tracking` tour would often
fail, due to some race condition. It was introduced with [1].
Rewritting the test to make it (a lot) simpler, should get rid of the race
condition.
[1]: https://github.com/odoo/odoo/commit/78bc86cbeccfc5df16218aee2b0d7c501e5c05b5
task-2726482
closesodoo/odoo#82184
X-original-commit: 4bb6e3f38d8a5843cf82f889ac4eef7daf3da717
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Solve multiple issues on the products grid, causing:
- the ribbon to be wrongly positioned
- the layout to be broken on Firefox
- the products' images ratio to be incorrect on Safari
task #2710553closesodoo/odoo#81150
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
The fields are not used, don't work correctly and there is a specific
report to generate the product prices according to the pricelist and
the ordered quantities
Prior to this commit, any add 2 cart would rerender the dynamic
snippet, making it flicker and in the case of the carousel, resetting
to page 1.
With this commit, only filters that require the snippet to reload will
do so.
task-2654924
X-original-commit: 7f84a10cc5ff7ba4c65c249dfb2fe546968e2a7c
Part-of: odoo/odoo#80867
With a recent commit[1], we added the scrollerService. However, as a side effect
'Track Visitors' and 'Event Sub-menu' customize menus are not clickable because
they are anchor tags with href=# and the clicks on such anchors are disabled
with scrollerService..
With this task, we take the opportunity to clean up customize menus a bit
because and instead of the anchor tag, now such menus are wrapped within
label (<label>) tags with 'dropdown-item m-0' classes.
Menus are now cleaned and clickable again.
commit[1] - 0573aca
Task-2616588
closesodoo/odoo#80391
X-original-commit: 7e010500fbe64bddb944335ca5960586699484af
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the issue:
- Install "eCommerce" module
- Create 2 attributes with 'Variants Creation Mode' is Never and
one of them should have at least 2 values.
- Create a product and add the two attributes as variants and
one of them should have at least one value
- Go to configure variant and select the first attribute and
exclude one or more values from the second variant
- Go to the website and change the variant to a value from the one
you excluded and add to the cart directly (you should be fast).
Issue:
Product with a not possible combination is added to cart.
Cause:
Not checking if the combination is possible before adding to cart.
Solution:
When adding product to cart, if element with class
".js_add_cart_variants" is present and have children,
trigger _getCombinationInfo to retrieve last combination info,
then add it only if the combination is possible.
opw-2569109
closesodoo/odoo#80134
X-original-commit: 7667d4ea32f758d062d0a0820dfc5bd6d0d084b4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
The forced selection of the entire text value was preventing the user
from changing the selection after the initial click inside the monetary field.
task-2679088
X-original-commit: d33d55aad46c9223192d15c01b7516340be77cce
Part-of: odoo/odoo#80071
This commit makes use of CSS variables to define new design and options
for the /shop page.
In detail, options now toggle classes that contains CSS variables
definition. These variable are used to style the "default template" that
is designed in SCSS only once.
This approach allow us to add more designs without increase the SCSS
(actually reducing it) and without creating complex xpath difficult
to customize.
task#2667024
Part-of: odoo/odoo#79651
Properly align categories' entries + use <h6> tags rather than forcing
uppercase text (not editable by the user).
task#2667024
Part-of: odoo/odoo#79651
In the product page, when the categories are activated
(through the customize menu item) and the page is in edit mode and when
the user click on one of the categories, the page was relocated.
We do not want that behavior in edit mode.
task-2666167
closesodoo/odoo#79818
X-original-commit: b929a6388035c3f5c69aab6c4889e326eac53fd9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The cart UX was improved with [1] at payment step by adding a block ui when the
user had clicked on "Pay now".
Indeed, that step could take some (long) time, and preventing the user to click
on anything would limit the possible issues: changing a delivery, a payment
provider or anything.
Also, it would be even clearer to the user that something is being processed,
even if the Pay now button was already spinning.
The payment refactoring [2] did not correctly adapt that behavior.
This commit restores it.
[1]: https://github.com/odoo/odoo/commit/eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
[2]: https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99
task-2659450
closesodoo/odoo#78307
X-original-commit: b2a66370a9b6f37ae7177d40b7d43b82fb83cc8b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.
Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.
In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.
Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.
// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
<button class="dropdown-item" type="button">Action</button>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
<li class="o_dropdown_item">
<span>Action</span>
</li>
<li class="o_dropdown_item">
<a href="#">Another action</a>
</li>
</ul>
// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
<span class="dropdown-item">Action</span>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)
closesodoo/odoo#77649
X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Before this commit, when creating a new ribbon after selecting an
existing ribbon, the style of the selected ribbon was added to the new
ribbon in addition to the default style.
task-2501515
closesodoo/odoo#77412
X-original-commit: 10867860489214b956fbe7fac5ff36f24c94c46d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, the text color preview of the ribbons in the
ribbon selector was wrong. But also, if we selected another ribbon
just after changing the text color of a ribbon. This color was applied
to the selected ribbon.
task-2501515
X-original-commit: 19252137588b30a69ce57f0248a504f7e929b98e
Part-of: odoo/odoo#77412
This commit adds new templates for the s_dynamic_snippet_products
and improves the current templates for a better reading of the product’s
title and a better management of space when the content have different
width.
Part of https://github.com/odoo/odoo/pull/75623
task-2602978
X-original-commit: 49bd79b0bdca76415780bdfa199195371c2692e5
Part-of: odoo/odoo#77153
It is impossible to define the default order in which to display
products in the shop page. The order can be changed through the
"Sort By" dropdown, but it is reset every time the page is refreshed.
There is now an option in the website editor that allows setting a
default sorting method that is applied when displaying products.
It is overridden by the setting from the "Sort By" dropdown if
there is a different sorting method selected.
task-2616245
closesodoo/odoo#76512
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: website_sale, website_sale_delivery
The old analytics snippet (isogram) is replaced by the newer gtags
snippet. Virtual page views and ecommerce transactions are now tracked
using gtags. The e-commerce data format is updated to correspond with
the new GA4 format.
task-2500769
closesodoo/odoo#72233
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
(*: website_blog, website_event, website_forum, website_sale,
website_slides)
Before this commit the search bar was specific to products.
After this commit a generic search bar is available as a general feature
of website which can be configured to inspect specific models.
The snippet is used to replace the old search bar in blog, courses,
event, forum, page and shop.
The search results of these pages and the autocomplete of the search bar
run through the same search mechanism.
A new hybrid results page has also been created as a target of a search
on "Everything".
In each involved module, `website._search_get_details()` is implemented
to return search metadata for every model related to the `search_type`
parameter.
Search metadata for a single model is returned by `_search_get_detail()`
on that specific model.
The autocomplete runs through the additional
`website._search_render_results()` pre-rendering step that prepares the
data to fit in the autocomplete template.
task-2379555
https://github.com/odoo/odoo/pull/65871
Part-of: odoo/odoo#65871
Several changes distinguish product attributes better from variant
attributes. The variant creation mode is added on the template form for
attribute lines with more than one value. Specification attributes are
no longer listed as variant attributes in the product variant form and
tree views.
task-2466988
closesodoo/odoo#72559
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Tom De Caluw <tdc@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Description of the issue/feature this PR addresses:
Currently, we cannot display prices per unit (for example $/kg, etc.)
on products shown in the shop. This is important for any eCommerce
business that sells something other than units, or just for informational
purposes.
Desired behavior after PR is merged:
Allows the user to add unit measurements for products. This behaviour is
disabled by default, and can be enabled through the settings page by
activating "eCommerce Base Unit Price" option.
Enabling it displays a price per unit field in /shop's product page,
comparison tool and cart. The price per unit of measurement is
automatically computed and can be displayed both on the product,
the cart and the comparison pages.
Enabling it also modifies the product's configuration page to include
what unit of measure to display in the price per unit field, as well
as the number of units used to calculate the price per unit.
task-2558128
Part-of: odoo/odoo#72242
Co-authored-by: Kamen Zhekov <kzh@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
When browsing the eCommerce part of the website, customers
should be able to filter shop products based on base sale price.
Desired behavior after PR is merged:
The filter slider can be enabled through the customize menu and it only
filters using the product's base price (for performance reason) and takes
into account currency conversions, not pricelists and discounts. It uses a
custom-built library for the range input with 2 cursors (min. price and max. price).
The slider is hidden when all products shown on the current page
(category, etc.) have the same price (or there is only one product).
A more advanced version of this implementation would enable the filtering to
take more factors into account.
task-2603014
closesodoo/odoo#74575
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: fja-odoo <fja@odoo.com>
Co-authored-by: Kamen Zhekov <kzh@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
The changes concern the following modules:
- sale
- sale_product_configurator
- website_sale
- website_sale_product_configurator
When optional products are enabled and a user adds an item to the cart, the
modal popup does not allow further modifications to the main product based
on its template. If the user wants to change the color or the material, they
have to close the popup, modify the product and open it back up.
The same is applied when Add to Cart is active, and the user cannot configure
the product at all after clicking the add to cart button.
This change will make it possible to change the product variants without having
to close the modal, and configure the product when using the "Add to cart"
button when it's enabled.
The added configuration step is needed for some cases like the following:
1. When adding a product that had variants directly from the /shop page before,
the first variant was added by default and configuring it was impossible without
explicitly going on the product's page and configuring it from there. This
behaviour made no sense, and it's the reason the "optional products modal"
(which should no longer be called that) is opened when the product is not
configured even if there are no optional products.
2. When going through the product's page, and there are optional products enabled
for the product getting configured, then it's nice but not necessary to be able to
configure the product further while choosing and configuring the optional products.
This doesn't add an extra step in any case, it just makes it possible to still configure
your product in the modal.
3. If there are no optional products, the configuration made on the product's
page is taken into account and the product is directly added to the cart without
opening the modal, which is the same behaviour as previously.
Only one modal is shown, depending on the situation:
- For the website flow, if the product is not configured and has variants or has
optional products (or both), a popup shows that allows for configuration +
choosing and configuring optional products.
- For the sales flow, there was already a configuration popup, so the optional
products modal is only shown when there are optional products and replaces
the first instead.
Some tests were adapted to function with the new product configuration modal:
- The steps checking for the text mentioned above are removed
- Triggers were adapted to the modal for products that were previously added to cart
with their default variant
- Various other small adjustments
task-2541663
closesodoo/odoo#73086
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Some return values were missing on cartHandlerMixin._addToCartInPage and
WebsiteSale._submitForm, therefore it was not possible to wait for their
promises to be resolved.
task-2458165
Part of https://github.com/odoo/odoo/pull/68221
- Remove the class "text-uppercase" from "add to cart" and "buy now"
buttons.
- Increase font size of the product page breadcrumb.
- Rename "Default" into "Featured" in the sort by of the shop page.
- Add a scrollbar on the cart popover.
task-2574300
PR-73234
After this commit, the cart quantity (in the navbar) increase after
the animation instead of before the animation.
We also changed the animation of the cart quantity to have a small
zoom when the number changes instead of an hide followed by a fade in.
task-2574300
PR-73234
We increase the time (if we can call this a fix) while the switch from frontend
to backend become faster. It seems to be a problem of (useless?) regeneration of
assets + a slow refactoring of scss in backend which use extend that is slow...
closesodoo/odoo#74477
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
/shop/products/autocomplete return price already rendered with monetary
widget, so it is plain html like:
"$ <span class=\"oe_currency_value\">12.00</span>"
It need to be marked MarkupSafe to avoid the escaping.
closesodoo/odoo#74407
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Go to website shop
- Add free product or discount to cart to make sure that total amount is 0
- Try to confirm order
It will not be possible because the "Confirm Order" button is disabled by
default and there is no way to enable it.
opw-2577089
closesodoo/odoo#74323
X-original-commit: c61349244ee09577c3e07e7b75da8a3c6134b0cf
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
* direct product attributes seem to not be necessary at all,
`list_price` and `price` are just numbers
* mark `description_sale` as markup-safe at load
* mark ribbon.html as markup-safe at load
* mark embed code value as safe on rendering
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
*: website_crm, website_form_project, website_hr_recruitment,
website_sale
Replace website_crm specific behavior by another option for all website
forms.
Part of https://github.com/odoo/odoo/pull/69888
task-2462993
It replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) sale.order -> note
2) sale.order.template -> note
Task Id: 2499504
X-original-commit: 6a345c2695129a5cd907e5e23e057871ebf9ebfa
Before, get_http_domain make the job,
now we force website.domain to be valid
closesodoo/odoo#71161
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The "Accept Terms & Conditions" toggle had been mistakenly removed from
the "Customize" tab by commit 573ed74.
task-2494916
closesodoo/odoo#71102
X-original-commit: b64519c1cb15540db5343f69be501e7a6d507b06
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
*: website_sale_product_configurator
The goal of this commit is to fix the tour : "shop_buy_product"
by adding the "goToCart" step to work with the new "add to cart"
scenarios (adding products in the same page is default behaviour).
closesodoo/odoo#68889
X-original-commit: ccc1584cd5ee9156e96e373997765b94831a828d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: web_editor
It prevents user writing in the image preview of products.
Also, the product image view now fit its container so that the user can
click wherever in the frame to change the picture.
Part of https://github.com/odoo/odoo/pull/68823
task-2446852
closesodoo/odoo#68850
X-original-commit: e4f06666307e79b9a5b26357a1545a56e6bd40b2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website_sale_comparison, website_sale_wishlist
Redesign the all products page (/shop) + various UX improvements
task-2009483
Part of #66736
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: portal, portal_rating, product, sale, sale_product_configurator,
website, website_sale_comparison, website_sale_product_configurator,
website_sale_stock, website_sale_wishlist, point_of_sale
Redesign of the product page + various UX improvements.
task-2009483
Part of #66736
After this commit, the image of the product is in position sticky so
that it remains displayed while scrolling the right column.
task-2009483
part of #66736