Commit Graph
164380 Commits
Author SHA1 Message Date
Paul Morelle 13ba60e358 [FIX] mail: debounce updateBusSubscription
Before this commit, when updateBusSubscription was called, it was
postponed to the next event cycle by its first line `await`.
This was needed to avoid registering too many times when adding a large
set of channels: we waited for all channels to be added by the for loop
before actually calling the function.

However, this registered one event per function call. The first one did
the job, and all the subsequent ones did nothing, apart consuming CPU
(sorting the ids and JSONifying them cost memory and CPU).

On Chrome-based browsers, this resulted in a freeze of the rendering if
the number of channels became large (e.g. 600).

With this commit, we make updateBusSubscription a debounced function,
with no delay so that the function gets executed at the next event cycle
like before.
However, the difference is that the debouncing doesn't create a new
postponed call for each call: the function will only get executed once
after the current event cycle, no matter how many times it was called.

closes odoo/odoo#127598

X-original-commit: 2a5c78679875414dcfad7692b660a9c19047485b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-06 20:55:52 +02:00
Alexandre Kühn d6dddb9518 [FIX] mail: do not open server-synced chat windows in mobile
Before this commit, when there were some chat windows open
in desktop, mobile device were displaying the chat windows
at page load.

This was even buggy, because the chat windows are mounted in
a folded state, and it shows only the header of chat window.
The content behind the chat window is visible but we cannot
interact unless the chat window is closed.

This commit makes a few changes to fix the issue:
- Folded state of chat windows is ignored in mobile: the chat
  window is fully displayed in mobile even when in "folded" state.
- At page load, server data from chat window state are ignored
  in mobile
- Messaging menu in mobile should not display content below:
  dropdown in mobile had some margin which displayed some content
  below. Fix is to have `m-0`.
- Chat Windows are displayed on top of Messaging Menu in mobile.
  In desktop it makes sense it's the other way, because messaging
  menu can be toggled when there's a chat window. But it's not
  clickable in mobile, and it acts as the previous screen to open
  a chat window.

closes odoo/odoo#127597

X-original-commit: 791924d6d1d0e5aff6d9e84844626ac5863c2a88
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-06 20:55:49 +02:00
Chrysanthe (chgo) dbc6467cfa [FIX] web: fix list view alignment issues
=== ISSUE ===

If you open a list view and group item by, the caret at the beginning of
the row is not aligned.

=== AFTER ===

We had a `align-items-center` class on the container to make sure items
are centered vertically.

task-3398704
part of task-3326263

closes odoo/odoo#127595

X-original-commit: 920cfa51aad26b71884fb0187264a0f65ea4edd0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 19:46:37 +02:00
pedrambiria 46f21183c9 [FIX] point_of_sale: correctly compute the cash_register_balance_end
Before this commit, 'last_session' inaccurately returned the newest
session, which was incorrect as the first session technically has no
preceding session. This update ensures that `last_session` does not
return any session when it is the first instance.

Also, the computation for the `cash_register_total_entry_encoding`
when the session is closed was incorrect, and it did sum the cash
difference which led to incorrect computation.

opw-3302489

closes odoo/odoo#127572

X-original-commit: cbda861f3c2a2b39490b7148bcbba28f42f66285
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-07-06 19:46:35 +02:00
Thomas Lefebvre (thle) c5e6ed536b [FIX] project: add default description with quick create
Steps to reproduce:
-------------------
- to be in debug mode;
- add a description in an existing task;
- go to Set Defaults in the debug mode;
- add a default description;
- add project id as a condition;
- go to the kanban view of the project;
- create a task;

Issue:
------
Default description is not present.

Cause:
------
The description must be added as a parameter
to the onchange in order to be set to the default value.
The fields passed as parameters are the view's active fields.
Active fields are found during  parsing
of the `quick_create_task_form` view arch.
Unfortunately, the latter does not contain the `description` field.

Solution:
---------
Add `description` field to be detected as an active field
of the quick create view.

opw-3381088

closes odoo/odoo#127571

