Commit Graph
163215 Commits
Author SHA1 Message Date
Krzysztof Magusiak 9c753b01c9 [FIX] web_editor: append nbsp in text node
In JavaScript, createTextNode() escapes it's contents, so instead of
appending ' ' as text, we should append the character corresponding
to a non-breaking space. Alternative would be to use innerHTML.

odoo-helpdesk ticket 3372476

closes odoo/odoo#125640

X-original-commit: 698a1a0c521635a0f8eb98388966e70740492274
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-20 00:23:53 +02:00
niyasraphy 13f39faccf [FIX] website_{}: show correct placeholder in search bar
before this commit, in the mobile view, in the search bar
of the website users(forum) and events leader board,
the placeholder is shown as Search courses

after this commit, the wrong placeholder will be updated
to Search users in the placeholder as in the normal view.

closes odoo/odoo#125636

X-original-commit: b54f4387812ea20de42e56c22fa90b4a26b6a11e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Hennecart Jérémy (jeh) <jeh@odoo.com>
2023-06-19 23:17:01 +02:00
Martin Trigaux 1da6f82bb9 [I18N] sale_timesheet: remove duplicated entry
closes odoo/odoo#125595

X-original-commit: f6eb3e1033e1376096faf27c00cdba0508c2c19a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-19 23:16:55 +02:00
Akim Juillerat bbb8a53f47 [REF] mrp: Extract preparation of lot values on mrp.production
This allows to customize the values used to created lots and
avoids repeated code in enterprise module.

closes odoo/odoo#124543

X-original-commit: 0820a69a3fec90717ea10bf4c56a5609d6b376e2
Related: odoo/enterprise#42300
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 23:16:50 +02:00
Yash Vaishnav ccbb749cfb [IMP] project: display the deadline in red if the date has passed
In this commit, The date deadline field turns red when the date has passed and
the task has not been closed.

task-2947578

closes odoo/odoo#119771

Related: odoo/enterprise#40341
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 23:16:45 +02:00
Prakash Prajapati cbc2bf6a3a [IMP] project: add invite collaborator button to collaborator list view
This commit includes the addition of an 'Invite Collaborator' button to the
project collaborator list view. When clicked, this button opens the same wizard
as the 'Share Editable' button found on the project.project form view. By using
this wizard, project collaborators can be added to the responsible project.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:45 +02:00
Yash Vaishnav 9df284792c [IMP] project: improve the rating template
In this commit, I have updated the rating request email template by making
grammatical changes and including company information such as phone number,
email, and website and also added a 'Best regards'.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Yash Vaishnav bc90121bfb [IMP] project: set default milestone of the parent task to its subtask
With this commit, the milestone of the parent task will be assigned to
its subtask as default.

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Yash Vaishnav 798f7db3c1 [IMP] sale_timehseet: bring improvements in project invoice notebook
In project.project form view  invoicing notebook > employee/SOL mapping
    - set the project's default Sol
    - selecting existing employees should not be possible
    - allow for on-the-fly employee creation

task-2947578

Part-of: odoo/odoo#119771
2023-06-19 23:16:44 +02:00
Hamza (hisl) 5ce17f327a [FIX] hr_timesheet : update effective_hours for progress_hours computation
Steps to reproduce the issue:

Add a project and create a task with a timesheet in it
set the allocated hours to 00:03
add a line in the timesheet with hours spent 00:03
Current Behaviour:
The percentage calculated would be 96%, even though the time allocated and time spent are equal.

Desired Behaviour:
The percentage should be 100 as both values i.e. time spent and time allocated are equal.

This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.

Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.

OPW-3270858

closes odoo/odoo#125619

X-original-commit: 94dd1d570410c9a994027b7030ee9204ca1ec3e9
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 21:25:55 +02:00
Prakash Prajapati 63d930112c [IMP] (website_), hr_recruitment: improve the recruitment app
In this commit we have made the following changes.
- Add new refuse reasons:
       - Languages issues
       - Role already fulfilled
       - Duplicate
       - Spam
       - Refused by Applicant
- Modify refuse reasons:
       - Refused by Applicant: don't like job
       - Refused by Applicant: better offer
- Clickable job position breadcrumb in website.
- Set default applicant when we create new email template
- Use the `selection_badge` widget in Refuse Reason wizard

task-3336247

closes odoo/odoo#125612

