Commit Graph
4114 Commits
Author SHA1 Message Date
Victor Feyens 33f58b2824 [IMP] sale_*: clean order line name computation
* make sure full content is translated in partner language
* drop useless product param (use line product_id field instead)
* delegate order lines name computation to computes for ecommerce carts

closes odoo/odoo#82620

Related: odoo/enterprise#23432
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-12 16:43:37 +00:00
Benoit Socias a676344ecc [FIX] website{_*}: not truncate URLs in search results
website{_*}: website, website_blog, website_event, website_forum,
website_sale, website_slides

Since the generic search bar was introduced in [1] all text fields were
truncated in search results.
This caused problems for long URLs which were truncated as well, and
therefore could become invalid.

After this commit URL fields specify `'truncate': False` in their search
detail metadata, which informs the rendering to skip the text truncation
step for that field.
Also added previously missing controller-level tests of the
autocompletion.

Steps to reproduce:
- start odoo with website_forum and demo data
- go to the Help forum
- search for "configure" in the Help forum
- click on the auto-complete suggestion
- => redirected to a 404 page because the URL was shortened
To test the fix on other models, use a long enough name that causes the
problem. E.g.: "This product has such a long name its URL would have
been truncated without the fix contained in this branch".
Note that the problem did not occur on blogs because the URL does not
contain the name, but the same fix was applied for consistency.

