Commit Graph
139433 Commits
Author SHA1 Message Date
Victor Feyens a8366a67da [IMP] website_sale: rely on line info instead of combination
Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 63f0d1cb5a [IMP] sale: harmonize fpos & pricelist request cache
Cache the fiscal position by request the same way it was
done for the pricelist, on the current website record.

Also clean and clarify the pricelist cache at the same time,
making sure invalidations are correctly handled, and that the
whole code relies on the unique logic (& field).

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 07517d79fa [CLN] website_sale: split product_attribute.py
Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens f71cd64567 [FIX] website_sale: correctly update prices according to fiscal position
The prices displayed on the /shop page were not refreshed if the fiscal
position computed for the current partner was modified.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens ab16589d6c [CLN] sale: product_template.py
Remove unused field
Clean code

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 6c940679c9 [REM] product: unused company fallback logic
This method & logic is not used nor necessary anymore with
the multi-company fixes and improvements done in the recent years.
* All requests coming from website are automatically done in the website
company.
* check_company restrictions forbid the use of records from different companies
* multi-company security rules restrict the access to records from the current
company.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens ae7d23ef2e [CLN] website_sale,*: unnecessary pricelist context
There is no need to manually add the pricelist context for ecommerce
flows anymore, it is automatically managed in `_get_contextual_pricelist`
override of website_sale.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 4069158c96 [REF] sale,*: combination_info logic
Clean all code related to _get_combination_info:

* Move logic to website_sale now that backend configurator doesn't
rely on it anymore. Only frontend configurator uses that logic.
* Make sure the returned information is correct and consistent:
  * request must be given the right context (multi-company)
  * behavior is coherent between modules and overrides (date, company, currency, rounding)
* Performance:
  * Avoid loading unnecessary information
  * Avoid calling _get_combination_info when only part of the data is necessary.
  * Clean/simplify uses and overrides by keeping useful information in the combination_info dict (taxes, currency, ...)
* Code cleanup
  * clean imports
  * clean architecture
  * clean templates
  * move old configurator code to website_sale

Now that the product configurator backend side has been redone
completely, the remaining parts previously shared between backend
and frontend configurators can be moved to website_sale because only
used by the frontend configurator.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Bastien Fafchamps (bafa) e1cf7e93c9 [FIX] base_import: unable to select name, external id or db id separatly
Before this commit, when selecting the field to import, the name, external
id and database id could not be selected separatly while they should.

This commit fixes that by comparing the full field path instead of the id
of the fields.

closes odoo/odoo#135482

X-original-commit: 587ee0797bd0075dc7d3a0393ec95360c8ab0770
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-09-14 17:08:02 +00:00
Andrea Grazioso (agr-odoo) e6b353d6df [FIX] sale[_expense]: delivered quantity amplification
Activate analytic accounting
Configure a [TEST] product to create a project on order
Create a SO with [TEST]
Have an expense product [EXP] with reinvoice policy set
Create an expense with [EXP] and set as analytic account the one created
for the SO and another one
Complete the expense flow
Check the SO

Issue: the expense line was added correctly but the quantity delivered
is set to 2

opw-3410712

closes odoo/odoo#135479

X-original-commit: 39f573eebd7af7f026ffdcb4957a47a0f699939f
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-09-14 17:07:59 +00:00
Martin Trigaux fac931cb0c [I18N] l10n_din5008_repair: correct the translation
closes odoo/odoo#135443

Source: Larissa (lman)
X-original-commit: 9b8fb3e0eeb7b3b8411f32984b8626d15529724c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-14 17:07:58 +00:00
Loukas Wets (lowe) 2df6f93882 [FIX] point_of_sale: switch product view
After the bootstrap refactoring introduced in this commit cc349515a4923874067705267bbaa383276556e6.
The switch product view wasn't working anymore. This commit reintroduce
the logic behind the switch product view option.

Task-3500621

closes odoo/odoo#135431

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-14 15:50:18 +00:00
Theo VINCENT (thvi) 41b14f4294 [FIX] pos_self_order, *: pay button visibility
*: pos_online_payment_self_order

Since 605943b5ea, the pay button is not always displayed in the self-order UI after clicking on the "Order" button.

The issue is due to the selected_attributes value received from the server, that can be "false", while the JS code of self-order UI is designed with "{}" as the empty/null value.
When the local order of the self-order UI is updated with the data from the server, the false value was saved instead of the {}, resulting in the line being considered as "modified" according to the isChange method which uses JSON.stringify for comparing changes.