X-original-commit: 0c391e045743128f6d5050204ccd5e18794ca793
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-07-06 19:46:26 +02:00
Alexandre Kühn 3097fa0217 [FIX] mail: quickly mark as read message in inbox
Before this commit, to mark a message as read in Inbox
of Discuss app, we had to click on "More" option and
then select "Mark as Read".

Considering this is a frequently used option in Inbox,
it'd best to have it easily accessible like "Reply".

This commit shows "Mark as Read" as a quick option of
message when in inbox. As to keep at most 3 quick options,
the "Add a reaction" option has been moved to the "More"
menu when in inbox.

Note that Emoji picker requires an anchor, and items in Dropdown
are components therefore they cannot have `t-ref`. To solve this
issue, there's an invisible `<span>` in the quick option list
that is used as anchor for the emoji picker when used from
the "More options".

Task-3412306

closes odoo/odoo#127570

X-original-commit: b9c8fe1759f03952a42c9bee117e718eab3fef08
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-07-06 19:46:24 +02:00
Alexandre Kühn b2f935efb5 [FIX] mail: make message actions float in mailboxes on mobile
Before this commit, message actions were floating on top-right
corner only in chat windows. In mobile, most threads are shown
in a (fullscreen) chat windows. Some exceptions are mailboxes
and chatters in an Odoo view.

As a result, lots of horizontal space is wasted for this action,
so that messages take only half of the screen width.

This commit fixes the issue by using floating visual of message
action list when in chat window or in mobile. That way, when the
width of thread is small, then messages take most of the container
width thanks to actions being in floated layout.

Task-3411797

closes odoo/odoo#127569

X-original-commit: fb100f848388d6e50029a81080e051c77cc057c2
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-07-06 19:46:21 +02:00
Antoine (anso) 4611781220 [FIX] web: settings title position
Prior this commit, the "Settings" title was displayed before
`.o_cp_buttons` when it should be displayed after

This commit also adapts the position of `.o_dirty_warning` so it goes
after the title and can benefits from `.o_control_panel_breadcrumbs`'s
`.align-items-center`

part of task-3326263

closes odoo/odoo#127568

X-original-commit: 169031b8302f935265a36607b0f14c9b5d5ff722
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 17:52:46 +02:00
Lucas Lefèvre (lul) 6ea05e844a [IMP] web: evaluate domain with user context
Currently, the domain editor dialog doesn't handle domains like
[('foo', '=', uid)] if you don't provide the (user) context in the
component props.

Since this kind of domain is expected to work everywhere, the component
now uses the user context by default to evaluate the domain.
There's no need to provide the context everytime the component is used.

closes odoo/odoo#127565

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-06 17:52:43 +02:00
Lucas Lefèvre (lul) b0fdb2b429 [REF] web: factorize makeDialogTestEnv helper
With this commit, the many identical implementation of
`makeDialogTestEnv` are removed in favor of a single
helper function.

Part-of: odoo/odoo#127565
2023-07-06 17:52:43 +02:00
Lucas Lefèvre (lul) 82ec77def7 [FIX] web: display contextual values in readonly domain
The domain component in readonly mode doesn't display dynamic/contextual
values.
For a domain `[('foo', '=', uid)]` the component displays "foo =" instead
of "foo = uid"

Part-of: odoo/odoo#127565
2023-07-06 17:52:42 +02:00
shsa-odoo bbc0b10778 [FIX] web_editor: emojipicker must be grouped together with widgets
Before this commit:

EmojiPicker was in separate group as widget.

After this commit:

EmojiPicker should be grouped together.

task-3414175

closes odoo/odoo#127561

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2023-07-06 17:52:39 +02:00
Chrysanthe (chgo) e7da69913d [FIX] web: missing gap between listview btn
=== ISSUE ===

If you navigate to MRP and open a work center, there is a missing gap
between the `back` and `login` buttons.

=== AFTER ===

We add a `gap-1` class to the container to make sure these buttons are
correctly spaced

task-3398605
part of task-3326263

