Commit Graph
4394 Commits
Author SHA1 Message Date
William Braeckman ae497d22e5 [FIX] website_sale{,_stock}: fix issue with tests
Multiple tests introduced in 16.0 created a product template and then a
default product for that template, however a default product is already
created by default in the product module when creating a template and it
somecases triggered an unicity constraint.

closes odoo/odoo#108523

X-original-commit: 3c9ff6e148cd0ee77442dd31079f0fec9c456b4c
Related: odoo/enterprise#35180
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-22 13:47:58 +01:00
Abdelouahab (abla) 2c7ab4d85f [FIX] website_sale: set t-key to unique value
To reproduce
============
- add a second image to a product and publish it on the website
- on the website make sure to enable image popup when clicking on it
click on the product image -> error

Problem
=======
the `t-key` is set to `image` which has the value `[object Object]` as `string`
so for the `t-foreach` loop all the keys are the same which leads to keys duplication error

Solution
========
set `t-key` to the `image.thumbnailSrc` because we are sure
that the src is unique.

opw-3090782

closes odoo/odoo#108485

X-original-commit: 6059b8ca68cfe8f631451f7d306387c6ed4f7844
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-12-22 09:37:59 +01:00
Lucas Vermeulen (luve) 0d0ab5d8db [FIX] e-commerce : hide pricelist if only one pricelist is available
If only one pricelist is available, it is not necessary to allow the user to click to dropdown the pricelist menu. If only one is available then the pricelist dropdown menu is hidden.

task-3058654

closes odoo/odoo#108418

X-original-commit: caba846362fdc443aa22e1997d7668fa4fd50d6d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-21 16:36:51 +01:00
Ivan Yelizariev 4c396b1db2 [FIX] website_sale: show empty cart icon before starting animation
On clicking "add to cart" button, there is a simple animation of product image
moving to the cart icon. However, if the cart icon is hidden because of disabled
option "Show Empty Cart", the animation is broken: the image is moving to left
corner of the navbar.

Fix it by showing cart icon before starting the animation.

opw-3078396

closes odoo/odoo#107760

X-original-commit: 6110b993ce63356e1b5b900f7bacb2afa648f6ad
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-12-16 13:48:20 +01:00
Ivan Yelizariev a73cb1ca95 [FIX] website_sale: add noFuzzy when it's active
`website_sale` module has custom handler for form submit event. That handler
ignores `noFuzzy` attribute. As result, adding `data-no-fuzzy="1"` to
`input[name=search]` works everywhere, but not on shop product list pages.

STEPS:

1. Settings > Technical > Views > website_search_box_input & website_search_box > Code in data-no-fuzzy="1" into the <input> tag
2. Go to Website >.Shop > Customize > Enable ecommerce categories
3. Search for a product on the main shopping page and enter > Observe the URL > There is no noFuzzy param
4. Go to any product's page on the website > search for a product through the search bar and enter > Observe the URL > there is a noFuzzy param passed

opw-3051319

closes odoo/odoo#107771

X-original-commit: 1df3b14f86bada2e2cf278d2b4e591996e9e8db8
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-13 10:05:12 +01:00
Romain Derie c18d94f0c4 [FIX] website_sale: don't use real user as website public user
Commit [1] introduced the creation of a website in the tests, but
wrongly set `user_id` to the current environment user.
It doesn't make any sense as this field is supposed to hold the website
public user, which is not a real user and is supposed to be a public
user, as the field name hints..
On top of that, the current environment user (the demo user for tests,
which is wrongly set as the website public user) is then used to login
into the website, which is then making things even more weird/wrong: you
are not supposed to login with the public user (which is not really a
public user here but still marked as the public user from the website).

It was preventing the fix from this same PR (see previous commit) to be
working, as it was making this tour crash.

Not setting the `user_id` property will simply let the system create one
for you (a real public user..).

[1]: https://github.com/odoo/odoo/commit/3611aaf0983b3d25822022ebeddd781f6d082bf7

closes odoo/odoo#107759

X-original-commit: 68fc99cf944090a37ee2d392990f39adb4899076
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-12 17:17:09 +01:00
xO-Tx 8e12c0b19f [IMP] website_sale, *: follow-up of "site" menu restructure
*: website_sale_comparison

