Commit Graph
165829 Commits
Author SHA1 Message Date
Thibault Delavallée 85f76cd077 [IMP] mass_mailing: ease unsubscribe page edition for mailing users
PURPOSE

Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.

SPECIFICATIONS

Ease unsubscribe page preview and edition. 'unsubscribe_from_list' generic
unsubscribe link now redirects to '/mailing/my' page, allowing to see what
an unsubscription page looks like. Empty sections are also added to ease
editor usage.

No real unsubscription preview can be done from 'unsubscribe_from_list' link
displayed in a mailing body as the mailing could not exist when clicking on it.
Moreover it would require custom code to redirect from this generic link to
the real unsubscription page, for few real added value.

Tweak access to allow mailing users to access a mailing given its non-protected
'mailing/<id>/unsubscribe' link. It is not linked to any backend document
(like specific document mailed, ...) but allows to display the page, edit
it, ...

Tweak 'mailing/<id>/view' to allow to generate the non-protected unsubscribe
link. It allows a mailing user to "view" a mailing, then click on "unsubscribe"
and land on the unsubscribe page, without having to deal with document_id
and tokens.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée c0775de8d0 [IMP] mass_mailing: add unsubscribe headers in mailing emails
PURPOSE

Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.

SPECIFICATIONS

Add unsubscribe headers to email sent by mass mailings. As emails are already
parsed to change the generic 'unsubscribe_from_list' link to an email-specific
link we can add the List-Unsubscribe header at the same time. Add header for
post 'List-Unsubscribe=One-Click' to avoid one-click unsubscribe when readers
crawl email links.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée b4d7eda6e0 [REF] mass_mailing: improve feedback, add reasons
PURPOSE

Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.

SPECIFICATIONS

Messages and notes are improved to have a better wording and links to contextual
records when possible (mailing, mailed records, contacts, ...).

Add opt out reasons when updating subscriptions or block list status. This
allows to better report on common causes.

For that purpose we introduce a new model allowing to store those reasons.
A boolean flag allow to trigger the usage of the feedback textarea in portal
page.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée b897571b9f [REF] mass_mailing: rename subscription model
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

In this commit we rename ``mailing.contact.subscription`` model into the
shorter ``mailing.subscription``. This is sufficient to explain the model
purpose. As we plan to add an opt-out model this also allows to have sub
models with suffixes without being too long.

We also rename ``subscription_list_ids`` field on contact model to
``subscription_ids`` as this is shorter and clearer.

Finally the ``mailing_contact_list_rel`` table name that comes from old
implementations (simple m2m table) is renamed to ``mailing_subscription``
to match the model name.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée d27797dd9b [REF] mass_mailing: add a 'my' page to handle subscriptions
PURPOSE

Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.

SPECIFICATIONS

Currently mailing portal is usable only through dedicated links added in
mailings. Those use a hash token based on mailing, document_id (if mailing
ran on business documents) and email of the recipient. However this is not
convenient, especially for users that want to update their subscriptions
manually.

Purpose of this commit is to add a generic page in mass mailing allowing
to manage subscriptions to mailing lists as well as blocklist status directly
from portal. That way people don't need to come from a given email mailing
link.

A new page is added. It is located on ``mailing/my`` and has the same
capabilities as the unsubscribe pages, except it works outside of a given
mailing contact. Page (html, js) and behavior are shared among the various
use cases.

This page is available for logged user, both internal and share. Other people
should come through existing unsubscribe links using email, document id and
hash token.

Access control is updated so that it is now possible to use mailing routes
without requiring always email / document_id / hash_token. User can be used
instead.

A tour is added allowing to test this new feature.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée 8019a605c7 [REF] mass_mailing: update route parameters
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

Rename route parameters to be more clear about their usage. Notably res_id
is better labelled document_id, token is a hash_token, ...

Update legacy to still support old routes.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée be3c92d805 [REF] mass_mailing: improve portal subscription management page
PURPOSE

Globally improve usability and features given by mailing portal about exclusion
list and opt-out management.

SPECIFICATIONS

Purpose of this commit is to cleanup and improve the portal subscription page
that allows to manage subscription to mailing lists and blacklist status.