closes odoo/odoo#127558

X-original-commit: 76d54c260504ad53df6b2890552e78526abbf704
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 17:52:33 +02:00
Brieuc-brd 04bd2fdef1 [FIX] sale_stock: availability popover
Prior to this commit, the layout of the availability popover was broken.
This commit fixes this issue.

task-3397905
Par of task-3326263

closes odoo/odoo#127557

X-original-commit: 9db9a9b1a08e5d1358fafc423f3ecb93bf08c07d
Related: odoo/enterprise#43727
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 17:52:31 +02:00
Elisabeth Dickinson 7f205c23d7 [FIX] project, mrp, website_slides: improve status buttons layout
Related to commit 45b9e04.
This commit fixes the overflowing status buttons in the MRP module's
Workcenter view. It also adapts the font-size of one of the status
buttons texts in website_slides by wrapping it inside the usual
structure: .o_stat_info > .o_stat_text`.
The same fixes were done for project, stock and sale_timesheet

task-3326558
part of task-3326263

closes odoo/odoo#127555

X-original-commit: odoo/odoo@f0b3806
Related: odoo/enterprise#43726
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 17:52:25 +02:00
Theo VINCENT (thvi) ef05b6ef55 [FIX] pos_restaurant: fix tips after payment flow
- Fixes tips ticket printing when there are tips after payment.
 - Makes the ReceiptScreen opened after TipScreen, to show the receipt screen even when there is a tip added after payment.

closes odoo/odoo#127548

Task-id: 3394214
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-06 17:52:19 +02:00
Alexandre Kühn d3f31ca584 [FIX] mail: enable canned responses in all non-channel threads
This commit reverts partially https://github.com/odoo/odoo/pull/116388

Intent of commit above was to solve a UX issue when user wanted
to send a message containing an emoji at the end, by using an
emoticon.
For example, user expects to type `:)` then `Enter` to post a message
with happy smiley, but instead it adds the 1st canned response
matching search term `)`.
The solution of commit was to enable canned response only in livechat
and in helpdesk.

However, canned responses are more popular than we thought, and they
are even used in other apps like Project. The users of Project either
use canned responses a lot or never. So it's not a good option to
simply disable canned responses in this app.

This commit make canned responses available in all threads except
`discuss.channel` that are not livechat. In other words, canned
responses are specifically disabled in
- Public discuss channels
- Direct Messages chats
- Group chats

We think that conflicting features canned responses and emoticons
happen mostly in chats.
- Livechat needs canned response so there's still this clash, but
  canned response have a lot of value so it's fine for emoticon to
  be slightly harder to use.
- Public channels, group chats, and DM chats have no use for canned
  responses, therefore disabling canned response makes sense!

closes odoo/odoo#127522

X-original-commit: afdaa5e20e878d01d437d9a23a27cf4685c80448
Related: odoo/enterprise#43713
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-06 17:52:14 +02:00
Michele 6c81d1fe60 [REF] point_of_sale: extract method to allow overriding gs1 action
This commit extracts a method called `_parseElementsFromGS1` to allow
customizations of interpreting the parsed gs1 barcode. It also returns
`customProductOptions` which serves as override for the product options
when adding a product to the order.

closes odoo/odoo#127477

X-original-commit: 4c9b8e6c7e465f152fdd64a18cf8ca0d4b00e27b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-06 17:52:12 +02:00
Gabriel de Paula Felix (gdpf) 8e4c37eadb [FIX] calendar: promise error clicking in 'More Options'
Every flow working alright now with overlay discarded.

closes odoo/odoo#126962

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-06 17:52:03 +02:00
Alexandre Kühn 7f0e372e34 [IMP] mail: edit message comment in chatter
Before this commit, only logged notes could be edited in chatter.

With this commit, messages sent with "Send message" are also
editable.

Task-3380465

closes odoo/odoo#125939

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-06 17:52:01 +02:00
Maximilien (malb) ea7e0a16ab [IMP] l10n_dk,l10n_eu_oss: add tax + oss
Following the new accounting act of 2023 in Danemark, by checking the list of
taxes we saw that one particular tax was missing and for the other either they
can be associated to existing ones or have minor uses and so no need to add them

Also, we added a mapping for OSS to map in the section "Category B (Not to be
reported for EU sales without VAT)"

I have also changed some name where the translation were a bit shaky.

closes odoo/odoo#125720

Task: 3334595
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-06 17:51:58 +02:00
Victor Feyens 40cc4a7b1a [FIX] sale: do not quick_create sales orders
closes odoo/odoo#127343

X-original-commit: 29c535069d1eee123b844aa89f8f3b43d3a7af71
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-06 16:23:59 +02:00
Victor Feyens 1682deacc5 [FIX] product: archived product without attributes
Steps to reproduce:
1. Create a product "My Test Product" (no attribute)
2. Create a quotation, select the "My Test Product" product and confirm the sale order
3. Go back to product and add an attribute "Size" with values "L", "XL"
4. Create another quotation, select the ""My Test Product" product => crash

We consider archived combination of attributes as forbidden combination in
the configurator, but when the archived product doesn't have any attribute,
the `archived_combination` was an empty list, which wasn't supported well
by the product configurator logic (client-side).

To quickly fix this issue, we can simply stop sending empty archived combination
(i.e. when the archived product had no attributes).

opw-3410383

closes odoo/odoo#127335

X-original-commit: ca1ac1a115fe06a0a2d2de0fb131a58019f73631
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-06 16:23:56 +02:00
Elisabeth Dickinson 6eb921c06c [FIX] calendar: add space between buttons
This commit adds a space between the "send" buttons in the Meeting's
form `view_calendar_event_form`. It also removes the `sm-2` class that
seems to be a typing mistake.

task-3326568
part of task-3326263

closes odoo/odoo#127200

X-original-commit: 675f45e046c794cf8e72e3a703c3487cb56839ee
Related: odoo/enterprise#43578
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-06 15:03:46 +02:00
Elisabeth Dickinson c35615a44f [FIX] web: fix calendar's header misalignment
Prior to this commit, in day and week view, the calendar's header was
misaligned due to the "week number" cell not having a left padding like
the cells below it.

`.fc-widget-header` resets the padding on the`.fc-axis` elements in the
header, thus making the header cells equal to their "day" cells below,
but the "week number" cell should have been an exception.
Adding the missing padding on `.fc-week-number` realigns all the headers
with their respective cells.

task-3326634
part of task-3326263

X-original-commit: 24547b3fb1db572bf358ff2e5a87bc76fb46c169
Part-of: odoo/odoo#127200
2023-07-06 15:03:45 +02:00
Archana Vaghasiya e3fd75015c [FIX] google_account: accessing the url without any post data
When a user tries to access the URL directly, at that time the value of
dictionary `kw` is not available. The error will be generated.

Error : KeyError: 'state'

This commit will prevent the traceback.

sentry-3947033806

closes odoo/odoo#127162

X-original-commit: a05c8732440257eef31767b579793f3e5eb8a141
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-07-06 15:03:42 +02:00
Astik Singh 200ccf1b10 [FIX] mail: prevent from modifying subtypes
Prior this commit:
In mail subtype, any users could have perform modification on it.

After this commit:
Now user have only access to read and only admin can do all the modifications.

Task-3245940

closes odoo/odoo#127539

X-original-commit: 1b99f9b6608793612dda72007a4ca2258373a97f
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-07-06 13:39:52 +02:00
David (dafr) 087bedb804 [FIX] stock_account: valuation layer is zero when twice return dropshipping
To reproduce:
1. Create a Sales Order for a product whose product category is set to
   FIFO and automated. Use route "dropship".
2. Confirm the PO created.
3. Deliver the products (DS transfer)
5. Return, for example, 1 unit of product
6. Return the return

This is a continuation of commit f9a1c1d7bb8234eb96c48dddae9930a419bfb696
If the origin of the move is a dropshipped_returned, then the error describe in the mentioned commit will still happen.

opw-3283436

closes odoo/odoo#127403

X-original-commit: b7a91e3682aad7ecc1a4a8a42b2d6368573ba906
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
2023-07-06 13:39:41 +02:00
Thanh Dodeur fcfe6f5906 [FIX] mail: fixes button overflow of the chat window call buttons
Before this commit, the fixed margin between buttons wouldn't leave
enough room for all the buttons to fit in one row in the chat window.

This commit fixes this issue by using the flex space-between instead of
fixed margins.

closes odoo/odoo#127424

X-original-commit: c5a121729d5348ff81ef9bb8f58611c9234ef9f9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-06 01:52:43 +02:00
Alexandre Kühn 73db32a17f [FIX] mail: send message on archived chatter
Follow-up of https://github.com/odoo/odoo/pull/120002

Commit above made a a structural change of code that
should not have changed the functional behaviour of
chatter.

In consideration of reducing query count footprint,
it replaced a `browse().exists()` by `search()`, as
`exists()` always perform a query whereas `search()`
may rely on cache and skip a query.

However, `search()` filters archived records, so this
change unintentionally removed the possibility to send
messages on archived chatter. Also the performance of
`search()` and `browse().exists()` are pretty much the
same, so the premise of changing it to `search()` seems
wrong.

This commit reverts this part so that this is the exact
same behaviour as before.

closes odoo/odoo#127518

X-original-commit: 43227ad2eaaeba3f6e3e6fae8b84728e0c33c59a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-06 00:27:43 +02:00
Nasreddin Boulif (bon) de0a473d55 [FIX] sms: keep sms format when sending mass sms
Steps to reproduce the bug:

  - Install mass_mailing_sms module (for test purpose)
  - Go to Contacts and open list view
  - Select a contact and click on "Actions -> Send SMS Text Message"
  - Write a message on multiple lines and click on "Send Now"
  - Open partner form view

Issue:

  The message is not displayed on multiple lines in the chatter.

Cause:

  The message is converted to plain text while should be converted to
  HTML for logging.

Solution:

  Convert the message to HTML (like it is done when sending not in mass)

opw-3301577

closes odoo/odoo#127497

X-original-commit: 11503de934e272d1df615f1a79acd1b96954bbd3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-07-05 21:51:48 +02:00
Romain Derie 577cfc9e7f [IMP] website: make the test not rely on .pot
Before this commit, the "click on save" in french step was checking for
the element containing the "Save" french translation term, which is
coming from Transifex.
It sometimes changes, making the tour fail.
It was "Sauver", then "Sauvegarder" and now "Enregistrer".

This was a well known issue as we already made a quick and dirty fix for
that with [1].
It was judged enough as we did not want to spend more time on this fix
as it was expected to not break anytime soon, and we needed a quick fix.

The chance is now taken to adapt the test to not rely anymore on the
.pot file.

We also take the chance to not use an existant translation but a fake
one as it will speed up the test (no need to actually read/parse .po
files are there is none for this lang).

[1]: https://github.com/odoo/odoo/commit/594ac2c9651f27cc1623fcd5b916cb191241651b

runbot-22946
runbot-22945

closes odoo/odoo#127493

X-original-commit: 6d9d4d1b43544ae98cc8037ba01c81b66ab9f0ee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-05 18:47:01 +02:00
John Laterre (jol) 2950c449de [FIX] account: remove constraint when printing original bills
This constraint did not exist prior to version 16.0 and was
added here : https://github.com/odoo/odoo/commit/7c4e591d58dd2b882f0c237d52490b2756c94203

But this feature is used by fiduciaries for printing customer
invoices, which is why we are removing it here.

No task, internal feedback.

closes odoo/odoo#127490

X-original-commit: d54bae78db25dc62687e3afc64f8699dfbfd5cf8
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-05 18:46:58 +02:00
Raphael Collet 910456b397 [FIX] account: onchange2() for account.move
closes odoo/odoo#127400

Related: odoo/enterprise#43681
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-07-05 18:46:50 +02:00
Raphael Collet 92e5c7b160 [FIX] web: make onchange2() use new() with initial values
This enables an override of new() to do what is needed to make onchanges
on account.payment work as expected.

Part-of: odoo/odoo#127400
2023-07-05 18:46:50 +02:00
Raphael Collet f7cbaca473 [FIX] base, account: avoid messing up with implementation of Form
Part-of: odoo/odoo#127400
2023-07-05 18:46:50 +02:00
Raphael Collet b33452cd57 [IMP] tests: simplify implementation of Form
- simplify initialization of form._values (don't fill in with False)
- use UpdateDict for form._values (more consistent with x2many values)
- better/simpler API for getting save/onchange/all values
- don't reparse subview in O2MForm (already done by toplevel Form)
- guarantee that one2many fields always have an edition view
- add assignment on many2many fields
- add __getitem__/__setitem__ to access/assign fields with dynamic name

Part-of: odoo/odoo#127400
2023-07-05 18:46:49 +02:00
Alexandre Kühn e228acb081 [REV] mail: debounce suggestion (and channel selector) searches
This reverts odoo#126869.

Motivation for debounce was to reduce the amount of RPCs, to
not put too much load on server.

However, this makes showing of mention slower than it should,
and the load on server is already adjusted based on duration
of ongoing `fetchSuggestion` RPC: if server can reply with mentions
immediately, then no need to debounce. If the RPC is slow, then
next `fetchSuggestion` waits for current RPC to finish before
making a new fetch.

This PR also fixes this small crash when using mentions:

```
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at cleanTerm (format.js:244:1) (/mail/static/src/utils/format.js:244)
```

Steps to reproduce:
- type `@` then `backspace` then `@` then `backspace`, etc.

This happened because suggestion hook internal state had `term` being undefined when there is no term, but `undefined` is invalid for `cleanTerm`. `""` is a better default for no search term, and since this is a string this works with `cleanTerm`.

closes odoo/odoo#127399

Related: odoo/enterprise#43678
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-05 18:46:42 +02:00
Walid a1deba1186 [FIX] mrp: keep reserved tracked products on Backorders
Steps to reproduce:
- Create a subcontracted product with components tracked by lots
- make a PO for 35 the product and send components from multiple lots
- login as subcontractor on the portal
- record uncomplete production and change the default consumed lots

Bug:
split production ignores the done quantities on the initial move
on the Backorders components are considered to be consumed in the
default order

Fix:
Consume components on the initial move as indicated by the user
reserve the remaining components for the Backorders as usual

opw-3186773

closes odoo/odoo#127467

X-original-commit: c39256ba6df257ee79fb66eab61617f5fec166b9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-05 17:34:13 +02:00
Lucas Lefèvre 1a71f8cff7 [REF] spreadsheet: remove useless match attribute
`isMatched` is always true, so it have little/no purpose and we can
remove this attribute.

closes odoo/odoo#127279

Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
2023-07-05 17:34:10 +02:00
Lucas Lefèvre dffaf2b78f [REF] spreadsheet: find odoo functions with iterator helper
Part-of: odoo/odoo#127279
2023-07-05 17:34:10 +02:00
Lucas Lefèvre 647c6663f9 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/b04cf78c2 [REL] 16.4.0-alpha.7
https://github.com/odoo/o-spreadsheet/commit/37e6ebed5 [IMP] helpers: add ast iteration helper Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/c44431ffa [IMP] TopBarComposer: allow selection in readonly mode Task: 3378521
https://github.com/odoo/o-spreadsheet/commit/44063ddaf [ADD] functions: add TRUE and FALSE boolean functions Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/62a93f842 [REF] tokenizer: decouple tokenizer from functions Task: 3360232
https://github.com/odoo/o-spreadsheet/commit/153a50d23 [IMP] xlsx: import images

Part-of: odoo/odoo#127279
2023-07-05 17:34:09 +02:00
roen-odoo a79dfeda98 [FIX] point_of_sale : use correct account for pos order reversal
Current behavior:
When you try to invoice an order that was made in a different pos
session, a reversed payment is created and then the invoice is created.
But the reversed payment was using a different journal than the one
used to create the order, which is not correct.

Steps to reproduce:
- Open a PoS session
- Make an order and pay it with the customer account
- Close the session
- Open a new session
- Go to the orders list and show the paid orders, you should see the
  order you made in the previous session.
- Click on it and click on the invoice button
- Go to the accounting app and check the entries created for the
  invoice, you should see a reversed payment entry that uses a
  different account than the one used to create the order payment.

opw-3249116

closes odoo/odoo#127064

X-original-commit: a646baf6901f88434543cb34397c98f1d5c294c4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-05 17:34:06 +02:00
Odoo's Mergebot 566a93567b [MERGE] base,hr: Remove Private Addresses
- The private addresses have been removed from the "res.partner" model.
- The employees' private address information has been moved to the "hr.employee" model, preserving the old records but emptying the private information fields.
- The applicant's private address information has been moved to the "hr.applicant" model, following the same approach.
- More generally, some efforts have been done to ensure we only create and use the same partner from the application form, to the employee creation and also the user creation.
- The salary configurator offer mechanism has been improved to provide stability (no more arguments in URL), traceability (track changes and responsibles) and reporting.

closes odoo/odoo#120586

Taskid: 3101400
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-07-05 17:33:59 +02:00
Valeriya(vchu) 2b4ddc96cd [FIX] payment_adyen: fix form behavior on error
on error unblock dispay and enable pay button to allow
user perform actions

closes odoo/odoo#127441

X-original-commit: 3bcb74438c8e29eb52c2e20c97dabca7a61a1dae
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-05 15:58:31 +02:00
Arnold Moyaux 7b54b26683 [FIX] pos_sale: Pick from reserved stock.move.line
Usecase to reproduce:
- Set reservation method to closest location
- Set the POS as real time stock
- Put 1 unit in A and 1 unit in location B
- Create a SO for 1 unit
- Sell it in the POS

Expected behavior:
The unit has been taken from the reservation in location A

Current behavior:
The unit is taken from B

It happens because the SO is unreserved after the new picking
and stock.move.line creation. Since the unit is reserved, he
can't pick it and take a random ones.
The solution here is to unreserve the related stock.move to
free the reserved unit, it will not always be the same than the
SO but it will consider it in the removal strategy. It could
also fix the case where only 1 unit remains in stock and he won't
pick it.

opw-3271217

closes odoo/odoo#126818

X-original-commit: 312cf1870d15145b511e4ebffa82dd44a7fec22c
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-05 15:58:26 +02:00
Odoo's Mergebot 05750b98fb [REF] web: remove top level await
This PR removes two top level await in test files and reorganizes a bit the tests setup as the module loading sequence has changed. This PR also fixes some bugs spotted during dev. The goal of removing async modules is to simplify the module loader in the future.

task id: 3265979

closes odoo/odoo#121185

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-05 15:58:21 +02:00
Michael (mcm) ac153558a6 [FIX] web, mail: indirectly call a patched function
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, the patches could be applied in a different order
and be applied after a save of one these patches.

This commit fixes a case where we save the reference of a patched
function that we call it later with missing patches.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:20 +02:00
Michael (mcm) 69afcfcc1a [FIX] web: prevent false test fail
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, two tests that throw an error failed
because the error message was written in the console
and the server considered this as a test fail.
Now, the error message is not written in the console anymore.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:19 +02:00
Michael (mcm) 03ad36676f [FIX] web: reset uniqueId to 0 in tests
The commit [1] removed two async module and caused a reorganisation
on the module loading.
Since that commit, `uniqueId` did not begin with the id 1 in its test
and so the test failed.
Now, the variable containing the last id of `uniqueId` is set on the
function itself. This allows us to reset the id in the test.

[1]: 96687f29496ab4cf16ae2ab1584ef1a6a3fb4a11

Part-of: odoo/odoo#121185
2023-07-05 15:58:19 +02:00