[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986

task-2727788

closes odoo/odoo#82621

X-original-commit: 045f741be35e62f5e3a636490c6c1d475b5d78eb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-12 14:55:03 +00:00
Nasreddin Boulif (bon) c40aadb42b [FIX] sale,website_sale: Display extra prices with taxes included
Steps to reproduce the issue:

  - Install eCommerce module
  - Go to Settings
  - Ensure `Product Prices` is set to 'Tax included'
  - Create a new Product as storable
  - Set `Sales Price` to $1.0 and `Customer Taxes` to 10.00 %
  - Under `Variants` tab add an Attribute with 2 values
  - Set "Price Extra" to $2.0 to one of the variants
  - Go to the Shop and select the product

Issue:

  The extra price badge does not include the taxes
  ($2.0 instead of $2.2), however the final price does.

Cause:

  The price_extra field from ptav (used in the badge) does not include
  the taxes.
  However, when calculating the final price, we do first the sum of all
  prices (including the extra prices) and then apply the taxes.

Solution:

  In the template, for each 'variants', we call `_get_combination_info`
  to get the variant.price_extra with taxes included/excluded
  depending the `Product Prices` setting.

opw-2669871

closes odoo/odoo#81949

X-original-commit: 6f04935d14d595faa3bb8dd6ba9e0dcf1d694886
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-01-12 10:17:43 +00:00
thcl-odoo fcabebf687 [FIX] website_sale: Only internal users can be picked as salesperson
Current behavior :
Any users (not only internal users, but portal users too) can be selected
from the `Salesperson` field in the Settings. 

Exepected behavior :
Only internal users can be selected.

Steps to reproduce :
- Install eCommerce
- Go to Settings, Website category 
- Find Orders Followup category
- Try to pick a salesperson

OPW-2709759

closes odoo/odoo#81368

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-06 18:44:05 +00:00
Achraf (abz) 39e11b34d3 [FIX] wesbite_sale: Prevent traceback on website/shop without headers
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

closes odoo/odoo#82294

X-original-commit: 2a9768f6a09751af82ccabee3d565f622ea418f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-05 18:02:42 +00:00
Romain Derie f1f21432a3 [FIX] website_sale: refactor the GA test to avoid race condition
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

closes odoo/odoo#82184

X-original-commit: 4bb6e3f38d8a5843cf82f889ac4eef7daf3da717
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-03 18:58:47 +00:00
Victor Feyens f6240e3b9c [IMP] website_sale: rename files according to their model names
closes odoo/odoo#82094

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-03 12:34:21 +00:00
Victor Feyens 313123c5fb [IMP] website_sale: split python files by classes
Part-of: odoo/odoo#82094
2022-01-03 12:34:21 +00:00
Victor Feyens eb6004d704 [MOV] website_sale: wizard to the dedicated folder
Part-of: odoo/odoo#82094
2022-01-03 12:34:21 +00:00
Victor Feyens 32731c5e13 [IMP] website_sale: split python files by classes
Part-of: odoo/odoo#82094
2022-01-03 12:34:20 +00:00
Romain Derie c88f76cab7 [FIX] website_sale: add missing method check 2021-12-21 17:14:00 +01:00
stefanorigano (SRI) b0bf660c77 [FIX] website_sale: design fixes
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 #2710553

closes odoo/odoo#81150

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-12-23 16:43:01 +00:00
Yannick Tivisse 9e99a9df46 [IMP] product: Remove price/pricelist_id field from template/variant
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
2021-12-23 15:30:23 +01:00
Victor Feyens 0acd96c340 [IMP] sale: Use a 'cached' pricelist rule mechanism
Cache the pricelist rule used for price computation in a dedicated non
stored field, since it is used both for the price_unit and the discount
computation.

This divides by 2 the number of pricelist requests/queries when
discounts computation is enabled.
2021-12-23 15:30:23 +01:00
Victor Feyens 57ced812f0 [REF] product: clean pricelist API
* Do not rely on context, everything should be cleary specified through
parameters
  Catch context keys in an unique targeted place to improve code clarity
* Drop strange old API
  * do not provide unused partner parameter anymore
  * do not provide products, qty as a list of tuple, we only request the
same qty for all products anyway
* Clear methods, add/adapt comments and docstrings
* Reduce potential side-effects of context content.
2021-12-23 15:30:23 +01:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Camille Spiritus 3732aea4b8 [IMP] account,sale: move partner_shipping_id field from sale to account
The computation of 'partner_shipping_id' is now done using a 'compute' instead of 'onchange'.

task-2601934

closes odoo/odoo#78449

Related: odoo/enterprise#22098
Related: odoo/upgrade#3000
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-14 14:47:25 +00:00
Pierrot (prro) b8d2663790 [FIX] website_sale: translate Pay Now and Confirm Order
How to reproduce the problem:
- Install the website_sale module and the German language (and
activate it for the website).
- Go to the website, and choose the German language.
- Add a product to your cart and checkout.
=> on the checkout page, the button "Pay Now" is not translated (
"Confirm Order", if the total amount = 0)

These terms are now added for translation.
The terms were incorreclty formatted in the xml and were not
picked up for translation export. Introduced by this commit:
https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99

opw-2686463

closes odoo/odoo#81056

X-original-commit: 166c19d5e9018332a63c1c82dd4268fd1224332b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Roose Pierre-Rodéric ( prro) <prro@odoo.com>
2021-12-08 13:44:33 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Arthur Detroux (ard) 51c3a69304 [FIX] website_sale: make less product snippet refreshes
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
2021-12-03 18:24:07 +00:00
Martin Trigaux 8519df849e [FIX] website_sale: allow public user to print cart
When the public user is connected, allow him to print the report of
the open cart.
Since 61b4b6777d64 the sudo is not enough but with_user(1) is
required.

closes odoo/odoo#80803

X-original-commit: a4021965f1f049c69186e1f2acbc55ae59ee8730
Signed-off-by: Olivier Dony <odo@odoo.com>
2021-12-02 18:40:13 +00:00
Yannick Tivisse 5863070066 [IMP] sale: Remove useless SO line values on creation
Purpose
=======

Those are now the default values that are computed from the field
definition.
2021-12-02 12:12:03 +01:00
Yannick Tivisse 3c07a3fecd [IMP] sale: Apply misc styling improvements + remove dead context keys 2021-12-02 12:12:03 +01:00
Yannick Tivisse 280cf015e1 [IMP] sale: Use compute method for notes + translate field in default value 2021-12-02 12:12:03 +01:00
Yannick Tivisse fecff7119f [IMP] sale: Don't recompute taxes on tax configuration change
This should be done manually
2021-12-02 12:12:02 +01:00
Yannick Tivisse 1003ef0e70 [IMP] sale: Convert _onchange_discount into compute method 2021-12-02 12:12:02 +01:00
Yannick Tivisse 916e92aa30 [FIX] sale: Split product_id_change into several compute methods 2021-12-02 12:12:02 +01:00
Yannick Tivisse 2806c5fd9f [IMP] sale: Convert onchange_partner_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse f0f30828fc [IMP] sale: Convert onchange_partner_shipping_id into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse b9194406ec [IMP] account: Avoid multiple rebrowse in get_fiscal_position
+ Make it private, as it is not supposed to be called from the
webclient.
2021-12-02 12:12:01 +01:00
Yannick Tivisse 550eb0b73c [IMP] account: Convert _onchange_sale_tax into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse 40b2bc6f65 [IMP] website_sale: Convert _onchange_group_discount_per_so_line into compute method 2021-12-02 12:12:01 +01:00
Yannick Tivisse ebd719e0fa [IMP] website_sale: Convert _onchange_sale_delivery_settings into compute method 2021-12-02 12:12:01 +01:00
Tom De Caluwé c8fdea914d [IMP] website_sale: warn for open cart on partner pricelist change
It is not always immediately clear to the end user that changing the
pricelist on a partner will not change the pricelist for any open carts
related to this partner. To clarify, this commit introduces a warning
message, indicating that the end user should change the pricelists of
these open carts manually if this is the desired effect.

Any open carts that already have the same pricelist as the new partner
pricelist are excluded from the search and will not trigger the warning
message.

task-2635067

closes odoo/odoo#77298

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-26 15:10:30 +00:00
Vishal Thacker b43ac31f70 [IMP] sale,stock,website_sale: texts update
- Renames "DHL"/"DHL USA Connector" into "DHL Express Connector";
- Changes the orderpoint's constraint message when the user's trying to
create an orderpoint who already exists.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:24 +00:00
Goffin Simon fbf2726d28 [FIX] website_sale: Keep salesperson when editing portal partner
When editing the billing address of an existing portal partner P,
the salesperson of P was changed by the default website salesperson

opw:2649732

closes odoo/odoo#80415

X-original-commit: 52442484897d95bfffa3f8672908bd3d00923363
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-26 10:31:49 +00:00
Nikunj Ladava 00193c4d11 [FIX] website_{event, event_meet, sale, sale_coupon}: improve design for customize menus with label tag
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

closes odoo/odoo#80391

X-original-commit: 7e010500fbe64bddb944335ca5960586699484af
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-25 13:28:51 +00:00
Arthur Detroux (ard) dc50a79203 [FIX] website_sale: add names to some blocks
Before this commit, website shop had some blocks without names
which could make it hard for a user to understand to which block was
an option related.

This commit adds names to these blocks.

task-2670809

closes odoo/odoo#78889

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-24 19:21:41 +00:00
stefanorigano (SRI) 539ccabe4f [FIX] website_sale: snippet_filter demo image url
Update some missing urls that should have been adapted with https://github.com/odoo/odoo/commit/d063d99e1590856561f0fffe5acf38747e359d86

closes odoo/odoo#80178

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-24 06:59:53 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Nasreddin Boulif (bon) 1132e2b395 [FIX] website_sale: check combination before add to cart
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

closes odoo/odoo#80134

X-original-commit: 7667d4ea32f758d062d0a0820dfc5bd6d0d084b4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2021-11-22 07:49:51 +00:00
2dd772dab8 [IMP] website, *: improve video providers handling
*: web_editor, website_sale

This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.

All the regexes are kept in a python tools file and are called in JS
using an RPC.

task-2154812

closes odoo/odoo#44537

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
2021-11-19 22:32:39 +00:00
Sébastien Geelen (sge) 3275d19415 [FIX] web_editor,website_sale: monetary field UX fix
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
2021-11-19 10:42:06 +00:00
alt-odoo b272cc0713 [FIX] website_sale: incorrect view called in borderless product view
We should call view portal_rating.rating_widget_stars_static instead of
portal_rating.rating_widget_stars_static_compressed.

closes odoo/odoo#79914

X-original-commit: 500ffd175869508893eaf10b06137ec7e044252a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2021-11-17 10:44:36 +00:00
Fabio Barbero 1a9b6422ff [IMP] digest: organise digest view
Purpose
=======

Give the user a more organized view of the digest KPIs in the backend and
improve global wording of digest sections and KPIs.

Specifications
==============

Reorganize order of KPIs in digest view. Fix some typos, move buttons in
list and form views.

Task-2582128

closes odoo/odoo#77507

Related: odoo/enterprise#21340
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-16 19:20:57 +00:00
stefanorigano (SRI) 536db5c64f [IMP] website_sale: new products-list designs
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
2021-11-16 13:03:03 +00:00
stefanorigano (SRI) d063d99e15 [REF] product, *: update demo-data images
task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:03 +00:00
stefanorigano (SRI) 528429e64c [FIX] website_sale: "block" options, design coherently to editor
task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:02 +00:00
stefanorigano (SRI) 531f81a73f [FIX] website_sale: product's carousel, improve design
Improve the design and increase the carousel height when set to vertical
layout.

task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:01 +00:00
stefanorigano (SRI) 8ff203e068 [FIX] sale, website_sale, *: fix product's page cta block design
task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:00 +00:00