Issue:
------
Using the website editor, we can add a content block
to the ribbon (using drag and drop on the product image)
on the shop page of ecommerce.
Solution:
---------
Make the ribbon non-editable so that it will not have the `o_editable`
class added via the `editableElements` function of `WysiwygAdapterComponent`.
opw-3515908
closesodoo/odoo#139993
X-original-commit: 712edead528c6db8b97a8957bcf7bb3c8005d14a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
*: website_sale, website_sale_wishlist
This commit allows the user to show and hide the menu items they want
using the web editor.
task-3060986
Part-of: odoo/odoo#119650
*: website_sale, website_sale_wishlist
This commit removes the following templates:
- template_header_image
- template_header_hamburger_full
- template_header_magazine
New templates were added by previous commits. Those old 3 do not have
an equivalent anymore and are simply removed.
task-3060986
Part-of: odoo/odoo#119650
*: website_sale, website_sale_wishlist
The new header is quite different from the old one, the xml_id of
the header will thus change. That new "sales_three" header will however
be the closest one to the "contact". A related upgrade script will be
made to treat this as a simple xml_id renaming.
task-3060986
Part-of: odoo/odoo#119650
*: website_sale, website_sale_wishlist
The new header is quite different from the old one, the xml_id of
the header will thus change. That new "sales_two" header will however be
the closest one to the "slogan". A related upgrade script will be made
to treat this as a simple xml_id renaming.
task-3060986
Part-of: odoo/odoo#119650
*: website_sale, website_sale_wishlist
The new header is quite different from the old one, the xml_id of
the header will thus change. That new "search" header will however be
the closest one to the "centered_logo". A related upgrade script will be
made to threat this as a simple xml_id renaming.
task-3060986
Part-of: odoo/odoo#119650
*: website_sale, website_sale_wishlist
This commit adds a new header template displayed on mobile screens.
It also introduces the Mobile Alignment feature, allowing the user to
adapt the Navbar alignment to mobile screens. It will replace the
previous "off-canvas" feature also available on desktop. This commit
removes that old feature but the new mobile menu will only be enabled
in each template in next commits.
task-3060986
Part-of: odoo/odoo#119650
*: website_livechat, website_sale, website_sale_wishlist
This commit adapts some templates and tests JS to prepare for the new
headers in the next commits.
task-3060986
Part-of: odoo/odoo#119650
Steps to reproduce:
refer to ticket
Bug:
if there's no available pickup points on the selected delivery method
the pay button is disabled but clicking on a payment option reanbles the
button
eventhough "_onClickPaymentMethod" doesn't enable the button since
_isPayable is false,
"_onClickPaymentOption" already enabled the button.
Fix:
disable the button before updating the payment method
also disable the button at the start when changing shipping method
(to avoid client clicking pay while carrier data is loading)
opw-3432905
closesodoo/odoo#139522
X-original-commit: 6a91e63504cb45d2f80162d2a91b76e733c0facf
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Issue:
------
When we use stripe to pay for a subscription via ecommerce,
we get the following error message:
```
The provided setup_future_usage (off_session) does not match the
expected setup_future_usage (null). Try confirming with a Payment Intent
that is configured to use the same parameters as the Stripe Elements.
```
Cause:
------
On the JS side, the value of `is_tokenization_required` is set to `False`,
which doesn't set the value of `setup_future_usage` to `off_session`,
causing the mismatch with the PY side.
The `_is_tokenization_required` method uses `sale_order_id` which comes from the template.
The template finds this value in the `sale_order_id` variable,
which is passed via the context.
Unfortunately, this key does not exist in the context.
As a result, the method _is_tokenization_required`
returns False instead of True.
Solution:
---------
Add `sale_order_id` in the context to render the template
and therefore detect the sale order afterwards.
opw-3541316
closesodoo/odoo#139518
X-original-commit: c6b803baf26b3f26ace6464de944f681c7078c2e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Improved header (billing/shipping address instead of 'my details')
Keep the use_same input value on invalid form refresh
closesodoo/odoo#139474
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit makes the arrow of `.css_attribute_select` fields in the
product configurator modal match the color of the text of the input.
This ensures that the arrow is always visible with any background color
task-3559424
closesodoo/odoo#139051
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit:
Fixes margin issues between buttons and inputs inproducts_header.
We are now using a gap instead of individual margin per element
Fixes an issue in the left filters where input's were cropped
when focused. We fixed this issue by using paddings and negative
margins to compensate.
task-3559384
part-of-3097005
closesodoo/odoo#139043
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
*: website_sale, sale_product_configurator
With this commit, Image options for the color variant have been
implemented. Now, users can use images to represent pattern colors such
as "leopard" instead of solely selecting a solid color.
- User can add, remove or change the color attribute value image from
the backend. If no image has been uploaded, it will use the
corresponding HEX color to represent color/patterns.
task-3381738
Part-of: odoo/odoo#132685
Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).
Also
- removes translation markers entirely when there's nothing to
translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
(DRY is generally a bad idea when translations are involved, even
more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
to fill-paragraph): `\` escapes only the newline, if the
continuation string is indented this results in a bunch of spaces
ending in the string to translate, which is pretty garbage for the
translator, using implicit concatenation works much better
Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.
Not in scope:
Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders
- Provides more context / data to the translator to make sense of the
sentence.
- Allows reordering the translated terms, which can be necessary
depending on the sentence and language.
closesodoo/odoo#139314
Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The goal of this PR is to unify the styling of the accordion component
with the bootstrap styling of a card.
The layout of the accordion had to be adapted with an extra div to use
the `accordion-item` as the `card-body`. This styling will allow better
maintainability of the accordion which now visually act as a card
component in > lg screens. This will be required to handle different
background theme color.
This PR also fixes wrong indentation in the SCSS.
task-3556135
closesodoo/odoo#138522
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Accessory product was showed to user in cart
even when it was unpublished, now it's only
showed to internal user if unpublished.
task-3218286
closesodoo/odoo#139358
X-original-commit: b1f617135d64875d8306387482ddea535dcff1bc
Signed-off-by: anko-odoo <anko@odoo.com>
Address form forced the input of phone fields.
1) It only makes sense for shipping addresses by default, for delivery purposes
2) It was not properly handled in global checks, so you could do the whole
checkout flow without having a phone set on your address, but if you went to
the address page, you wouldn't be able to save as your phone would be invalid.
Side-change: do not check shipping address validity for orders without delivery
(only services).
closesodoo/odoo#138026
Related: odoo/upgrade#5248
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
* Avoid posting crappy forms when a redirection does the job
* use a dedicated route /shop/cart/update_address for address changes
* clean code from recent PR on invoicing address
* Public user shouldn't be able to create billing addresses
* Logged customer should always see his own partner as billing/shipping
address choices.
Part-of: odoo/odoo#138026
This commit removes the legacy global bus (core bus) and the places
where it was used.
The main users of this bus were the public widgets, they now use the bus
on Component.env.
Some of the uses were dead code and has been removed.
closesodoo/odoo#139076
Task: 3439226
Related: odoo/enterprise#49131
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
*: mass_mailing, test_website, web, web_editor, website, website_event,
website_sale
This commit removes jQueryUI draggable and droppable component to
instead use our own implementation of the feature. This replaces the
last use of the lib: the web_editor drag and drop. This takes advantage
of the code that was already written for other features of the backend.
task-3079246
closesodoo/odoo#136793
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The first intention of this commit was to remove ´@extend´ but
it actually makes sense to remove ´.oe_left´ and ´.oe_right´ classes.
Since grid we can avoid "float" elements (see .oe_subtotal_footer)
and we only have to remove this class.
For the other case, we have to use ´.float-start' and ´float-end´
to replace ´oe_left´ and ´oe_right´.
closesodoo/odoo#139199
Related: odoo/enterprise#49211
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The checkout button is always active as soon as the cart is not empty.
However, there are many cases where we want to prevent the user to move
on, as the cart is not ready to go on.
This commit adds a class to the button that disables it when the method
_is_cart_ready returns False.
task-3537684
closesodoo/odoo#137844
Related: odoo/enterprise#48533
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, the warning message on the cart could be duplicated
when editing the cart, as it was not reloaded by the js. This commit
makes sure that the warning message is re-rendered, and removed if
needed.
task-3537684
Part-of: odoo/odoo#137844
- Install `website_sale`
- Go to /shop
- Click on Editor and Edit a product
- Add a new ribbon/badge
- Changing text color works
- Changing background color doesnt
Because `bg-primary` has an `!important` background_color
closesodoo/odoo#138712
X-original-commit: c6f4929f65b899736c556f8f0bb7824883a6d893
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
As mentioned in https://github.com/odoo/odoo/pull/105848#discussion_r1324796532, the ``_getCurrentLocation`` method was called on every page of ecommerce, while it was doing nothing unless if we are on the payement page.
Putting the call in the ``if`` ensures that there are carriers on the page and thus calls it only when on the payment page.
closesodoo/odoo#139086
X-original-commit: 65e7535fc9392e7b9355a31fa8f7c8abc1e3518f
Signed-off-by: Martin Maes (marm) <marm@odoo.com>
Remove TIN from Billing Address view as it's
not supported.
task-3283179
closesodoo/odoo#138839
X-original-commit: 3f79cc23665f2bee762465734aa147309b5aaa3e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.
To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.
task-3072562
X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
Changed _onChangeCountry and _changeCountry from
website_sale.js to make them inheritable by
returning the value of the promise instead of
returning nothing.
closesodoo/odoo#137480
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This PR offset the cart_summary of the size of the tallest header to
make sure the header is not hiding the cart summary when the user
scrolls in the checkout.
This is a temporary solution and the real header height should be
used as a value instead of the default's one.
task-3551420
closesodoo/odoo#138543
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
This commit introduce the information button on the product card in the
self order mode. This button open a popup with the newly created field
"description_self_order" which is an HTML field allowing the user to
have a very customizable description for the product.
It also removes the description_ecommerce field from the product view
form as it is a field used in the website and not adapted for
the backend (css/js not compatible).
closesodoo/odoo#138216
Task-id: 3512835
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
The legacy RPC was removed in 7422eb6 and replaced by `rpc_service`. The
changes to adapt the list view button on the `/shop` pages did not work.
This commit will use `rpc_service` instead of `this.rpc` which is not instantiated.
closesodoo/odoo#133064
Related: odoo/enterprise#46252
Related: odoo/upgrade#5190
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
It introduces:
New navigation flow with buttons inside the cart_summary template
Reviewed tables across the pages removing stripes and improving spacing
Redesigned stepper wizard with a reusable template in /website
task-3083707
Part-of: odoo/odoo#133064
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
__Current behavior before commit:__
When changing the `display_type` of an attribute in the website editor,
the page is reloaded. However the template `website_sale.product` is
contained in a `t-cache` on "pricelist,product". This means that the
template will not be rendered again when the page is reloaded. Thus, the
change will not appear for the user.
__Description of the fix:__
Flush the cache from the `ir.qweb` model when the attribute display type
is edited. This way the template `website_sale.product` will be
refreshed.
__Steps to reproduce the issue on runbot:__
- Go on the website product page of *Customizable Desk*
- Open the website editor
- Click on the Legs attribute values
- Under the **Block** section, change the **Display Type**
The page is reloaded but the display type stays the same
([Video][1])
opw-3495159
opw-3493820
[1]: https://drive.google.com/file/d/142VP4prnHskfa7uFoEkadsoQfQVO-uyW/viewclosesodoo/odoo#137498
X-original-commit: cc8664973efd7ea3433b5ec5b741f0882fb17dc0
Signed-off-by: Julien Launois (jula) <jula@odoo.com>