X-original-commit: 94bc52e79e37df6daf9af6cb62efd65d63cbb61e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 21:25:52 +02:00
Prakash Prajapati 1aeb814ae8 [FIX] project, hr_timesheet: move the action_project_timesheet in hr_timesheet module
When the hr_timesheet module is not installed and a customer uses the
  action_project_timesheets action through customization, a traceback will
  occur because he will not get the action of hr_timesheet.

closes odoo/odoo#125600

X-original-commit: cdeeb70ada8364c681c93961c2bd29f1069cebbf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 21:25:50 +02:00
niyasraphy 2a2b13c1d9 [IMP] stock: show cancel state only when cancelled
before this commit, in the stock move and stock
move line form view, the cancelled state is shown
in the second position and in the stock move line
form view, the cancelled state is always visible.

after this commit, the cancelled state will be
moved to last position as in all status bar and
in the cancelled state in move line will be shown
only if the record is in the cancelled state.

closes odoo/odoo#121333

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 20:19:35 +02:00
Thomas Lefebvre (thle) 2eb9c0708f [FIX] website_sale: manage access_point_address with Sendcloud
Steps to reproduce:
-------------------
- install website_sale and delivery_sendcloud module;
- create a shipping method (use Sendcloud provider);
- configure the integration with
"Mondial Relay Point Relais International 1-2kg";
- configure option with shipping rule and use location;
- on website create a new quotation with the pubic user;
- process the checkout;

(Check in backend the shipping weight)

- fill City and Zip Code fields with correct value
(example: Paris | 75011)