Main features updated or added

  * allow to give a feedback when unsubscribing from mailing not related to
    mailing lists. It was previously limited to mailings done on mailing lists.
    Now the feedback is allowed in all cases and posts it on the related
    document;
  * clean display of opt-in and opt-out lists;
  * display all public lists, even if not already join. This allows to opt-in
    to new lists, which was not possible before;
  * switch on a neutral name for non public lists (as they may contain
    marketing hints);
  * give UI feedback to customer when using buttons: add confirmation of
    block list addition / removal, of updated subscriptions, ...
  * globally improve wording;

Unsubscribe from a document now uses the same layout as unsubscribe from
mailing lists. Indeed the first one blacklists the email while the second
one opt-outs from mailing lists. But overall form is the same and options
are also the same. After all previous cleaning we can now keep a single
page for everything.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée 11e813d7f3 [REF] mass_mailing: cleanup subscriptions update (optin / optout from lists)
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

Purpose of this commit is to cleanup code that manages chosen lists from
portal and updates opt-in and opt-out accordingly.

Code is now located on mailing list model. When opting-it, new subscriptions
have to be created for mailing lists so that email is part of the list. When
opting-out we just have to toggle the opt_out flag on subscription model.

Logged messages are also improved. We log on contact model the updated
mailing lists for opt-in or opt-out.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée 32e3917b35 [REF] mass_mailing: rewrite subscription management JS
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

Purpose of this commit is to get rid of old declarative javascript used in
mass mailing. It is still using old fashioned JS, not using widget or any
standard way of doing JS-based behavior in Odoo.

In this commit we introduce a main widget that manages the subscription page.
It has 3 sub widgets to manage parts of its features

  * blocklist management: add or remove current email from exclusion list.
    Adding an email in exclusion list is doable only if activated in settings;
  * feedback: allow user to give their feedback. It currently logs on target
    model, based on a hardcoded search on 'email_normalized' field. This is
    strange as not all models have a normalized email field, but who am I
    to judge anyway ?
  * subscription management: allow to opt-in and opt-out from mailing lists;

This commit mainly keeps the current behavior, just rewrites the JS part.
Some further feature or UI update will move into sub-widgets in subsequent
commits.

Some Markup issues are also fixed in this commit, as code is already updated.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée f6aea2b047 [MOV] mass_mailing: split main unsubscribe controller
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

Main portal controller of mass mailing is currently the unsubscribe controller.
This controller has two main behavior:

  * one is used when un-subscribing from a mailing based on mailing lists
    (opt-out from lists);
  * one is used when un-subscribing from a mailing based on documents (like
    registrations or applicants). This one directly sets emails in exclusion
    list;

Better split it into two sub methods so that it is easier to understand and
modify in future commits.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée c559eef741 [REF] mass_mailing: cleanup controller access code
PURPOSE

Overall cleaning of subscription and exclusion management code from portal.
This code comes mainly from v12 and can now benefit from cleaning and update.

SPECIFICATIONS

Purpose of this commit is to better organize controllers about access control.
First do access control in a clean check method, then have business code. We
also use more frontend oriented errors like BadRequest or Unauthorized.

A main tool method now correctly raises depending on given input. Controllers
have the responsibility to let it raise, return a keyword of even skip error
if the flow allows it. If something is wrong, simply raise (http) or return
(json) generic errors in main cases to avoid leaking information.

Task-2669037 (Mass Mailing: Refactor js/portal for subscription)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée 786c2c9e3c [IMP] mass_mailing: improve contact order
Use name instead of email, as contact is notably used in sms marketing
application with mainly phone numbers. Better use the name as primary
ordering field. Then use ID to avoid non deterministic behavior.

This requires to fix some tests in 'test_mass_mailing' so that they
use test models instead of existing models. That way they are not
dependent on existing data and existing models definition anymore. An
issue with ordering rose as we modified the ordering of contact model.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Thibault Delavallée a2872cb981 [IMP] mass_mailing: add tests for unsubscribe mailing portal
Purpose of this test is to add tours and tests about the portal in mass mailing
that allows to unsubscribe from mailing list and to use the exclusion list.