The goal of this commit is to add the following tweaks on website menus
(after the "Site" menu updates done in [1]):

- Use kanban view by default for products in "eCommerce" menu.
- Use list view by default for the product list in "site" menu.
- Add a placeholder text when there are no attribute categories defined.
- Move 'Attribute Categories' to debug mode.

[1]: https://github.com/odoo/odoo/pull/98937

task-2973149

closes odoo/odoo#107583

X-original-commit: 82e9afeff8bb4bd64c5f0fb95af4f4b7a66e722d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:58 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Thibault Delavallée 0be5b37008 [MOV] mail, loyalty, purchase, (website_)sale: move model-specific composer code to model
PURPOSE

Purpose of this task is to cleanup attachment management done in generic mail
models overrides and move it in account as model overrides.

SPECIFICATIONS

Update addons

  * in purchase and sale: context key update should be done at message_post
    level, especially this is not used in mass mailing mode;
  * in website_sale: code to update sale order to avoid sending recovery
    emails several times belongs to a "post hook" method on sale order model;
  * in loyalty: remove a deprecated / unsupported 'mark_coupon_as_sent' key;

Task-2792146 (Mail: Move model-dependent code from composer / template)

Part-of: odoo/odoo#106658
2022-11-28 15:52:59 +01:00
Donatas cd704e7119 [IMP] website_sale: adds search_product to shop values
closes odoo/odoo#106613

X-original-commit: 3772da47af7e1de2d9608372c9306e61a91ded82
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-28 14:51:33 +01:00
qsm-odoo d49200feca [REF] website, *: remove (deprecated) $target uses in public widgets
*: auth_totp_portal, mail_group, portal, survey, web, website_event,
   website_event_track, website_mail, website_mail_group,
   website_mass_mailing, website_payment, website_sale

Although this is deprecated since 5 years with [1], new occurrences of
`this.$target` in widgets kept being introduced. `this.$el` can be used
just like in any other widget, or even better: `this.el` to not rely on
jQuery.

For now, this still keeps the definition. This just removes the bad uses
to prevent more copy/paste... let's delay the decision to remove the
definition entirely to another day.

[1]: https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8

closes odoo/odoo#106437