(- configure the company's country)

Issue:
------
[1.] If the shipping method is the only one, the locations are not displayed.
[2.] The delivery address is not the address of the chosen location.

Cause:
------
[2.] The method `update_eshop_carrier` is retriggered after update the `access_point_address` field.
The `access_point_address` is reset.

Solution:
---------
[1.] Show the option to choose a location if we only have one delivery method
(we are certain that the options should be displayed).
[2.] Use a parameter in the post request to instruct
not to reset the `access_point_address` field.

opw-3326139

closes odoo/odoo#125647

X-original-commit: 677bff31d3acdd05fff6567b693de78cff256ea2
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-19 19:17:08 +02:00
Tom De Caluwé 7f6924e8fd [FIX] core: allow uppercase characters in translatable fields
Identifiers (including column names) that are not double-quoted are folded to
lowercase in PostgreSQL. Before this commit, this resulted in errors when
updating translations for translatable fields, because the query did not
correctly quote all identifiers.

opw-3287428

closes odoo/odoo#125641

X-original-commit: 70ae8de223fc10f6e80dae06b0f6a6f15c198b5f
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
2023-06-19 19:17:06 +02:00
Hubert Van de Walle (huvw) 9d48733d19 [FIX] account: display journal entries total
Steps to reproduce
==================

- Go to Accounting > Accounting > Journal Entries

The total at the bottom is not displayed and there is a `-` instead.

Cause of the issue
==================

The `amount_total_signed` field uses the currency_field
`company_currency_id`.
It should be present in the view for the web client to be aware of it's
value.

opw-3316448

closes odoo/odoo#125639

X-original-commit: eaec9f7c3c28e2ee9d42597052a21e6b2695cd60
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-19 19:17:03 +02:00
Mahdi Cheikh Rouhou (macr) 0a89e70e5b [FIX] web : translate all content in customer preview
When we go into customer preview of a quotation for example and change the language different than English (to fr_BE for example)
we see that some of the content isn't translated  and still displaying in english.

Steps to reproduce the error :
1-Install sales and website app
2-Create a quotation for a customer and just save it don't confirm it.
3-Go to customer preview
4-Change the language to fr_BE
5-Click on "signer & payer"
6-You can see that it still display 'Full Name' in english and also some other terms

The origin of the problem is that all the parts that were rendered via a t-call gets rendered in english.
I investigated the problem and it turns out that the language code for the _t is alwyas english(https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/portal/static/src/js/portal_signature.js#L45)
The problem is that the user_context.lang is always undefined here (https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/web/static/src/legacy/js/core/session.js#L201)
As a solution I copied the code from 15.0 which was working fine (https://github.com/odoo/odoo/blob/4fa2dbcaf777c23758519ab0feb9707a7592cd6b/addons/web/static/src/legacy/js/core/session.js#L199-L209).

opw-3192666
.

closes odoo/odoo#125638

X-original-commit: 441c94270a4935d2b0b67a9f8201fcba9d15d957
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-06-19 19:17:00 +02:00
Touati Djamel (otd) 640332df35 [FIX] project_mrp: display MO button even if only confirmed or draft MO
Steps to reproduce the bug:
- Install project_mrp
- Create a MO:
    - select any product
    - add an analytic account linked to a project, e.g: “field service”
    - save

- Go to the “field service” project
- click on “project Updates”

Problem:
The manufacturing order view button is not displayed, because we have
no MO in the done status

To display the button, we do a "read_group" on the
"account.analytic.line" related to the "account.analytic" of the project
 in the "Mrp" category.

https://github.com/odoo/odoo/blob/08112964f76816f11ef28d702ae49243f9cb5f91/addons/project_mrp/models/project.py#L42-L46

However, since the "account.analytic.line" records are created only
when the manufacturing order (MO) is in the "done" status, no records
are found, and so the button is not displayed.

opw-3300251

closes odoo/odoo#125620

X-original-commit: ddf49f0416dd398672f5b97af73f2f3d58cdc16f
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 19:16:58 +02:00
Nicolas Bayet faeeea76e9 [FIX] web_editor: set the clientId after creating it
Before this commit, when creating a new record, there is no
`_currentClientId` set in the wysiwyg as there is no collaboration
setup for new records. When the user save the record, there is a call
to `Wysiwyg.resetEditor` but as the
`OdooEditor.collaborationSetClientId` was called before
`Wysiwyg.setupCollaboration`, the `_currentClientId` was not set.

That lead to the `OdooEditor._collabClientId` being undefined, which
lead `OdooEditor.serializeNode` to not serialize the node through the
function `serializeNode`.

So unless the client A reload it's page, if another client (B) open
the same record and synchronize with client A, client A will send it's
history when `get_history_from_snapshot` is triggered but no
`_historySteps` mutations nodes will not be serialized.

So when client B will receive the steps in `historyResetFromSteps`,
the code will crash.

After this commit, the proper order will set the _currentClientId in
time because `collaborationSetClientId` is set after
`setupCollaboration`.

task-3359732

closes odoo/odoo#125599

X-original-commit: 85acd380cab34ca507251c8b232520c76f2a3e58
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-19 16:40:17 +02:00
Jeremy Kersten 5746f4eccc [FIX] website_forum: don't use trailing / in url_for
Since PR https://github.com/odoo/odoo/pull/106109, url_for remove the
trailing / so we need to handle this case from another way

closes odoo/odoo#125598

X-original-commit: 1d04e56013e53320da4eda5335e06a69f2c479e9
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-06-19 16:40:15 +02:00
Maximilien (malb) 832c271197 [FIX] account,l10n_es: Adding company registry
For the l10n_es localisation, we needed to print on the invoice the company id
of the partner we send the invoice to. To do that, I had to add some id to make
the xpath work.

Task-3281337

closes odoo/odoo#125596

X-original-commit: 845b275846e49a923a9e181ad37cee3c691f16d0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-06-19 16:40:09 +02:00
smna-odoo b3baa64adb [FIX] sale: prevent traceback while add new product in sale order line
An error occurs because to convert the amount in sale order line company is
required.

when user remove the company and tries to add a new product in sale order line
error occur.

applying these changes will resolve this issue.

sentry-4090085761

closes odoo/odoo#125575

X-original-commit: c04bc8026eae79c01fb9315d8063b12d3a1e2fa8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Smit Nagar (smna) <smna@odoo.com>
2023-06-19 16:40:07 +02:00
Walid 56227b9049 [FIX] delivery: Backorder shipping cost with invoice policy in real
port of this fix
https://github.com/odoo/odoo/pull/70454

Steps to reproduce the bug:

- Let's consider a delivery carrier DC with invoice policy = 'real'
- Let's consider a consumable product P with a weight = 1kg and sales price = 10€
- Create a sale order SO with 2 P and add DC as shipping cost
- Process the shipment for 1 P and create a backorder
- Process the second shipment with the last P

Bug:

Two lines L1, L2 with DC were created on SO but only L1 as a price unit and a description.
L2 had a price unit = 0€ and no description.

opw-3219711

closes odoo/odoo#125573

X-original-commit: 79dad0a7599584f14e4ab3e96c393983e95aa519
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-19 16:40:04 +02:00
Samuel Degueldre 34bdde7204 [IMP] web: add tests and comments for reactivity utils
The reactivity utils were initially an ad-hoc solution to some problems
that came up when using the reactivity in places that are not
components. As it turned out that these needs are actually quite common,
the utils that were originally duplicated in many modules were moved to
the core utils in web, but there were no tests for these utils, and the
Reactive class was not documented.

This commit adds some tests for the reactivity utils and a docstring
motivating the existence of the Reactive class.

closes odoo/odoo#125549

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-06-19 16:40:01 +02:00
Sébastien Theys 70eb043ccf [FIX] mail: clean chat window thread avatar
Remove uncessary ThreadIcon that only served as spacing, properly add
module icon for chatter records.

closes odoo/odoo#125388

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-19 16:39:56 +02:00
Sébastien Theys 517c206cb5 [REF] mail, im_livechat: move chat window notify to discuss folder
Part of task-3265211

Part-of: odoo/odoo#125388
2023-06-19 16:39:56 +02:00
Sébastien Theys 6f246d7fa2 [REF] mail: move attachment deletable condition to discuss folder
Part of task-3265211

Part-of: odoo/odoo#125388
2023-06-19 16:39:56 +02:00
Sébastien Theys 97259f8076 [REF] mail: remove obsolete chatter channel condition
The chatter is no longer displayed on the channel view.

Part of task-3265211

Part-of: odoo/odoo#125388
2023-06-19 16:39:55 +02:00
luve-odoo 184981b74a [IMP] project : Timesheet UI improvements
- Added the sum of the hours in the project.task tree view for the
"hours spent on sub-tasks" and "total hours" fields.
- Centered vertically the AA warning on the project form -> timesheet
notebook when the AA linked to the project is archived.

TaskId:3251653

closes odoo/odoo#120664

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 16:39:48 +02:00
Astik Singh 4d02421a41 [IMP] project: specify task stage
Prior this commit:
In project when tasks was moved to different stages users will get notify with
emails where there is a field showing assigned_date and deadline.

After this commit:
Instead of those fields it's showing only Stage: Stage name

Task-3285822

closes odoo/odoo#119973

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-19 16:39:43 +02:00
Kamlesh Pathekar 7319f29d83 [IMP] web: make ability to modify archive confirmation
In this commit, we have implemented a dedicated function that enables
the customization of details in the confirmation dialog for the archive action.

task-3277195

closes odoo/odoo#125533

Related: odoo/enterprise#39926
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 16:39:36 +02:00
svs-odoo a072096913 [FIX] mrp: link by-product moves to the BoM
Before this commit, when the MO's BoM is updated, the MO's by-products
are created. These moves have a field, `byproduct_id`, who is supposed
to link the move to the BoM's by-product's line, but this field is
let empty when the move is created.
It's because the field is missing in the MO's form view. This commit had
it (invisible) so moves' `byproduct_id` will be correctly filled.

closes odoo/odoo#110227

Related: odoo/enterprise#35969
Related: odoo/upgrade#4428
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-06-19 16:39:34 +02:00
svs-odoo d7392829c7 [IMP] mrp: update BoM button
The "Update BoM" button action was moved from `mrp_plm` to `mrp` so it
can be displayed if the BoM was updated now. This action can be called
for confirmed MO now.
Each time a change is done on a BoM, all the draft and confirmed MOs
using this BoM will be notified the BoM changed, thanks to a new boolean
field, `bom_has_been_updated`.

An exception however: if the MO is confirmed and the BoM's product was
changed, the MO shouldn't have the "Update BoM" button displayed.
Otherwise, it would change the finished product of a confirmed MO.

Also, it's important to notice than due to a limitation, only changes
done at the BoM level will mark it as modified. That means that
modifying subrecords in their own views (for example, adding steps in a
BoM's operation) will not mark the BoM as updated !

See odoo/enterprise#35969
task-3089368

Part-of: odoo/odoo#110227
2023-06-19 16:39:34 +02:00
svs-odoo e831903612 [IMP] mrp: generate BoM from a MO
In a Manufacturing Order, if the user manufactures a product without any
BoM, they can generate a new BoM who will take the information from the
MO. So, the new BoM will have a BoM line for each MO's component, an
operation for each MO's work order, and the By-Product lines will be
copied too.

task-3089368

Part-of: odoo/odoo#110227
2023-06-19 16:39:33 +02:00
Prakash Prajapati a4c80ebd82 [FIX] project: open the Tasks Analysis and customer rating report in project burger menu
task-3345839

closes odoo/odoo#125551

X-original-commit: e27cb2181a899a6573df0ac6ecb0cf1ba05fd2c2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 15:13:07 +02:00
Maryam Kia f5dd14e8ce [FIX] mail: message sent twice because of the wrong tempId
task #3356870
Before this fix, at the first time of sending message in a chat, the tempId of the message in the chatter, crashes the getting lastMessageId and the first tempId in the chat becomes NaN.

closes odoo/odoo#125424

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-19 13:35:34 +02:00
Samuel Degueldre 81be42d8f9 [FIX] *: ensure tour tips are correctly translated
*: account, crm, crm_iap_mine, event, hr_expense, hr_holidays,
hr_recruitment, lunch, mail, mass_mailing, point_of_sale, project,
purchase, purchase_stock, sale, survey, web, website, website_blog,
website_event, website_forum, website_sale, website_slides,
test_main_flows

In odoo/odoo#111103 the tour system was rewritten. The previous tour
system used to depend on the `root.widget` js module, and this module
was an async module that indirectly depended on `session_bind` which
would load the translations, meaning that the js module definition code
of the tours would only run after the translations were loaded. This is
no longer the case with the new tour system, this means that the module
definition code is executed as soon as the dependencies of that module
are fulfilled, which is generally befoe the translations are loaded,
causing most tour tips to not be translated.

This commit adds a hacky workaround for this problem: it creates a new
module that has a default export which is a promise, and has a legacy
alias, this creates an async module that waits for the translations to
be loaded. This module is then imported for its side-effect in all
onboarding tours, causing them to be translated correctly once again.

This commit also needs to convert the steps key in the tours internal
registry to a getter. In previous versions, the steps were directly
added as is to the internal state of the tour service, but since
odoo/odoo#122834 the steps are now mapped, and without a getter, any
edits to the steps occurring after registration will not be taken into
account. This causes issues in some modules that change original
behaviour of other modules (eg accounting makes invoices into a menu in
the accounting app instead of a top-level app in the home menu) as they
need to edit the steps of existing tours to make them work.

In a separate PR, we will implement a more proper fix by changing the
API of the tour manager so that we no longer need this workaround.

closes odoo/odoo#125284

X-original-commit: d130699ba82dc9919c9116f4b64a5e461ebb6319
Related: odoo/enterprise#42655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-06-19 13:35:28 +02:00
Jorge Pinna Puissant 00cedbad65 [REF] web: Settings, labels search
This commit, removes from the compiler all the code made to collect all
the labels of the setting for the search. Now, the labels are collected
at mounted time, by the setting itself.

This commit prepares and is part of the task that aim to refactor the
relational model and migrate it to owl.

part-of task-id 3179751

closes odoo/odoo#125332

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-06-19 11:58:41 +02:00
aliya fbeee26f15 [IMP] account: rename call_web_service
We added another hook to call the web service after the pdfs were rendered.
It would be clearer if the first hook was renamed to remain consistent.

closes odoo/odoo#125536

Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-19 10:41:06 +02:00
Andrea Grazioso (agr-odoo) f0e0e2ea38 [FIX] account: skip banner on faulty PDF
create a vendor Bill
attach the PDF
go back to list view, select the bill > print Original Bills

Issue: a traceback is raised
Similar to f814c607e5ab7ed6f1e594ec8c602a749fcc775d
In some malformed PDF files zlib is unable to extract the data properly.

opw-3368907

closes odoo/odoo#125501

X-original-commit: 6dd9fee03a50310a4db63e3f263eb43ab808dbc7
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-06-19 10:41:03 +02:00
niyasraphy 69f3f53364 [FIX] payment_mollie: neutralize mollie token
before this commit, on neutralizing the database the
mollie token is not cleared from the payment provider.

after this commit, on neutralizing a database, the
token from mollie payment provider is cleared.

closes odoo/odoo#125482

X-original-commit: dfdd9c3cf563bebd862ac7d06653273abcc09bd9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-06-19 10:41:00 +02:00
Tom De Caluwé b9d6163d68 [FIX] web: handle early option selections in autocomplete
The autocomplete component intercepts certain key presses allowing the end-user
to select an option from the autocomplete dropdown using either the enter or
tab keys. Before this commit those keypresses where only intercepted when the
autcomplete selection list was already completely loaded.

Consider now for example an x2many list where the lines can be selected using
the autocomplete component. To add a line to the list the end-user will usually
type part of the record name and then select it with tab or enter. Three things
can happen:

* The enter keypress is handled after the list of options is fully loaded
* The enter keypress is handled while waiting for the list of options to load
* The enter keypress is handled while still debouncing the input, no request
to load the options has been made so far

The last two cases commonly occur when inputting lines with a barcode scanner
for example. In this case the enter keypress is ignored by the autocomplete
component and is instead handled by the list renderer component. This generally
results in the list renderer trying to create a new line but failing because
of missing required fields in the previous line. This seems more or less
acceptable. However, if required fields are already filled out or not present
in the list view, a new line is created while the current one remains empty.

This behavior is clearly counterintuitive, as such, this commit proposes to
wait for handling tab and enter keypresses while debouncing the input or
loading the list of options.

opw-3235288

closes odoo/odoo#125464

X-original-commit: 7776e89e293045731e077801113d4ff40507b7c1
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-19 10:40:57 +02:00
Tom De Caluwé b73c9c9213 [FIX] account: enable barcode inputs on account move lines field
Use the many2one_barcode widget for the product field in the account.move.line
list view, similar to the sales order and purchase order views.

X-original-commit: c8918e799b23bd4e57a63f354731be78d308b97b
Part-of: odoo/odoo#125464
2023-06-19 10:40:57 +02:00
Florent de Labarre 2855884f8d [FIX] l10n_fr_fec : can be downloaded by unallowed user
By RPC an other user in other company can access to an other fec.

closes odoo/odoo#125435

X-original-commit: 857f2e026dd9e4307adda786e2745aa7cb36a2c3
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-19 10:40:54 +02:00
Bert Stomphorst 6d315aa873 [CLA] bertstomphorst
closes odoo/odoo#125383

X-original-commit: d65f54485ed188a222e7b9617101ff80ab07a93b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-19 10:40:51 +02:00
vlst 1f655ffcc7 [REF] pos*: merge PosStore and PosGlobalState
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, point_of_sale,
pos_adyen, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six, pos_stripe

After the architectural refactor of the PoS App, there are two classes that make sense to merge.
In this refactoring task, we're merging them.

closes odoo/odoo#124477

Task: 3358550
Related: odoo/enterprise#42257
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-19 10:40:43 +02:00
Rohit Kumar eb0934c9b5 [IMP] project: task stage improvement in the project app
This commit removes the tooltip of the `fold` field because
the second part is no longer true and the first part does not
provide any added value.
It also makes `project_ids` field required in the form view of
Task Stage model (`project.task.type`) to force the user to link
his new stage to a project. Otherwise, the stage won't ever be
visible anywhere in the interface. Indeed, stages not holding
tasks are hidden in cross-projects views.

task-3251621

closes odoo/odoo#121154

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 10:40:41 +02:00
luvi b5e52601bc [IMP] web: add currency_field option documentation in monetary field
This commit add the documentation for the currency_field in monetary
field.

closes odoo/odoo#118199

Related: odoo/enterprise#40597
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-06-19 10:40:38 +02:00
fdardenne 71ab15e4d5 [IMP] base: store currency_field in the database
Before this commit, it was not possible to create a custom monetary
field without having currencies named `currency_id` or `x_currency_id`
in the model.

With this commit, we store the currency_field from the Monetary field
in the database. This allows to create custom monetary field with
currencies name we want.

A good use case for this IMP is for Studio, we can now create and edit
monetary field easily without storing it as a `float` in the ORM.

Part-of: odoo/odoo#118199
2023-06-19 10:40:38 +02:00
Bruno Boi debefffd26 [FIX] web: sync reposition for nested poppers
This commit will have nested components making use of
the usePosition hook to synchronize their repositioning.

**Before this commit**
Each component handles its own repositioning logic.
If it is mounted somehow inside another component using that
same logic, conflicts occur in some circumstances.

**After this commit**
It is now ensured that, in case of nested positioned components,
the whole chain of repositioning computations is called in the
proper order: from the parent to the children.

**Example**
- Before
  ![before]
- After
  ![after]

[before]: https://github.com/odoo/odoo/assets/1159815/3c9cfae7-db68-4707-a73c-ad7e2e71d4bf
[after]: https://github.com/odoo/odoo/assets/1159815/a21f56e0-d8e3-48c1-9509-8e6ee5040d4b

closes odoo/odoo#125531

X-original-commit: 9f947ba3fd3a00a0c80efc40186c36e0de78de16
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-19 09:30:58 +02:00