This is done using small tours called from unit tests. Two type of tours are
added. The first one targets mailing done on mailing lists. As it targets
contact model unsubscription click opts-out the contact from the mailing
list. The second one targets mailing done on other documents. When clicking
on unsubscription link the document's primary email is directly added into
the exclusion list.

Some other additional tests are added to cover various use cases and features
of mailing controllers.

Task-2150462 (Mass Mailing: Improve subscription management)

Part-of: odoo/odoo#86084
2023-10-06 06:13:53 +00:00
Habib (ayh) c855bee515 [IMP] account: enable index scan on AML
The corresponding enterprise PR enables sorting account move lines on the bank recon by matching amount.
Unfortunately there is a significant performance impact when enabling this ORDER BY (~300 ms -> ~2600 ms tested on a large db)

In order to optimise the above, we slightly modify the domains used so that the existing index `account_move_line__unreconciled_index` is used.
This is not yet tested on a large DB (due to the index change), however observations on a populated database indicate an improvement:
without index: 80ms
with index: 30ms

closes odoo/odoo#135155

Related: odoo/enterprise#45816
Related: odoo/upgrade#5146
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-06 05:10:21 +00:00
Aaron Bohy 42ee5c346c [FIX] web: debug menu: can get view
Since commit [1], there was a crash when the user clicked on the
"Get View" item in the debug menu (in any views). This was because
the arch now received by the views in props is an XmlDocument,
whereas before it was a string.

[1] odoo/odoo@cc3a3a328d

closes odoo/odoo#137668

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-06 03:21:50 +00:00
Géry Debongnie 601eb8f144 [REF] web: remove use of internal variable
In a previous commit, we temporarily used the `__OWL__DEVTOOLS__`
global variable to access the list of all apps. This was obviously not
something that we want to do, so we introduced a proper hook in Owl.

This commit changes the code to use the static apps object from the App
class.

closes odoo/odoo#137661

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-06 02:17:40 +00:00
Bruno Boi 5557853f4b [FIX] web: keep the searchbar dropdown in place
**Before this commit**
Open the SearchBarMenu dropdown, then add
numerous filters or groupbys.
When doing so the search bar may grow or shrink,
leading to the dropdown being repositioned while
you interact with it.
This gets really annoying when you are using your
mouse.

**After this commit**
The dropdown will stay in place while your
pointer is inside and get repositioned as
soon as your pointer leaves the dropdown.

**Implementation Notes**
- The usePosition hook now returns an object with functions
  that allow to lock/unlock the positioning updates.
- The "fixedPosition" usePosition's option has become
  obsolete with this new mechanism and has thus been replaced.

closes odoo/odoo#137449

X-original-commit: 3e883a2a1af07875efd7dea8de39cf9914d2a0de
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-10-06 00:55:54 +00:00
Bruno Boi 0c0a0d02a4 [FIX] web_tour: hide on tour pointer scroll
**Before**
When the scroller tour pointer is clicked,
it scrolls fine but if the mouse cursor is left
inside the pointer element, its position is
not updated until you leave it.

**After**
When the scroller tour pointer is clicked,
it directly goes away as soon as the scroll starts.

X-original-commit: 6d0d085a158777076bb58821b2fc83d020fe9b53
Part-of: odoo/odoo#137449
2023-10-06 00:55:54 +00:00
Lopes Marc (loma) 936f0d7914 [IMP] survey: improve results page
Purpose
=======

Improve the overall look of the page for screen and print media.
Display/hide questions, and alternate between pagination and full
display of user responses.

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

= HEADER AND OVERVIEW =

- remove waste space between Edit Survey button and survey title
- remove trophy cup or any icon on the right of the title
- put filters on the right of the title
- remove background
- replace the `Results overview pie chart` by the survey KPI's
- add a print button

= QUESTIONS =

- add a button for each question to toggle their visibility
- avoid breaking question into multiple lines, use all space available
- change info badges design so they are not mistaken for buttons
- remove question type from the info badges

= USER RESPONSES =

- add a `show all` button per question to display all responses,
whitout pager and scrollbar.
- for each response, push the filter icon to right side of the row
- use regular font and color for responses, remove response text from
the anchor tag

= PRINT MODE =