Related: odoo/design-themes#618
Related: odoo/enterprise#34343
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-24 19:25:14 +01:00
Thomas Lefebvre (thle) e5298cf394 [FIX] website_sale: no possibility to go back on e-commerce
Steps to reproduce:
    - go to e-commerce app;
    - select a product;
    - try to return to the shop with the browser's back arrow.
    (if the URL contains `\@\`, is not necessary to click on a "action", otherwise we must)

Issue:
    It is not possible to go back.

Cause:
	Modifying the hash modifies the history of the browser.

Solution:
	Change hash without changing browser history.
	`window.location.replace` documentation: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace

opw-3061027

closes odoo/odoo#105976

X-original-commit: b3f501db38e14b28cc6b63ffe91562e556a97c16
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-17 21:04:40 +01:00
Nicolas (vin) 3d58e967ef [FIX] website_sale: fix products_snippet_recently_viewed tour
The tour is failing undeterministically, seemingly because a step is
done too soon after the previous one without giving the time for the
website to reload everything as expected.

By reordering the steps a bit, this issue can be avoided and fix the
test issue.

closes odoo/odoo#105891

X-original-commit: ff91efcda8cb80da4c376e74714f4c0dedad63c1
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-16 21:43:52 +01:00
Xavier Luyckx (xlu) 67802eb759 [FIX] web: products snippet: fix layout issues
Before this commit, some templates for the products snippet in website
had some layout issues. This commit fixes them.

task-3060991

closes odoo/odoo#105890

X-original-commit: e829b345f0f5e5346be416b8354c29fa9acb74a7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-16 21:43:49 +01:00
Nshimiyimana Séna f1eb3b9d42 [FIX] website_sale: register the website_sale.FieldVideoPreview template
### Steps to reproduce
* install `website_sale` (eCommerce)
* go to any product's form view
* in the 'Sales' tab, click `ADD A MEDIA`
* fill the 'Video URL' field and save

You should be met with a traceback saying that the template
`website_sale.FieldVideoPreview` is missing.

opw-3057118

closes odoo/odoo#105755

X-original-commit: 9cbb0ab0bafa4e05673862d601a7b089bbd2b519
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-15 13:01:38 +01:00
Nicolas (vin) 9168a8e73b [FIX] website_sale: make add_to_cart_snippet_tour run as expected
Add a setUpClass with a dummy payment provider to ensure that at
least one is always available when the tour is running, and set
the company country_id to None before starting the tour to avoid
any country dependant fields to block the tour during the checkout
process.

closes odoo/odoo#105700

X-original-commit: 779965fbf0471f2b003692f1afa541864a396651
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-14 17:18:11 +01:00
William Braeckman fedede859e [FIX] website_sale: fix traceback with express checkout
It can happen that the payment transaction route is called without the
amount kwargs, the code would crash in that case as we tried to access
it either way.
We moved the code after setting the default amount in the kwargs to
avoid a crash.

closes odoo/odoo#105576

X-original-commit: c124fb3292439a6237f16eff406c0a7d375cab65
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-10 23:17:16 +01:00
Nicolas (vin) f0eb6f3906 [FIX] website_sale_*: fix a few tests
Some tests are running tours, which have triggers on the amount.
The issue is that if the test is running on a company with another
currency than usd, and these tours ends up using a pricelist in USD for
example, then the prices in the website will be adapted and no longer
match the trigger in the tours.
This change aims to correct that by ensuring that only one pricelist
can be used when these tours are running, and that this pricelist
currency matches the one from the company. As such, the prices will be
as expected and the tours will run properly.

closes odoo/odoo#105523

X-original-commit: 9a81cf604bbbc626a0fa68219a4fe017cd781bc7
Related: odoo/enterprise#33836
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-10 09:50:40 +01:00
William Braeckman a901105299 [FIX] website_sale: fix traceback when unselecting attribute
This commit fixes a traceback when changing the attributes when the
current page has no products to display

TaskId-3045085

closes odoo/odoo#105515

X-original-commit: b8a1b1143eec4a85b9dc8b2c6fbb0112f6b813d7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-09 22:12:48 +01:00
Benoit Socias fadd1c8a87 [REV] *: revert "[REF] website, *: make _search_get_details extensible"
*: test_website, website, website_blog, website_event, website_forum,
   website_sale, website_slides

Reverts this refactoring because it breaks multi-tenancy: if several
databases run on the same server and different modules are installed
in each database, the global variable becomes wrongly populated.

Steps to reproduce:

On runbot:

- Go to the `-base` URL or simply select the `base` DB
- Drag & Drop the search snippet (and let it set to "Search in
Everything")
- Try to use the snippet -> Crash on unknown model

On Odoo.com saas DB:

- Drag & Drop the search snippet (and let it set to "Search in
Everything")
- Try to use the snippet -> Crash on unknown model (unless you installed
each and every module related to the search snippet)

Locally:

- odoo-bin -d first -i website --stop-after-init
- odoo-bin -d second -i website_blog --stop-after-init
- odoo-bin -d first,second
- Try to use a search bar on "first" database (using "Search in
Everything") => it tries to access the blog models.

Revert of PR: #98423

opw-3045092

closes odoo/odoo#105077

X-original-commit: 5806f71af1b6f44aac063f7e504be736300f699d
Related: odoo/enterprise#33669
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-11-07 11:26:58 +01:00
Walid HANNICHE (waha) a961a52f88 [FIX] website_sale: display error if cart updated before payment
Steps to reproduce:
- on Ecommerce website Add an item to your cart.
- Billing/Shipping info > Stop on Payment page.
- Duplicate tab, On the duplicate, add more products to your cart.
- Go back to the original tab (Payment page) > Check out with Stripe.
- Stripe acquirer page does not reflect the updated cart amount.
- Complete payment > Website will say order is confirmed.
- Go to this SO in backend

Bug:
SO is not confirmed and Stripe status says there is a mismatch
because it did not take updated amount.

Fix:
double check the ammount before processing payment

opw-2978244

closes odoo/odoo#105060

X-original-commit: be9d2a57c4628fc867aefc932aaf8c503e76b60f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-04 19:47:03 +01:00
Andrea Grazioso (agr-odoo) a04e1bf6e0 [FIX] website_sale: fiscal position application
Have the following taxes:
- Tax A: 15%, included in price
- Tax B: 21%, included in price

Create a product P with list price 115 and tax A

Have a fiscal positions FPOS configured with:
- Detect Automatically checked
- Country: Belgium
- Map tax on product: A -> B

Open a web shop session as guest, add P to cart
Go to checkout: Price total will be 115
Fill address details with Belgium address
Go to confirmation page

Error:
Price total will be 100. In the application of fiscal position the wrong
unit price is used

opw-2973879

closes odoo/odoo#105061

X-original-commit: 0a8394055221e48c610ad51eef21eb1a16f1e9f9
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-11-04 18:53:01 +01:00
Nasreddin Boulif (bon) 195bc157ab [FIX] account, [l10n_ar_]website_sale: always display b2b fields
Steps to reproduce:

  - Install `l10n_ar_website_sale` module

  - Go to shop (Argentinian website) and add a product to cart
  - Open cart and click on checkout
  - Click on Customize and disable `Show b2b fields` feature

Issue:

  Fields are no more displayed.

Cause:

  Since the b2b fields template (`address_b2b`) is customizable (meaning
  it can be enabled/disabled), it is possible for all countries to
  display/hide the b2b fields, but for some countries (for example
  Argentina) it should not; the b2b fields should always be displayed.

Solution:

  Add a method (`_display_partner_b2b_fields`) on website model to know
  if b2b fields should be displayed: return True if `address_b2b` view
  is active on current website or if the company (based on the country)
  must display them.

  Move content (b2b fields; vat and company name fields) of view
  `address_b2b` in `address` main view and let the `address_b2b` only be
  used as switch to display or hide the b2b fields.

  Add a condition in `address` view to display b2b fields only if the
  method `_display_partner_b2b_fields` returns `True`

opw-2941199

closes odoo/odoo#104505

X-original-commit: 1b5c85722db00a44ed8c6cb0c2bdba8905dc5292
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-11-02 10:40:16 +01:00
qsm-odoo 8aac90bcbb [FIX] website, *: allow to re-edit company team snippet images
*: website_sale

Since [1], it was not possible to edit a company team snippet image
anymore as soon as the page was saved once. Indeed that commit added
o_not_editable/contenteditable="false" on the parent column to make sure
no text can be added in that column and contenteditable="true" on the
images so that they are still editable (even though HTML-specs-wise
adding contenteditable="true" on images probably does not mean much as
images are self-closing tags, our editor understand that as the ability
to edit the image anyway). That contenteditable="true" part is however
removed when leaving edit mode... and was not restored upon entering
edit mode again.

This fixes the problems with a specific JS patch, we'll review to see if
better can be done in master.

Funny enough, that bug was actually gone in 15.0... by mistake. A recent
bug fix actually reintroduced that isolated bug at [2] (by reintroducing
the fact that images in a non-editable environment are not possible to
edit). The 3 opened tickets this commit mentions were actually reported
for 15.0 immediately after that, while the 14.0 being broken about this
since the beginning apparently did not bother anyone.

Note: as a forward-ported fix, this also takes the opportunity to clean
a bit what was done at [3]. (calling `_super`, no duplicated code,
adding comments, ...).

[1]: https://github.com/odoo/odoo/commit/656cac1bf21c7c5a56aa569008aac58436c747fb
[2]: https://github.com/odoo/odoo/commit/e113bae04a64a8bd341a80736086ab7c25079dd3
[3]: https://github.com/odoo/odoo/commit/e2f7b8fad76dc816b2f6864340d3740446117cdb

opw-3031217
opw-3032482
opw-3035289

closes odoo/odoo#104521

X-original-commit: 1636ba5ed2f8a284bef0930313a85cc3dc7cf072
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-31 16:03:21 +01:00
Valentin Chevalier cb0ac30fd5 [FIX] website_sale: fix payment naming error
`Payment acquirer` model was renamed `Payment Provider` in f7b8f07.

closes odoo/odoo#104565

X-original-commit: 4f49b6f4f2c3537f4da581761bb34f8e7b4155e7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-28 22:44:47 +02:00
Alexandre Kühn cc6546677d [IMP] mail, *: Rename component to match model (step 2)
[IMP] mail: rename ActivityBox to ActivityBoxView (component)
Task-3046113

[IMP] mail: rename ActivityMarkDonePopoverContent (component)
Task-3046122

[IMP] mail: rename AttachmentBox to AttachmentBoxView (component)
Task-3046129

[IMP] mail: rename AttachmentDeleteConfirm (component)
Task-3046160

[IMP] mail: rename CallActionList (component)
Task-3046187

[IMP] mail: rename CallParticipantVideo to CallParticipantVideoView (component)
Task-3046193

[IMP] mail: rename ChannelInvitationFormSelectablePartner (component)
Task-3046287

[IMP] mail: rename ChannelInvitationFormSelectedPartner (component)
Task-3046288

[IMP] mail: rename ChannelMember (component)
Task-3046298

[IMP] mail: rename ChannelMemberList (component)
Task-3046306

[IMP] mail: rename ChannelMemberListCategory (component)
Task-3046307

[IMP] mail: *: rename ChatWindowHeader (component)
*: hr, im_livechat, website_livechat
Task-3046330

[IMP] mail: rename ChatWindowHiddenMenu (component)
Task-3046358

[IMP] mail: rename ChatWindowHiddenMenuItem (component)
Task-3046515

[IMP] mail, *: rename Composer (component)
*: hr_recruitment, im_livechat
Task-3046555

[IMP] mail: rename ComposerSuggestedRecipient (component)
Task-3046598

[IMP] mail: rename ComposerSuggestedRecipientList (component)
Task-3046624

[IMP] mail, *: rename ComposerTextInput (component)
*: im_livechat
Task-3046648

[IMP] mail: rename DeleteMessageConfirm (component)
Task-3046661

[IMP] mail, *: rename Discuss (component)
*: im_livechat
Task-3046685

[IMP] mail: rename DiscussMobileMailboxSelection (component)
Task-3046703

[IMP] mail: rename DiscussMobileMailboxSelectionItem (component)
Task-3046709

[IMP] mail, *: rename DiscussSidebar (component)
Task-3046719

[IMP] mail: rename DiscussSidebarMailbox (component)
Task-3046732

[IMP] mail: rename DropZone (component)
Task-3046739

[IMP] mail: rename FollowButton (component)
Task-3047154

[IMP] mail: rename Follower (component)
Task-3047203

[IMP] mail: rename FollowerListMenu (component)
Task-3047236

[IMP] mail: rename FollowerSubtype (component)
Task-3047272

[IMP] mail: rename MailTemplate (component)
Task-3047314

[IMP] mail, *: rename Message (component)
*: im_livechat, sms, snailmail, website_sale
Task-3047352

[IMP] mail: rename MessageAuthorPrefix (component)
Task-3047683

[IMP] mail, *: rename MessageList (component)
*: hr_recruitment, website_livechat
Task-3047718

[IMP] mail, *: rename MessageNotificationPopoverContent (component)
*: sms
Task-3047742

[IMP] mail: rename MessageSeenIndicator (component)
Task-3047765

[IMP] mail, *: rename MessagingMenuTab (component)
*: im_livechat
Task-3047802

[IMP] mail: rename MobileMessagingNavbar (component)
Task-3047806

[IMP] mail, *: rename NotificationGroup (component)
*: sms, snailmail
Task-3047829

[IMP] mail, *: rename NotificationList (component)
*: im_livechat
Task-3047871

[IMP] mail: rename NotificationRequest (component)
Task-3047883

[IMP] mail, *: rename PersonaImStatusIcon (component)
*: hr_holidays
Task-3047969

[IMP] mail, *: rename ThreadIcon (component)
*: hr_holidays, im_livechat
Task-3047980

[IMP] mail, *: rename ThreadNeedactionPreview (component)
*: im_livechat, rating, test_mail_full
Task-3048021

[IMP] mail, *: rename ThreadTextualTypingStatus (component)
*: im_livechat
Task-3048042

[IMP] mail, *: rename ThreadTypingIcon (component)
*: im_livechat
Task-3048043

[IMP] snailmail: rename SnailmailError (component)
Task-3048051

[IMP] website_livechat: rename VisitorBanner (component)
Task-3048069

Task-3047725

closes odoo/odoo#104548

Related: odoo/enterprise#33411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-28 20:39:58 +02:00
Romain Derie 8b9dac9293 [FIX] website_sale: add text variable to header cart t-cache
Without this, it will simply ignored the given `_text` variable as the
t-nocache part is scroped. It means it can't access natively the
variables outside of its scope unless those are passed to the scope
through the `t-nocache-var_name` form.

Basically, it resulted in the "My Cart" never shown next to the cart
badge counter.
Most of the time, this text is used in replacement of the `fa` icon, so
it led to poor UI: a floating badge left alone.

task-3044936

closes odoo/odoo#104416

X-original-commit: cd50114cc422941920ff4d579ab6b48aae75cc6a
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-28 11:22:45 +02:00
Laurent Smet 6f92ff5e00 [FIX] website_sale: Make test files working with l10n overrides
The current test is based on demo data making the file red on runbot for nightly build when a localization is installed.
In order to deal with localizations, all tests must implement the accounting AccountTestInvoicingCommon class.

X-original-commit: 3611aaf0983b3d25822022ebeddd781f6d082bf7
Part-of: odoo/odoo#104389
2022-10-28 08:22:56 +02:00
Thomas Lefebvre (thle) 6d910be313 [FIX] website_sale: base unit price not updated with pricelist and tax
Steps to reproduce:
- set a price on the product form;
- set a base unit count on the product form;
- define at least a pricelist with an other price;
- go to website on the product page;
- change the selected pricelist;
- change the Tax-Excluded/Included option.

Issue:
The base unit price ignores the tax included option.

Solution:
Update the display of the base unit price taking into consideration that it is not possible to set the "base_unit_price" field (otherwise we risk an AccessError).
Calculate the base unit price using "list_price" (which takes into account the tax) when we need to display it without saving.

opw-2995474

closes odoo/odoo#104302

X-original-commit: b766d68287b73b70a784e7291c567fb2e59de0c3
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-10-27 14:41:31 +02:00
Alexandre de Pape (alpa) ca8f33b961 [IMP] website_sale: change mandatory checkout labels
This commit changes the label of the checkout button if the user is not signed in and the option is mandatory.

closes odoo/odoo#103072

Task: 2991670
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-27 11:38:42 +02:00
Benoit Socias 51a006673c [FIX] website_sale: restore visibility on products snippet
Since [1] the visibility options were removed from the products snippet.

This commit restores the visibility options.

Steps to reproduce:
- Drop a products snippet.
- Select it.
=> The visibility options were not shown.

[1]: https://github.com/odoo/odoo/commit/57a1776c3695b1fec6ffa0b6ec3de59518b8a0a9

task-2930503

X-original-commit: 47172c76f8020abdab2a7bd7bdfece6760b8316f
Part-of: odoo/odoo#103637
2022-10-25 13:03:18 +02:00
Victor Feyens 40683c85f7 [REM] sale: unused field
The price_reduce field is not shown to the users, and was not useful for
business computations because of its digits specification (losing decimal data
when we only want to round the total amounts, not the price before taxes).

This commit removes the field to reduce the table size, remove useless computation,
avoid misuses of the field and clean code.

Task-3018371

closes odoo/odoo#103611

Related: odoo/upgrade#3977
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-20 13:17:55 +02:00
Florian Charlier 7b9d160783 [FIX] crm,(website_)sale: fix kanban card joined contents
Purpose: split words with whitespace, as it's usually done.

Task-3004227

X-original-commit: c86f4c79326d6df78b434e103141bffb826b19db
Part-of: odoo/odoo#103257
2022-10-17 12:13:25 +02:00
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00
Florian Damhaut a90414a842 [ADD] website_sale_subscription: eCommerce for subscription
Remove todo related to website_sale_subscription creation.

task-id : 2826815

closes odoo/odoo#103078

X-original-commit: 390dd83bafac4cd2159112a0f1b7e73a22d90c85
Related: odoo/enterprise#32716
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-10-12 10:34:31 +02:00
Valentin Chevalier 754570b1d8 [REF] payment(_stripe): cleanup express checkout implementation
Fine-tuning of c624ed5603.

task-3004118

closes odoo/odoo#103125

X-original-commit: 158bc7ef9e20c46a5e9870e70d76e866147662b0
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-12 04:35:48 +02:00
Younn Olivier d6bf2c0cbf [FIX] website, *: redirect to the WebsitePreview using ir.actions.client
*: website_forum, website_hr_recruitment, website_sale

Before this commit, most of the backend redirections to the
WebsitePreview, introduced in [1], were using ir.actions.url with the
get_client_action_url util, which was not optimal.

This commit changes that to use a new get_client_action method, which
returns the ir.actions.client record. It will execute the action
directly, avoid to redirect the router before, and improve performances.
Also, it allows to solve bugs, as:
- The back navigation from the WebsitePreview to the ListViews.
Going through the /web controller would add an entry in the history, and
going back on it would reload the client action.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#102991

X-original-commit: 30fb11e479fb7b3db3649e55fcbdb06bfcdb398c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 08:07:46 +02:00
Anna Janiszewska e4f81af515 [IMP] website_sale: create hook for website_sale.product rendering values
closes odoo/odoo#102956

X-original-commit: 7ccb3380becfe7ff5a36f93288935ab3882c4542
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-10 19:55:31 +02:00
Romain Derie 33def9a755 [FIX] website_sale: fix tag mismatch
Commit [1] introduced a mismatch in tags, `<xpath>` is closed with
`</t>`.

[1]: https://github.com/odoo/odoo/commit/85905934c2ad2507cfc6f74428db61ac97a3bc41

closes odoo/odoo#102955

X-original-commit: 0a129f61ce2e3c3c19be16eb547c211f1c81d9de
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-10 19:03:31 +02:00
xO-Txandqsm-odoo 4c2f3389aa [REM] *: remove new content controllers
*: website_event, website_event_sale, website_forum, website_sale,
   website_sale_slides, website_slides, website_slides_forum

This commit removes the remaining controllers that are no longer used
since the use of form views on website new content dialogs (following
the website in backend merge at [1] and the many iterations afterwards).

With the website in backend work, a feature was lost for the creation of
events: dummy tickets were created. This commit actually removes the
feature for good. Events default values are managed by templates.
Moreover there are links in frontend to edit the event when being
allowed to edit it (event groups), notably when there is no ticket in
registration page. So it makes no sense to create dummy tickets, without
price, for 1000 seats. Those values are random so they will have to be
edited. Better let users create real tickets if necessary, than editing
and/or removing dummy tickets.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#102928

X-original-commit: d559ce5d1518ac1293db1c4f52efb8094daf5b49
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-10-10 19:03:15 +02:00
William Braeckman 48b476f337 [FIX] website_sale: fix base_unit_price and pricelists
Prior to this commit the base_unit_price was computed using the price of
the template instead of the list price displayed on the eCommerce, so it
sometimes made no sense when compared to another currency.
It will now be converted properly and use the list_price instead of
template price to compute the base_unit_price.
Some other issues with the base_unit_price display in the form view have
also been fixed (mainly mobile stuff)

TaskId-3006015

closes odoo/odoo#102884

X-original-commit: 7701033a4d480881d9e1d2c3c842150ca8f55aec
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-10 17:11:33 +02:00
Xavier-Do 503ed05029 [IMP] tests: add generic Basecase.start for patch
Using patcher.start() can easily lead to incorrect cleanup.
-> after a copy paste, patcher is working, but stop is forgotten
-> stop is present, but won't be called if something fails during the
test

This commit add an utility `start(patcher)` to always have the add
cleanup.

Using a standard way to start the patcher with an automated addCleanup
should prevent this kind of mistake. This is why this commit also
replaces all valid patch.start() (followed immediately by a addCleanup)

closes odoo/odoo#102873

X-original-commit: 7d5a193d86316965a0908c65cfacfb607dc3f3ad
Related: odoo/enterprise#32618
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-10-10 16:11:01 +02:00
Romain Derie c996f785f1 [FIX] website_sale: restore community ecommerce dashboard
Since [1] the community ecommerce dashboard was not rendered anymore.
This is because a `t-name` was combined with a `t-extend`.
This is unsure why but since `t-extend` is deprecated anyway, we replace
it by `t-inherit`.

Note that for some reason, it was then causing an issue in
website_sale_dashboard which inherit from this website_sale template.
The template would not be found anymore.

Indeed, if the inherit mode is extension, a template has to inherit the
base one of the inherit hierarchy and not the one he wants to inherit..

```xml
<!-- module A -->
<template t-name="A.template"/>
<!-- module B -->
<template t-name="B.template" t-inherit="A.template" t-inherit-mode="extension"/>
<!-- module C -->
<template t-name="C.template" t-inherit="A.template" t-inherit-mode="extension"/>
```

This part is adapted in the enterprise related PR.

[1]: https://github.com/odoo/odoo/commit/dcf79f01b33a4f3ddb7e77480f0a7a8be1cd3794

task-2993773

closes odoo/odoo#102782

X-original-commit: 85905934c2ad2507cfc6f74428db61ac97a3bc41
Related: odoo/enterprise#32578
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-09 19:49:47 +02:00
Benoit Socias cb81b5ef93 [FIX] website, website_sale: repair Plausible dashboard layout
This commit includes several changes in the Plausible dashboard:
- Remove the "Analytics" title.
- Add margins (container-fluid => container).
  This also fixes the country map overflow and the flickering.
- Remove the duplicated scrollbars.
- Use the background colors from within the iframe.
- Hide the date range buttons by default, but show them if website_sale
  is installed.

It also reorders the Reporting menu as follows:
- Analytics
- eCommerce
- Online Sales
- Visitors
- Page Views

task-2993773

X-original-commit: b8c1976e933628182496929d348dda11b5051a0c
Part-of: odoo/odoo#102782
2022-10-09 19:49:47 +02:00
Romain Derie f7ab908abf [FIX] website_sale: land on website in backend when previewing INV or SO
The invoices and sale orders got a button "Preview" to reach their
frontend/website page. One of the goal is to then be able to enter edit
mode and customize it.
But since we merged frontend > backend with [1] (and multiple iterations
since then), landing on the frontend is not a good idea to do that as
you would then need to click on the "Editor" button to go back to the
backend and be able to enter edit mode. Now we reach the iframe preview
directly.

Note: this will be improved in a further update to not require a reload
of the backend when clicking on the button.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

closes odoo/odoo#102787

X-original-commit: 007ae49e9c94061adf34aa9f911c7a9a0e873e0e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-09 15:40:49 +02:00
William Braeckman 461aeca9bb [FIX] website_sale: reorganize menus
TaskId-3010484

closes odoo/odoo#102610

X-original-commit: 603ac8b7ea1cadfce44317baca61f4866833ec97
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-07 14:37:33 +02:00
stefanorigano (SRI) db86a64047 [IMP] web, sale_timesheet: review cp design
task-3005130

Part-of: odoo/odoo#102528
2022-10-07 14:37:00 +02:00
luvi 782a1dd3b9 [REF] website, *: adapt code to save on NewContentModal close
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_slides

This commit adapts the code of website, and modules depending on it, which
overrided the save method of the FormView controller to execute a doAction.

It was no longer possible to wait for the default save action to proceed,
because the default behavior is now to close the dialog, and here we need
to pass another parameter allowing to redirect the website to a newly
created record.

Now, a method is available directly from the NewContentModal, which reduces
the need for the service in form views. The save call pass the right method
to compute the path needed for the redirection once the record has been
created.

closes odoo/odoo#102522

X-original-commit: 916a5bebb3e74047a66503ddc59299540c252831
Related: odoo/enterprise#32448
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-06 23:14:25 +02:00
William Braeckman 09c53d8eee [FIX] website_sale: fix offcanvas bubble
The bubble is showed whenever a filter is activated and/or a price range
is selected in the filters.
However due to float precision the comparison made to check whether
there is a price filter could be wrong when using "weird" numbers.

TaskId-3009210

closes odoo/odoo#102507

X-original-commit: 9359a5b5f0f72550d69671f975da23d4734b490f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-06 22:22:39 +02:00
William Braeckman b42c621438 [IMP] website_sale: add possibility to switch pricelist on mobile
This commit makes it possible again to change pricelist while on mobile
view.

TaskId-3009210

X-original-commit: d3f6dc8d269f82860d8e93482e03462ef66fa37f
Part-of: odoo/odoo#102507
2022-10-06 22:22:38 +02:00