The fix consists in correctly updating the local order selected_attributes value when receiving data from the server.
This commits adds some tests for the pay after meal self-order mode, to check that the pay button is visible.

closes odoo/odoo#133913

Task-id: 3489173
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-14 15:50:17 +00:00
Maximilien (malb) 49d6bdb675 [IMP] hr_expense: expense report
This pr aim to improve the pdf of the expense report. we have changed the design
 of the header of the report, the table and also added an annex with the
 different attachments.

 For the attachments, when it's a pdf it's simply merge to the actual pdf but
 when it's an image we use a new template to display the name of the expense
 link to that image.

closes odoo/odoo#133611

Task: 3443413
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-14 15:50:16 +00:00
Antoine Boonen d415d252ad [IMP] account: Add quick search on an amount in the journal items.
Problem
---------
User want to search on journal items based on the amount. This is doable
through custom searches but that is not user-firendly.

Objective
---------
Add a search based on the amount of an journal item (in credit or in
debit) to make it more user-friendly.

*Secondary objective*: Add a similar search for journal entry amounts.

Solution
---------
Declare a computed field for journal entries that the search will be
based on and add this field in the search view of the journal items.

*Secondary solution*: Add amount_total in the search view of the journal
entries.

task-3439520

closes odoo/odoo#129990

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-14 15:50:15 +00:00
vlst 3a2371333a [IMP] point_of_sale: improve loading of customer display image
The customer display loads very slowly in the RemoteDisplay mode.
This is in big part because of the large size of the bg image.
This image is loaded on every single update of the customer display.

This PR makes it so the bg image is loaded directly from the server,
in order for it to be cached on the customer display, thus improving
considerately the response time.

closes odoo/odoo#124998

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-09-14 15:50:14 +00:00
snd a387e9591e [IMP] stock: rework properties button and kanban view
The properties button has been moved to the contextual action menu.
The kanban view now shows partner locations and internal location directly under a view location

task 3444583

closes odoo/odoo#130509

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-14 12:42:30 +00:00
Florian Charlier 707cb82117 [IMP] survey, mail: notify on participation completed
Allow users to subscribe to being notified when a new participation is
completed on a survey.
As surveys expecting hundreds of participants will not be followed in
such a way, we will only post these messages if there are any followers
on the survey.
We add a check on any subscriber belonging to group_survey_user
to further limit creating messages of which no one can make use.

A test of this feature is included.

Adding a `_sudo` for good measure while we're here, it does
not change anything.