- hide the `webeditor/ back to backend` button
- visible questions: display all responses (no pagination or scrollbar)
- user responses: hide filter icons
- make sure elements like tables are properly cut between pages
- resize graphs to ensure they fit into A4 paper page

task-3424235

closes odoo/odoo#135683

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-05 18:35:30 +00:00
Zelong Lin 69fe16d42d [IMP] mail: make mentions in chatter full composer
Before this commit, it was not possible to send messages in
full composer containing user mentions. Even whe the mentions were
added in the small composer and then continuing composing the message
in the full composer.

With this commit, we can now make user and channel mentions in the
full composer, by typing `@` and `#` like in the small composer of
Discuss.

When composing a message in small composer and then switching to full
composer, the mentions are preserved.

task-3470060

closes odoo/odoo#132701

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-05 16:49:04 +00:00
Odoo's Mergebot f0b7838f95 [MOV] event_barcode: merge into event
This PR moves event_barcode module from enterprise to community. It is
now integrated directly with the base 'event' module. Using it is optional
and activated directly from settings, instead of having to install a
new module.

This PR also allows organizers to use QR codes without needing a barcode.

Some improvements are made in registration flow, notably improving barcode
display and usage in checkout process and outgoing emails.

Task-3411827 (Move event barcode to community)
Task-3470321 (Improve registration flow)

closes odoo/odoo#135153

Related: odoo/enterprise#45598
Related: odoo/upgrade#5183
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-05 16:49:01 +00:00
dane@odoo.com a98717b0e5 [IMP] event: refactor barcode
Commit is responsible for refactoring
code related to barcode.

Part-of: odoo/odoo#135153
2023-10-05 16:49:01 +00:00
dane@odoo.com a653d22aeb [IMP] event: hide barcode
When barcode/QR code isn't available '123456789' placeholder
is inserted which might be misleading. The change makes sure
to show barcode/QR code only when they are available.

task-3411827

Part-of: odoo/odoo#135153
2023-10-05 16:49:01 +00:00
dane@odoo.com 9476597594 [IMP] event: Event registration config
Add QR code on top left corner of the confirmation mail.
It also modifies confirmation page
by showing phone number of organizer and contact mail.

Part-of: odoo/odoo#135153
2023-10-05 16:49:01 +00:00
dane@odoo.com 0e9a9aff46 [MOV] event_barcode: integrate into community event module
event_barcode is moved to community and integrated directly into
event module

task-3411827

Part-of: odoo/odoo#135153
2023-10-05 16:49:01 +00:00
Pierre Pulinckx (pipu) 99730d7ae4 [FIX] web: fix color property in calendar status
Problem : From the sales order, if we go to the calendar view, it shows
status like "sales order", "quotation",... when we check the style in
the console, span style has nonsensical values for
background-color and border-color.
Ex : style="background-color:state; border-color:state;"

Correction : The styles are already applied by
t-att-class="getFilterColor(filter)"
used on the div.o_calendar_filter_item.
Then the utilisation of t-att-style is no more useful.

taskId : 3512867

closes odoo/odoo#137656

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-10-05 15:36:27 +00:00
Touati Djamel (otd) 6af53f5f48 [FIX] purchase_requisition: convert purchase price to current currency
Bug introduced in:
https://github.com/odoo/odoo/pull/128327/commits/8f96e08985ebac3309745f1036a5e83d287e6382

Steps to reproduce the bug:
- Activate 2 currencies (assume EUR and USD, conversion
   rate: 0.65 EUR = 1 USD)
- Create new product “P1”:
    - Purchase tab:
        - add two vendors:
- Vendor_USD, currency = USD, price = 100
- Vendor_EUR, currency = EUR, price = 80
 - Create PO:
    - vendor = vendor_EUR
    - Currency = Eur
    - Add P1, Unit price should be 80

- Alternative tab > Create alternative > Vendor = Vendor_EUR
- Compare product lines Issue: The line with price = 100 USD is
 highlighted as being the cheapest option, but if we apply conversion
 rules, 80 EUR = 123,07 USD > 100 USD.

Solution:
Before selecting the cheapest line, we convert the prices of the
purchase order lines that are in a currency other than the current
currency of the company.

opw-3378253

closes odoo/odoo#137642

X-original-commit: c45272828ee85bc23dd97dc93dc741f8f59a5305
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-10-05 15:36:26 +00:00
Gabriel de Paula Felix (gdpf) a0d4c62108 [FIX] google_calendar: do not spam while updating recurrent events
Before this task, lots of mails were sent after updating or deleting recurrent event in 'All events' or 'This and future events' update type. This was happening because updating these recurrent events was triggering patch calls event by event, when they should be handled in batch.

After this commit, updating or deleting recurrent events should trigger at most two mails for Google users.

closes odoo/odoo#137607

Task-id: 3163695
X-original-commit: ad2106babda61446bce13283d570dc723418b630
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-10-05 15:36:25 +00:00
Julien Alardot (jual) 11a0f8fab7 [FIX] hr_expense: Fix currency_rate handling
The desired flow of currency rate in expense is as followed:
- (default) Use Odoo currency rate
- Allow the user to set a custom rate (to include fees) when changing
  the total amount in company currency
- Revert to the default behaviour when the currency is changed
  or the amount in foreign currency is changed

This aims to fix how currency rate is computed and overridden
- Reorganize all currency rate computation, so it doesn't revert to Odoo rate
  at every compute call
- Deals with a bug where a "total_amount_currency", when changed
  just before calling "action_submit_expenses" would not trigger
  the computation of unit_amount
- Force save when changing currency on expense form view to prevent a bug
  where the first modification of "total_amount_company" would be canceled
  (due to the new behaviour of currency rate computation)
- Removes unit_amount_display from views as it should be removed
  in later versions and is deprecated since 16.0

task-3476569

closes odoo/odoo#137598

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-05 15:36:24 +00:00
Julien Alardot (jual) 471d8301b5 [IMP] project_sale_expense: change bad tests flows
Previous test flow:
 - Re-invoice a multi-currency expense with a product having a cost
   with a "unit_amount" override

Expected test flow:
  - Re-invoice a multi-currency expense with a product having no cost
    and a "total_amount" override

In the past it was feasible (but wrong) in the back-end to set a product
with price in a multi-currency expense.
Setting an expense amount through the unit_amount is also not reflecting
the actual flow

task-3476569

Part-of: odoo/odoo#137598
2023-10-05 15:36:24 +00:00
Brieuc-brd cfd1eb439d [FIX] web_editor: display read-only handles
Prior to this commit, read-only handles were hidden, which created a
layout issue (eg. the header was no longer highlighted when we clicked
on it).

This commit adapts read-only handles to make them visible by using a
border around the selected element.
It also adapts the common borders of all handles to place it
inside the element to avoid being partially hidden when the element is
on the edge of the container (eg. the header or the footer).

task-3537616

closes odoo/odoo#137569

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-05 15:36:23 +00:00
Brieuc-brdandqsm-odoo c16428cf39 [FIX] web_editor, website: adapt dropzone transparency
Since the introduction of the new dropzone design at [1], the dropzones
were not transparent enough anymore and the inline content behind them
was not readable.

This commit adapts the layout of dropzones to make the content behind
them more readable.

[1]: https://github.com/odoo/odoo/commit/8ca644252e2d3a1f836735454c1f936529a7914e

task-3537616

Part-of: odoo/odoo#137569
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-05 15:36:22 +00:00
Romain Derie 58607d1cf7 [REV] pos_self_order, product, website_sale: add product info popup
This reverts commit 3b9401c354.

It shouldn't have been merged in the first place. The PR was `r-` but it
seems like the mergebot bugged and still merged it because there was an
occurence of `r+` in the sentence which asked robodoo to `r-`.

> robodoo r- just to be sure, since there was a random r+ not [...]

Rationale of the revert:
- Bad field name:
  - "ecommerce" in product module
  - "ecommerce" but used in POS
- Arguably very low value to share the field -> This field is used in
  ecommerce to add info exactly between the price and the name of a
  product. There is low chance that you want to share that exact
  information with the POS.