Minor docstring change in `mail.followers` _get_recipient_data`.

Task-3389133

closes odoo/odoo#128922

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-14 12:42:29 +00:00
Alexandre Kühn 7d5442eef1 [FIX] website_livechat:tests: fix chatbot ui tour nightly build fail
Follow-up of https://github.com/odoo/odoo/pull/135378

Commit above fixed a potential issue where guests may eventually have
many livechats, so finding the livechat thread just by
`type: livechat` is not enough. To be more specific, it relies on
livechat session stored in cookie.

However, when there's no livechat session, there's no id stored in
cookie. The livechat thread uses a `TEMPORARY_ID`. Fix above forgot
to handle this part, thus the getter was failing when there's no
persistent livechat session.

closes odoo/odoo#135442

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:58 +00:00
Pedram (PEBR) ced656be06 [FIX] point_of_sale: fix weighing scale
Before this commit, the weighing scale was not working properly. This
was caused by commit 60f41b1f83, which modified the getAddProductOptions
function to return both the quantity and weight, instead of just the
quantity.

The "weight" value returned was not handled in the subsequent
"add_product" call stack, causing the weighing functionality to fail.

This commit fixes the issue by using the quantity value instead of
weight in the relevant code paths. In the point of sale context,
quantity and weight are interchangeable depending on the use case.

This commit fixes the associated tests to check the weight of added
order line.

Related to PR https://github.com/odoo/enterprise/pull/47211

opw-3487707

closes odoo/odoo#135432

X-original-commit: ab88f96de580250d1e8cad7e49833c51bd6749e7
Related: odoo/enterprise#47379
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-14 11:22:56 +00:00
Pierre Paridans 49f649b991 [FIX] web: default DateTimePicker has wrong number of column
Following the introduction of the `showWeekNumbers` prop on
DateTimePicker component (see commit 7552284e78),
the number of column (CSS custom property) wasn't properly defined in
the template.

This commit fixes it and adds related asserts in QUnit tests.

closes odoo/odoo#135427

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-14 11:22:55 +00:00
Florent de Labarre d052fc27af [FIX] account: don't allow unlinking payment method lines used on non-accessible payments
In case of the user have no access to all account.payment, the record can be deleted.

closes odoo/odoo#135415

X-original-commit: 5086b39e44230a14a6c1c65bde4851f062f10e38
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-14 11:22:54 +00:00
Maruan Aguerdouh (magm) 9ad365953f [FIX] web: remove properties from compatible import fields
Steps to reproduce:

- Install Knowledge App
- Create a sub-article and add them as many properties as you want.
- Go to search to get the list view and export the article, adding both
of the properties field (`article_properties`,
`article_properties_definition`).
- Now try to import the file we just exported.

At this moment this issue affects knowledge properties and crm, leads
properties (for reference see: #122817) but the proper fix is still not
applied, and since it's implementation is complicated we are going to
remove the properties from the export when we tick the
"I want to update data (import-compatible export)." until the proper fix
is done.

opw-3346642

closes odoo/odoo#135406

X-original-commit: 16912d7bfa2bc618f2f5cc40f915728fc7e62cb3
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-09-14 11:22:52 +00:00
Thomas Lefebvre (thle) fe301a3d02 [FIX] web: display download button if not dirty
Steps to reproduce:
-------------------
For example:
- add a work permit file to an employee (private information tab);
- try to download it before saving;

Issue:
------
The old file is downloaded or a traceback occurs
if there was no file before.

Cause:
------
When downloading, we use the `/web/content` endpoint.
We will try to read the record in the backend via `_record_to_stream`.
The record is not yet saved in database.

Solution:
---------
Disable download button if record is dirty.

opw-3458842

closes odoo/odoo#135405

X-original-commit: 3557e66a410428b877213508104e9accbbfdaf20
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-14 11:22:52 +00:00
Loukas Wets (lowe) 3a6a7d46de [FIX] pos_self_order: get orders by access token
Prior to this commit the get_orders_by_access_token return always an
empty result. A tour has been added to make sure it won't reproduce again.

Steps To Reproduce:
- Open self order
- Click view menu
- Select a product and "Add to cart"
- Click review and order the product
- Click on My Orders
- There would be no product ordered

closes odoo/odoo#135372

X-original-commit: d1663f991af9ad4ce271c8e86ca51bd934363d96
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
2023-09-14 11:22:51 +00:00
Sébastien Geelen (sge) 639a2b2296 [FIX] web_editor: open DPH in mail template
The Dynamic placeholder was not opening properly in mail template since the wysiwyg OWL conversion.

Fix it and also fix the tour that should have detected this error.
The tour itself was not running properly.

task-3495254

closes odoo/odoo#135275

X-original-commit: df8532cffc74038db0faef36b5f43758e1bbdf43
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-09-14 11:22:50 +00:00
Julien Carion (juca) 72564c58c5 [FIX] web: adjust domain selector width
This commit adjusts the width of the domain selector to fill the entirety
of its parent so that its dimensions are not restricted by the flex
display

closes odoo/odoo#135228

X-original-commit: cae3a05904cc3fa7a2afadbb6f751f619021fd2d
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-09-14 11:22:48 +00:00
Sébastien Theys 7ea370fce7 [REF] mail, *: tests: refactor contains to further remove jQuery
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
    im_livechat, mrp, project, sms, snailmail, test_mail,
    test_mail_full, web, website_livechat, website_slides

Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.

closes odoo/odoo#134652

Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:47 +00:00
Pierre Paridans ed7f4eb7db [IMP] web: remove unused legacy_dialog_mapping
task-3439226

closes odoo/odoo#134258

Related: odoo/enterprise#47349
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-14 11:22:43 +00:00
Chong Wang (cwg) 13957b6281 [FIX] core: support cr.execute_values
psycopg2.extras.execute_values was introduced in PR #101237
however it pypasses the override logic for cr.execute. As a result
1. --log-sql cannot log these queries
2. assertQueryCount cannot notice these queries
...

This commit create a new api cr.execute_values to support the same SQL feature
without losing the override logic for cr.execute

closes odoo/odoo#131190

Related: odoo/enterprise#47374
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-09-14 11:22:42 +00:00
Adrien Widart (awt) 7ed1c1a074 [FIX] mrp: prevent from merging other products' SM
To reproduce the issue:
1. In Settings, enable:
   - Multi-Routes
2. Unarchive the route MTO
3. Create three storable product P1, P2, P3:
   - P2:
     - With route MTO
4. Create and confirm a MO:
   - Product: P1
   - Components:
     - 1 x P2
     - 1 x P3
     - 1 x P3
5. Set the produced/consumed quantities:
   - For P2, set 1.5
6. Mark the MO as done

Error: an error message is displayed: "Record does not exist or has
been deleted."

In `SM._action_done`, we create some extra moves:
https://github.com/odoo/odoo/blob/e029abe649573350e633999e42ab040c57b8fe4e/addons/stock/models/stock_move.py#L1705-L1710
Because of the exceed quantity on the first components line, we
create a new SM (qty 0.5). There is a difference between both SM:
the `procure_method` (MTO for the initial SM, MTS for the new one).
Because of that difference, when confirming the new SM, we don't
provide any `merge_into` (the `else` block):
https://github.com/odoo/odoo/blob/e029abe649573350e633999e42ab040c57b8fe4e/addons/stock/models/stock_move.py#L1684-L1690
Confirming the new SM leads to the `_merge_moves` method. In this
method, because we didn't provide any `merge_into`, we first try to
get some candidates:
https://github.com/odoo/odoo/blob/e029abe649573350e633999e42ab040c57b8fe4e/addons/stock/models/stock_move.py#L866-L868
And at that point, we will provide with all components SMs:
https://github.com/odoo/odoo/blob/e029abe649573350e633999e42ab040c57b8fe4e/addons/mrp/models/stock_move.py#L494-L497
So, we will also provide the two SM of C02. Therefore, the method
will merge these SMs and unlink the second one. Then, back to the
extra moves creation in `SM._action_done`, the for loop will iterate
on the deleted record, hence the error.

OPW-3454899

closes odoo/odoo#135305

X-original-commit: 2674851f66253efea19b86eb9d428dd6e85fa06d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-09-14 09:57:50 +00:00
oco-odoo 3c55228015 [IMP] account: reports: auto-compute filter fields for single-purposed sections
When creating a new report and assigning a root report, the filter fields are recomputed to take the same values as the root report by default. This is done to avoid silly mistakes from the user ; for example, when configuring a tax report, forgetting to set the only_tax_exigible field.

However, nothing similar was done with the sections, and that was very error-prone. Indeed, when a report is created as a section of some other report, and not to be used in any other case, it would be convenient that the report's maker (be it a a developer or a UI user) does not have to care about all the nitty-gritty details of the default values assigned to filters. Taking the same example, what was there before this commit makes it so we could very easily face the situation where a tax report is made with multiple sections for its different annexes, and one of them is missing  a True value in the only_tax_exigible field (spoiler: this mistake happened on some development branch of ours).

To solve that, when we see a report only belongs to one single composite report, and if it's not callable alone (for this, we check the existent of an action opening it directly, or the presence of a root report fot it), then we compute a default value for the filter fields, using the composite report as source.

closes odoo/odoo#135259

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-09-14 08:41:47 +00:00
Anh Thao Pham (pta) 1f26dd8222 [FIX] account: fix recompute of account_id on aml when changing partner
Steps to reproduce:
- Create an invoice
- Select a partner
- Add an invoice line (without a product): a default account will be computed
- Change the account
- Add a second invoice line (with a product)
- Change the account
- Select another partner
The account for the invoice line without a product will be recomputed, while
the account for the invoice line with a product will not.

The computation of the account should happen when the line is added.
If the account has been changed, it should not be recomputed to a default one
when changing the partner.
The behavior for aml without product should be the same than aml with a product.

opw-3474469

closes odoo/odoo#135411

X-original-commit: 2d5b4998e2b1c9111e7997b6174abf41dc2af02d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-09-14 06:44:39 +00:00
Thomas Lefebvre (thle) 497e2296c7 [FIX] hr_holidays: create activity if leave has to be validated
Issue:
------
When a leave is created, a notification is only sent
if a "Time Off Officer" is defined (`responsible_ids`).

However, if we choose the approval option with
the value: "By Employee's Approver",
the leave manager must be notified even if
there is no "Time Off Officer".

Solution:
---------
Give the option of creating notifications in all cases where validation
is required for the leave type.

opw-3412841

closes odoo/odoo#135310

X-original-commit: 1428505b0aaf6a1d3cf778bdb6137bea9ec6283e
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-09-14 05:38:52 +00:00
Saurabh Choraria efe41244b6 [FIX] auth_signup: update log while SignupError occurs
When a user tries to signup in odoo and enters an invalid email address
a logger error occurs which creates noise in sentry.

Error: SignupError('Login must be a valid email address : tme')

The logger is updated to use the 'warning' level instead of the 'error' level.
This change reflects a less severe logging level for cases when SignupError
occurs while signup.

sentry-3933777844

closes odoo/odoo#135343

X-original-commit: b59d0ef1568adc3296534f2dc5542afc02e04b1b
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-09-14 04:42:43 +00:00
Laurent Smet 4e74693384 [FIX] account: Fix typo in variable name
closes odoo/odoo#135401

X-original-commit: 8c3c1b05eb8663c02926beee6c321e37c96d820b
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-09-13 18:42:34 +00:00
Didier (did) 023461cd06 [FIX] mail: fix composer render when switching chatter record
To reproduce this bug:

- Open a record with a chatter
- Open a composer (send message or log note)
- Change record using the pager
- Now, you cannot mention anyone

This is because the chatter component is reused and the `useComponent` hook isn't
refreshed with the new data.
This PR fix the issue by forcing a re-render of the composer when the `threadId`
changes. This refresh the `useComponent` hook used inside the `useSuggestion`
hook.

task-3502720

closes odoo/odoo#135331

X-original-commit: 28dd108294606499799e1fd2a7b24de23730d098
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-13 18:42:32 +00:00
tsm-odoo ed020e9889 [FIX] im_livechat: fix livechat service thread getter
The livechat service thread getter relies on the thread type to find
the current livechat thread. Since guest could have many channels it
is incomplete, the id should also be checked. This PR fixes this issue.

closes odoo/odoo#135378

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-13 17:43:11 +00:00
Maryam Kia de8e25ce6c [FIX] mail: call hasAuthorClickable function since it's not a getter
closes odoo/odoo#135373

X-original-commit: f3d2fc33961a93d186a66f84f53cea8ce0c312b5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-13 17:43:10 +00:00
Antoine (ande) 0a5bfb32d1 [FIX] website_sale: sale ribbon not saving
Current behaviour:
When editing a product, try to add a ribbon,
it will not save.

Steps to reproduce:
1. Go to website
2. Go to Shop
3. Click on Edit (top right)
4. Select any product
5. At Badge: Select Sale
6. (badge is visible)
7. Click on Save
8. (badge is gone)

Cause of the issue:
The element was not considered "dirty"

opw-3487397

closes odoo/odoo#135351

X-original-commit: 5d13fa522e7d06b03a098ada5fa6be15ddc49618
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-09-13 16:39:48 +00:00
tsm-odoo 0c84c4f36d [REV] im_livechat, mail: remove cors from discuss route overrides
This PR removes the livechat's discuss route overrides
that added `cors="*"` since they are not safe (different databases on our
cloud are considered as SameSite).

In the meantime, embed livechats won't work as expected since cors is
prevented and will be fixed in a following PR.

closes odoo/odoo#135260

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-13 16:39:47 +00:00
niyasraphy 4c0d9c0b18 [FIX] l10n_in: remove duplicated function definition
before this commit, _compute_amount_total_words function
is defined twice in account and l10n_in module with a
difference of ',' in the generated amount word

after this commit, _compute_amount_total_words function
from l10n_in module is removed as there is no legal
need in india of having ',' in it

closes odoo/odoo#134892

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-13 16:39:46 +00:00
hmai 573c59cad2 [FIX] web editor: animation triggered on every backspace
This commit fixes the issue of animations that got trigger by backspacing, pressing enter
and other causes

The cause of the issue was a custom historyRevert event that was only used to
trigger a widgets_start_request event which ended up restarting the options,
which lead to the animation option replaying the animation.

We were not able to pinpoint the use of this particular trigger_up as it does
not seem to serve any purpose anymore. Since its presence does create a bug, we
decided that the best course of action was to remove it. If this commit creates
a regression and the original bug comes back, we will reassess the situation.

Task-2752421

closes odoo/odoo#135332

X-original-commit: cef24b89405205ee0484555209e59a8599d9deb2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-13 15:34:42 +00:00
FrancoisGe 2ee329f6ca [FIX] web: close button in form view dialog discard
The goal of this commit is to ensure that the form view dialog close
button performs the same behaviour as the discard button.

To enable this, we had to add the dialogData.dismiss, which lets you add
a callBack that will only be executed when a dialog is closed because of
the "x" or the "escape" shortcut.

closes odoo/odoo#135116

Related: odoo/enterprise#47283
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-13 15:34:40 +00:00
stefanorigano (SRI) 9aa16f4072 [FIX] web: o_search_panel margins
Slightly increase the component size and adapt its margin/padding in
order to accommodate more text.

Also, this commit addresses an issue that made [1] necessary.
Indeed `o_cursor_pointer` has been replaced by `cursor-pointer` in
commit [2], but the change wasn't applied on `o_search_panel`.

[1] https://github.com/odoo/odoo/commit/223b9e9
[2] https://github.com/odoo/odoo/commit/bd2a111

part of task-3326263
task-3476147

closes odoo/odoo#134817

X-original-commit: 4e82f72b481f69cde546bc6acfe22582b64b6bad
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-13 15:34:38 +00:00
Romeo Fragomeli 49aa4dcf30 [IMP] web: add target=download act_url action
This commit adds `target=download`, as `target=self` adds some unwanted
visual effect. In other words, the "block UI" is never unblocked when
some actions are triggered. This is specific for "Download" actions as
the download is correctly executed, but the page is never `unload`.
e.g.:
```python
action = {
    'type': 'ir.actions.act_url',
    'url': '/web_enterprise/partner/%d/vcard' % record.id,
    'target': 'self',
}
```

Note:
We can't use "'target': 'new'" as it creates a bug in Mobile Apps.
When The Mobile Apps create a new "Tab/Page", they do it in a new
sandboxed browsing environment, so the user isn't logged in and the
resource isn't accessible anymore.

Task ID: 3435131

closes odoo/odoo#134436

X-original-commit: 08db3deb3336f0c1ff9fe2703ebeb8ea5b5aeb3d
Related: odoo/documentation#5822
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-13 15:34:37 +00:00
Julien Carion (juca) 830206e894 [IMP] web: notification close delay improvement
This commit adds the functionality to refresh notifications when the user
hovers on them to reinitialize the close delay.

task-3444667

closes odoo/odoo#132713

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-09-13 15:34:33 +00:00
Julien Carion (juca) ace86c47ed [IMP] web, mail: command palette improvements
This commit applies several modifications to the command palette:
- The list of menus for the current app is now hidden in the command
palette
- The assign user commands of the palette are now available in list
view when multi-edit is supported and a mechanism to avoid command
duplication has been implemented so that if several fields use the same
command, it will be displayed with an identifier in the palette and the
commands won't overlap
- The assign/unassign to me command is now split into assign to me and
unassign from me. The presence of the commands depends on whether they
would have an effect or not
- The "View switcher" command category is moved to second last position
of the command categories

task-3235223

closes odoo/odoo#129743

Related: odoo/enterprise#44620
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-09-13 15:34:31 +00:00
vlst 0d008f094c [IMP] point_of_sale, pos_adyen: Introduce WebSocket Communication
After a customer has paid via an Adyen terminal, the Adyen server sends
a request containing the payment confirmation to the webhook on the odoo
server.

At the moment, the pos frontend continuously polls the backend in order
to find out whether or not the confirmation from Adyen arrived.

This pattern is wasteful and over complicated.

In this PR I replace the polling logic with websockets communication.

closes odoo/odoo#125593

Task: 3342693
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-13 15:34:29 +00:00
Julien Banken 95e6d0199b [FIX] web_editor: video selector component adjustments for Knowledge
This commit will apply the following changes:
1. Introduce a new `VideoIframe` component for the `VideoSelector`
   component. With that change, one can easily mock the `VideoIframe`
   component in a tour and replace the iframe of the video with
   alternative content. It will then be possible to test the whole video
   integration flow with a tour without relying on Third-Party services.
2. Enhance the Python video parser to include the video id and the video
   parameters of the url being parsed. These new information will be
   used for the new video behavior of Knowledge.
3. Call the callback function notifying that the video url has changed
   when the textarea is emptied (see: `selectMedia`).
4. Authorize non-internal users to call the /web_editor/video_url/data
   route. This will ensure that portal users will be able to integrate
   videos in their Knowledge articles.
5. Apply some minor UI and UX adjustments:
   - The label next to the toggle buttons will now be properly aligned.
   - The textarea to input the video url will be automatically focused.

task-3297215

closes odoo/odoo#127452

Related: odoo/enterprise#40683
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
2023-09-13 15:34:27 +00:00