- Technically, it couldn't work. What you design in website builder on
  the product page is related to website assets JS and CSS, which are
  not loaded neither in the backend and neither in the POS.
  It was leading to multiple critical issues, mainly:
  - Losing the whole style of the content (CSS)
  - Breaking completly the snippets (visually and design wise) (CSS/JS)
  - Not even show (JS is in charge of showing the content eg)

Note that the same issues were already existing in that field in the
backend (it's shown in the product form view). The ecommerce team was
looking for a solution to make it work, but it's impossible as to work,
it would need the website / frontend assets, which can't be loaded in
the backend / POS.

The cancel of this PR was validated with PO of POS and ecommerce
following those explanation, which they weren't aware of.

Apart from this revert, further PR will be done to:
1. Remove the field from the product form view (ecommerce app)
2. Create a new field for POS

Revert of https://github.com/odoo/odoo/pull/136906

task-3524272

closes odoo/odoo#137514

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-05 15:36:21 +00:00
Michael (mcm) 89693faebb [FIX] web: fix http.post array params
Since [1] an error was thrown when giving multiple files to http.post.
This commit reverts changes in the function but the function now also
allows to give a FormData instead of pojo.

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

closes odoo/odoo#137421

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-05 15:36:19 +00:00
Didier (did) e3d68312fa [IMP] mail: improve escape key usage in discuss app
This PR introduce multiple usage of the escape key:

- Channel selector can now be closed using the escape key
- Using the escape key will focus the composer automatically

Task-3456518

closes odoo/odoo#135031

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-05 13:37:50 +00:00
rupa-odoo a1949ca541 [IMP] hr_holidays: improve reports ux
Before this commit if we go to the Time off and go to reporting in that select
the to employee  there are graph , calendar, pivot views and there are two
default filter active employee , Employee > Type .

And After that when we go to  to type there are list, pivot view  and by default
there are 4 filter to the list view of the to type and in list view there is
button.

Improvements :

To Employee :
Add the List view and make it default.
And make Current year by  default.

To Type :
Add the graph view and make it default.
Made changes in the filter add Time off, Allocations in that filter.
Remove that button and use action method to the record.

task-3389174

closes odoo/odoo#127034

Related: odoo/upgrade#4907
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-10-05 11:42:43 +00:00
tsm-odoo ae6f6e3e5b [IMP] im_livechat: improve livechat statistics
task-3471332

closes odoo/odoo#137548

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-10-05 10:21:56 +00:00
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Lucas Lefèvre (lul) b86ab422a1 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/c46de914 [REL] 16.5.0-alpha.9
https://github.com/odoo/o-spreadsheet/commit/1438e657 [FIX] side panels: fix link button style Task: /
https://github.com/odoo/o-spreadsheet/commit/f66c9ab4 [FIX] components: fix some button styles Task: /
https://github.com/odoo/o-spreadsheet/commit/62718580 [IMP] CF: reorder preview list with drag and drop Task: 3504521
https://github.com/odoo/o-spreadsheet/commit/d214df23 [REF] CF: split side panel into multiple components Task: 3504521
https://github.com/odoo/o-spreadsheet/commit/f954de50 [IMP] PieChart: percentage visualization for tooltip
https://github.com/odoo/o-spreadsheet/commit/6bc519e0 [IMP] SidePanel: remove unused css rule
https://github.com/odoo/o-spreadsheet/commit/6b9927b6 [MOV] side panel: rename `SidePanelErrors` to `ValidationMessages`
https://github.com/odoo/o-spreadsheet/commit/adcda849 [IMP] grid: add specific # of rows at the end of sheet
https://github.com/odoo/o-spreadsheet/commit/c8289169 [FIX] sheetview: performance issue for too many rows/cols Task: /
https://github.com/odoo/o-spreadsheet/commit/36d3a47e [IMP] spreadsheet: Add Data Validation feature Task: 3422042
https://github.com/odoo/o-spreadsheet/commit/d701460b [REF] filter: create GridCellIcon component Task: 3422042
https://github.com/odoo/o-spreadsheet/commit/953ad1d2 [MOV] error_tooltip: add dedicated test file Task: 3422042
https://github.com/odoo/o-spreadsheet/commit/d61cbee2 [IMP] edition: add CANCEL_EDITION command Task: 3422042
https://github.com/odoo/o-spreadsheet/commit/aad55661 [FIX] Find & Replace: Clear search debounce at unmount Task: /
https://github.com/odoo/o-spreadsheet/commit/f91bf8b6 [IMP] SelectionInput: remove useless ternary expression Task: /
https://github.com/odoo/o-spreadsheet/commit/a5be6827 [IMP] SelectionInput: add missing release on selectionProcessor Task: /
https://github.com/odoo/o-spreadsheet/commit/f94eed58 [FIX] filters: hide sort buttons in readonly mode Task: 3475613
https://github.com/odoo/o-spreadsheet/commit/02436b16 [FIX] locale: string dates in CF aren't (un)localized Task: 3481670
https://github.com/odoo/o-spreadsheet/commit/f7b9b9a5 [FIX] clipboard: cut/paste filter table in another sheet Task: 3498592
https://github.com/odoo/o-spreadsheet/commit/0c8782bd [IMP] EventStream: Observers register only once Task: 3142006
https://github.com/odoo/o-spreadsheet/commit/e008fe2b [FIX] test: undeterministic test in spreadsheet.test.ts
https://github.com/odoo/o-spreadsheet/commit/f2cd5abf [REV] find & replace: shorten the debounce on find search Task: 3510813
https://github.com/odoo/o-spreadsheet/commit/549142d4 [FIX] Find&Replace: purge duplicated handler Task: /

closes odoo/odoo#137440

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-05 08:08:59 +00:00
Damien Bouvy ae62a08cbc [IMP] web: fetch raw data for record in debug
This commit introduces a new debug menu item in form view that allows to
read all the raw fields data of the current record in JSON format.

task-3509462

closes odoo/odoo#137260

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-05 08:08:58 +00:00
Joren Van Onder 9444a3e0c4 [FIX] account: auto-install account_avatax in Canada not Brazil
Small issue in 7032917771. account_avatax supports the US and
Canada. l10n_br_avatax supports Brazil.

closes odoo/odoo#136893

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-10-05 08:08:57 +00:00
Sanket Brahmbhatt d615c5bfaa [FIX] base_import: prevent trackback while upload unidentified image URL
This issue occurs when a customer imports or uploads a file, and that file
 contains an image that is attached to the URL as text or HTML. then,
 The error would be generated.

  Step to Produce:-
 - import CSV file (Ex.'product.product' model)
    > that CSV file must have one URL Image(In that URL has content of text or
      Html form)
 - Click On the 'Test' Button.

  Applying these changes will resolve this issue.

  sentry:-4046190590

closes odoo/odoo#137611

X-original-commit: acbb5af7ee96cdc579850427bc2bca6d7bf184e4
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-10-05 05:16:52 +00:00
Walid 3f8a891eac [FIX] l10n_it_stock_ddt: report language
Steps to reproduce:
- Set up an Italian language company with Italian localisation.
- Set up an English language customer.
- Set up an Italian language supplier.
- Set up a product with dropshipping options.
- Set up a sales order for the product to be dropshipped direct
 from the Italian supplier to the English customer.
- Print the DDT report.

Bug:
The report will be printed in Italian.

Fix:
same as delivery slip reuse _get_report_lang

opw-3526633

closes odoo/odoo#137638

X-original-commit: 10283d926f8e4d542ca0ae8b0d25710e650c9574
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-04 20:52:49 +00:00
clesgow f2f8ff6c99 [FIX] mrp: fold the MO after a replenishment
Steps to reproduce:
- Create a two-layers Bill of Material (BoM and child BoM).
- Create a Manufacturing Order with the top-level BoM and open the
Overview.
- Click 'Unfold', then hit the 'Replenish' button on the component.
- Select 'Manufacture' as preferred route and confirm.

Issue:
The newly created Manufacturing Order is correctly added in the report
but already unfolded, which can greatly change the visibility of the
report if it has lots of components.
This is due to an `undefined` value in the ComponentsBlock fold indexes
as they were not updated after the new props update.

closes odoo/odoo#137613

X-original-commit: 9dc2425dc69c1797cb85ecd794019ea44c541334
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-10-04 20:52:48 +00:00
Claire Bretton (clbr) 3a18482f63 [FIX] account: is_being_sent banner is displayed on error
When sending a single invoice, if an error was raised in the middle of the
process we wrongly displayed the banner "This invoice is being sent
in the background".

task-id:3515915

closes odoo/odoo#137571

X-original-commit: 844f9b672b91c50affd783253b2b8ee4b816cef7
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-10-04 20:52:45 +00:00
Arnold Moyaux b761a873f0 [FIX] stock: align widget inline for availability
On stock.move, the icon next to the reservation to open the forecast view is
not align with the text.

closes odoo/odoo#137560

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-10-04 20:52:44 +00:00
Saurabh Choraria 2cf99aa452 [FIX] web: groupby date for pivot view
When user tries to apply any Group By as date or datetime in the pivot
view and the column value of pivot view is also a date or dateime, the
traceback will be generated.

To reproduce the issue:
- Install Point of Sale
- Go to 'Reporting' and click on 'Orders'
- Select pivot view
- Go to Group By and select 'Order Date' same as column value
- Issue can be produce in the same way in other modules, such as - 'sale',
'sale_subscription', 'crm', 'planning', 'hr_expense' etc.

Error: TypeError: can only concatenate str (not "relativedelta") to str

The issue is occurring because we are getting duplicate values in
groupby like ['date:month', 'date:month'] while calling orm method over here -
https://github.com/odoo/odoo/blob/6cf3b617d8082df5820283d07e6623b7684cefdd/addons/web/static/src/core/orm_service.js#L143

To solve this issue groupby has been passed into a Set so that no
duplicate values occurs in groupby.

sentry-4262719543

closes odoo/odoo#137550

X-original-commit: de8e6a901b780d8c10484edae5ec1fe6b9fc7d3c
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-10-04 20:52:42 +00:00
Alexandre Kühn 6ffea84866 [FIX] mail: make call invitation work from recent discuss model REF
Discuss model data that had commands have been simplified by [1].
Notably some `unlink` were replaced by `False` and or `DELETE`.

Some code in Discuss calls was still expecting receiving command data
in of `DELETE` while data received has become `false`. As a result,
the state of ringing threads and showing call invitation card was not
working.

This commit fixes the issue by relying on recent improvements that
commands can be passed immediately as data to relational fields [2].

Code in Discuss call still have some coupling between fields whenever
some records are either added to or removed from a field. Hooks
`onAdd` and `onDelete` on relational fields are added to support
these cases.

[1]: https://github.com/odoo/odoo/pull/136308
[2]: https://github.com/odoo/odoo/pull/137341

closes odoo/odoo#137540

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-04 20:52:41 +00:00
tsm-odoo 3abc5100ad [FIX] im_livechat: clean session even when leave rpc fails
Before this PR, if an error occurred when leaving the session,
the state of the livechat was not properly reset. This is an
issue since this could lead to a visitor being stuck with an
outdated session. This commit ensures the session state is reset
even if an error occurs during the session leave rpc.

This PR also fixes an issue where two `init_messaging` rpc were
sent when restoring a live chat session.

closes odoo/odoo#137518

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-04 20:52:40 +00:00
Mathieu Walravens c46ed8af92 [FIX] stock_account: correct accounts for dropship return
Before this commit:
When returning a dropshipping, the valuation layers created do not have
the correct accounts on it:
 - Valuation -> Input   for the first SVL
 - Output -> Valuation  for the second SVL

After this commit:
For a dropshipped move, valuation layers have the following chain
of accounts:
 - Input -> Valuation   for the first SVL
 - Valuation -> Output  for the second SVL
Therefore, the return should have it reversed:
 - Output -> Valuation  for the first SVL
 - Valuation -> Input   for the second SVL

Steps to reproduce:
1. Create a dropship product with automated inventory valuation
2. Create a Sales Order, go on the PO and confirm it
3. Set quantities and validate dropshipping
4. Return delivered product (dropship return)

opw-3391174

closes odoo/odoo#137497

X-original-commit: 3e2421982c229af44aa0f46dfd91bcff3fd729a0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walravens Mathieu (wama) <wama@odoo.com>
2023-10-04 19:40:26 +00:00