Commit Graph
152179 Commits
Author SHA1 Message Date
Touati Djamel (otd) 8467f7b9ff [FIX] mrp: allow selecting only the SNs linked to the MO
Stpes to reproduce the bug:
- Create a storable product “P1”:
    - tracking: Serial number
    - BOM: 1 unit of C1

- Create the MO 1:
    - produce 1 unit of P1:
        - Create the SN1

- Create the MO 2:
    - produce 1 unit of P1:
        - Create the SN2

- Create an Unbuild order:
   - Select the MO1

Problem:
You have the possibility to select any Serial number linked
to the product “P1”, whereas only SNs created in this MO can be selected

opw-2834529

closes odoo/odoo#95956

X-original-commit: 167b1668450c5af44bc1d36d1c7d59921bc2b811
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-07-14 10:22:51 +02:00
Romeo Fragomeli 96835942cc [FIX] web: adapt form layout for database manager
Adapt forms for BS5

closes odoo/odoo#95934

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-14 10:22:48 +02:00
David (dafr) 0198a9eb46 [FIX] stock: Add index of product_id field of stock.move.line model
Adding a @depend decorator on product_id in the stock_move_line model can trigger a search on stock.move.line.product_id
When the number of StockMoveLine reach a million, a simple `SELECT id FROM stock_move_line WHERE product_id = XXX` can take 200ms.
When a transfer contains a few hundred StockMoveLine (ex: when dealing with serial numbers), the process of validating it will take a few minutes.
Indexing product_id will change the process time back to a few seconds.

OPW-2893131

closes odoo/odoo#95511

closes odoo/odoo#95915

X-original-commit: b8156cf9a2d01448244c306c24c3c55687fd0d23
Signed-off-by: DavidFesquet <dafr@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-07-14 10:22:45 +02:00
Romeo Fragomeli b3e5bffb7f [FIX] mail: dropdown menu not at the right position
Since Bootstrap 5 migration, when we use the OWL `dropdown` component
it must have the class `o-dropdown-menu` and not `dropdown-menu`.

This commit replaces this class and also clean some CSS.

closes odoo/odoo#95899

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-14 10:22:42 +02:00
Pratik Raval 003b5f8e9d [IMP] crm: active collaborative pad
This commit allows multiple salespersons to collaborate on a lead without
erasing each other's data.

closes odoo/odoo#95042

Taskid: 2900372
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-14 10:22:38 +02:00
Jorge Pinna Puissant 76f3c4c696 [FIX] website: apply correctly the css to the website theme selector
Since 4f984568e1, the css theme is not
correctly applied to the website theme selector.

The order in which the css rules were applied without the
'.o_legacy_kanban_view' selector removed a margin from the
kanban_record element.

closes odoo/odoo#95936

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-07-14 09:10:56 +02:00
Noe Antoine 38eb7b16ff [IMP] survey: align result badges on the right
Before the change added in odoo/odoo#87990 the badges on the result
view were aligned on the right. However, this broke the mobile design.
This was changed to a bootstrap column view but the alignment was lost
in the process.

It is brought back using a text-right alignment, making sure the center
remains clean and the view open and clear enough. However, for very
small screens they are displayed aligned on the left. The column display
is kept.

Also harmonizes the spacing of the badge of matrix_subtype.

Task-2908045

closes odoo/odoo#95545

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-14 09:10:50 +02:00
qsm-odoo 9f3da72423 [REM] web_editor: remove dead code about overlay handles
Commit [1] introduced some lines of code which added/removed the d-none
class on the overlay handles in some context. Commit [2] later reviewed
that code and removed the addition of the d-none class... but kept the
removal part by mistake.

It of course did not hurt at the time but now impacts new task being
developed in master.

[1]: https://github.com/odoo/odoo/commit/9bbe5be3fb0d995374a369851df3641979d8e553
[2]: https://github.com/odoo/odoo/commit/50cb0f3276819e22a6014bdb7895c7cbc0315ca8

Related to task-2825241

closes odoo/odoo#95954

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-13 19:56:10 +02:00
Adrien Widart fc5572c11f [FIX] {sale_,}stock: reverse orig/dest moves if is return
In a multistep configuration, decreasing the quantity on a line of a
confirmed sale order may create some inconsistencies.

To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Edit the existing warehouse:
    - Outgoing Shipments: 3 steps
3. Create a storable product P
4. Set the on-hand qty to 5
5. Create and confirm a sale order SO with 5 x P
6. Process the PICK/PACK pickings
7. Edit the SO:
    - Decrease the qty: 3 x P
8. In the SO's deliveries, open the return of the pack step (Output ->
Packing)
    - Error: Nothing changes, there isn't any reserved quantity.
However, there are currently 5 x P at the Output location, so the
reservation should work
9. Inventory > Report > Stock Moves, list all SM related to P
    - Error: The origin/destination moves of the pack's return (Output
-> Packing) are incorrect too: the origins contain the pick's return
(Packing -> Stock) while it should not contain anything and the
destination moves contain the ship move (Output -> Customer) while it
should contain the pick's return (Packing -> Stock)

`SM_ship`: SM used to deliver from Output to Customers
`SM_ret_ship`: SM used to return P from Customers to Output
`SM_ret_pack`: SM used to return P from Output to Packing
`SM_ret_pick`: SM used to return P from Packing to Stock

When confirming a move, we transform the move if its demand is negative:
https://github.com/odoo/odoo/blob/53b424d9e43b07fe7aa84ff00035fb7772ef6291/addons/stock/models/stock_move.py#L1239-L1247
We reverse the source/destination locations but we don't do the same
with the origin/destination moves. That is an issue: before reversing,
we have:
| SM          | Qty | From    | To        | Origin      | Destination |
|-------------|-----|---------|-----------|-------------|-------------|
| SM_ret_pick | -2  | Stock   | Packing   | /           | SM_ret_pack |
| SM_ret_pack | -2  | Packing | Output    | SM_ret_pick | SM_ret_ship |
| SM_ret_ship | -2  | Output  | Customers | SM_ret_pack | /           |

Therefore, reversing the source/destination locations without updating
the origin/destination moves does not make sense: we should reverse them
too depending on their direction (positive/negative) and their
source/destination location.

Also, before trying to transform the moves, we try to merge them:
https://github.com/odoo/odoo/blob/53b424d9e43b07fe7aa84ff00035fb7772ef6291/addons/stock/models/stock_move.py#L1236-L1237
This is relevant for `SM_ret_ship`: we find an existing SM (`SM_ship`,
qty=5) that can absorb the negative demand of `SM_ret_ship` (qty=-2). In
such case, we add the origin/destination moves of the negative SM to the
positive one. However, in the above case, it will create an
inconsistency: after the fix, at that point, `SM_ret_pick` and
`SM_ret_pack` have been correctly reversed, so we have:
| SM          | Qty | From    | To        | Origin      | Destination |
|-------------|-----|---------|-----------|-------------|-------------|
| SM_ret_pick | 2   | Packing | Stock     | SM_ret_pack | /           |
| SM_ret_pack | 2   | Output  | Packing   | SM_ret_pack | SM_ret_pick |
| SM_ret_ship | -2  | Output  | Customers | /           | SM_ret_pack |
| SM_ship     | 5   | Output  | Customers | (SM_pack)   | /           |

Therefore, adding `SM_ret_pack` to the destination moves of `SM_ship` is
incorrect. (Note that, without the fix, `SM_ret_pack` would be added to
the origins of `SM_ship`, which would be incorrect too)

Finally, the reservation (step 8) does't work because of two reasons:
- If there are some `move_orig_ids`, we use the done value of these SM
to assign the current SM. However, as explained above, there is an issue
with this field
- If there isn't any `move_orig_ids`, there is an issue with the procure
method. Its value is `make_to_order`: we skip the reservation for such a
value:
https://github.com/odoo/odoo/blob/53b424d9e43b07fe7aa84ff00035fb7772ef6291/addons/stock/models/stock_move.py#L1499-L1501

OPW-2889679

closes odoo/odoo#95263

closes odoo/odoo#95926

X-original-commit: fb94c140a91aca26a56c5162d61b00b4a4b0d85b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-07-13 19:55:57 +02:00
aliya 5d4b5d71c0 [FIX] account: fix the account selection widget
After the change in account_type field in account.account the old selection widget didn't work.
Fixing the selection widget and adding it back on acocunt_type field.

As account types cannot be custom anymore, the account types within the hierarchy can be hardcoded.

closes odoo/odoo#95821

Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-07-13 19:55:47 +02:00
Joseph Caburnay 8f03b342e5 [FIX] account: allow missing account_id in account.move.line vals
When an invoice line has a display_type, account addon is expecting
account_id=False in vals. Replacing the normal dict access with a
`get` will fix the error when invoicing with note/section lines
without explicitly specifying the `account_id` to be false.

closes odoo/odoo#95894

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-13 18:49:52 +02:00
Michael (mcm) 2faf0ac64d [FIX] web: fallback for domain selector operator
Before this commit, it happened that the domain selector
couldn't find the operator linked to the field.
This commit adds a fallback on the existing operators
to find an operator that matches.

for example the domain `[["name", "like", "M"]]` gave
`Name ? "M"`, now it correctly gives `Name like "M"`.

closes odoo/odoo#95891

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-13 18:49:50 +02:00
Jorge Pinna Puissant f4d8d3c169 [FIX] account: apply correctly the css to the journal dashboard
Since 4f984568e1, the specific css style
was not applied correctly to the journal dashboard.

closes odoo/odoo#95886

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-13 18:49:47 +02:00
Michael (mcm) da8f1d44c9 [IMP] web: add in_dialog option to domain field
In legacy, the domain field had an `in_dialog` option that was
used to display a button that opens a dialog to edit the value.
This commit reimplements the `DomainSelectorDialog` in owl
and adds the option the new domain field.

closes odoo/odoo#95768

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-13 17:40:57 +02:00
Damien Bouvy 2781d15fe9 [FIX] hr_expense: incorrect domain for expense split line
Task 2850882 modified the behaviour of expenses to support working
with all purchase taxes, regardless of their 'price included'
configuration.

We missed a domain on the split lines though, so it was impossible
to use 'all taxes' when splitting an expense.

This commit resolves that limitation/oversight.

closes odoo/odoo#95627

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-13 17:40:54 +02:00
Jinjiu Liu d9893e385d [FIX] web: created css class for mt32 and mb32
Reproduction:
1. Create an invoice, then save and confirm it
2. Print the invoice
3. The CSS spacing does not work in the PDF report

Reason: V13 uses Bootstrap 3 but Odoo V14 uses Bootstrap 4. In
Bootstrap 4, the margin class is defined in a different way.

Fix: Instead of re-defining mt32 mb32 in the css file, we use mt-4 and
mb-4 to create a similar effect for the margins.

opw-2654880

closes odoo/odoo#95925

X-original-commit: 510c3f38ad54a09167774bb1e46215b761978024
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-07-13 16:23:12 +02:00
Michael (mcm) 88412a2d2b [FIX] web: fix patch descriptor
Before this commit, patching a getter of a class made it enumerable
(`Object.keys({ a: 1 })` -> `["a"]`).
In javascript, getters of a class are not enumerable but
getters of an object are enumerable.

When patching, the system replaced the descriptor of the old class
member by the member of the object.
Now, it replaces some info of the old descriptor by the new descriptor
but not the entire descriptor.

closes odoo/odoo#95921

X-original-commit: fd7c2c0c14bfaac228abacb265278157eec4aad0
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-07-13 16:23:08 +02:00
Denis Ledoux b2e5cb8604 [FIX] sale: test_fiscalposition_application missing uom group
When `sale` is installed alone,
the test fails because it changes the field `product_uom`
which is invisible in the view because the user executing the test
doesn't have the appropriate group.

```
FAIL: TestSaleOrder.test_fiscalposition_application
Traceback (most recent call last):
  File "/data/build/odoo/addons/sale/tests/test_sale_pricelist.py", line 292, in test_fiscalposition_application
    line.product_uom = uom
  File "/data/build/odoo/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field product_uom
```

closes odoo/odoo#95910

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-13 16:23:05 +02:00
Denis Ledoux 5e4d697b24 [FIX] base: test_create_res_partner with only account_accountant
This is about the same than
d6ad39abba

but with account_accountant installed

```
FAIL: TestFormCreate.test_create_res_partner
Traceback (most recent call last):
  File "/data/build/odoo/odoo/addons/base/tests/test_form_create.py", line 35, in test_create_res_partner
    partner_form.property_account_payable_id = property_account_payable_id
  File "/data/build/odoo/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field property_account_payable_id
```

closes odoo/odoo#95903

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-13 16:22:55 +02:00
lejeune quentin 173d14c0c1 [FIX] hw_drivers: Add printer manually to IoT
Actually it is not possible to add manually a printer.

With this commit we loop into all printer recorded in cups to
check if a printer is not automatically added.
If a printer does not match with a identifier automaticcaly generated,
it is added to the list of usable printer.

closes odoo/odoo#95709

X-original-commit: de03cbefd537503cd46cbecf1622bd2a547b4615
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-13 13:48:47 +02:00
Nam Dao 5d50b4d89b [FIX] discuss: fix error open document inside channel on mobile device
When the user opens a document from the chat channel, the system opened the document, but the chat window is still there and covers the document.

closes odoo/odoo#95880

X-original-commit: 29fa81cc02e5f70ab4875164e290f8a69ffde2e3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-13 11:03:58 +02:00
Romeo Fragomeli 3af9f3d7c8 [FIX] web_editor: adjust alignment in media_dialog
Add some classes to improve the alignment.
Quite difficult to deal with as we have a lot of inputs on the same line.

Follow of odoo/odoo#95725

closes odoo/odoo#95815

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-13 09:47:53 +02:00
Joseph Caburnay 72bd6b86c3 [FIX] point_of_sale: automatically create new order
When in point_of_sale, the screen when getting out of the TicketScreen
is the current order's screen. However, when all the orders are deleted,
no new order is created, thus, pos crashes when clicking back button without
manually creating a new order. With this fix, when the TicketScreen is
closed (either by clicking an order, or clicking the TicketButton or
clicking Back button), a new order is automatically created when there
are no more orders. The sequence of the orders is also properly tracked
which is important in the fiscal data modules.

closes odoo/odoo#95876

Task-id: 2886099
X-original-commit: 20a04a70ba8b24349054522632a53a9701313329
Related: odoo/enterprise#29394
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-07-13 08:38:11 +02:00
Sébastien Theys 458cb9b55a [IMP] mail: display guest in channel member list
Part of task-2664860

closes odoo/odoo#95859

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 18:31:42 +02:00
Denis Ledoux 4161e1d04e [IMP] stock: default warehouse and location for orderpoint
This follows revision
odoo/odoo@9925c8fbaf

On creation of an orderpoint,

if warehouse and location are not specified,
set default warehouse and location

if warehouse is specified but not location,
set default location according to the warehouse chosen
(and not the location of the default warehouse, as formerly)

if location is specified, but not location,
set default warehouse according to the location chosen
(and not the default warehouse, as formerly)

if warehouse and location are specified,
let them, do not overwrite them.

closes odoo/odoo#95851

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-12 18:31:24 +02:00
Pierre Masereel 74c21caeb9 [FIX] point_of_sale: display product price with fiscal pos
When the price of the products is displayed in the product screen, we
are now taking into account the taxes when the pos diplays taxes
included.

The issue is that we are using the taxes on the product, and we are not
applying the fiscal position of the current order on the price.

We are now taking it into account

OPW-2860737

closes odoo/odoo#95848

X-original-commit: e162a7084f584fc9b5d5b2db7f519b5b47ad6406
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-12 18:31:21 +02:00
Denis Ledoux eddd52713e [FIX] purchase: missing uom group for test_with_different_uom
The user executing the test is changing the UOM
while the field was invisible because the user
did not have the multi uom group.

Therefore, add the group to the user for the test
so the field is visible in the form.

This is related to revision
odoo/odoo@5ccc32fcf7

```
2022-07-12 11:59:39,526 22 ERROR master odoo.addons.purchase.tests.test_purchase: FAIL: TestPurchase.test_with_different_uom
Traceback (most recent call last):
  File "/home/odoo/src/odoo/master/addons/purchase/tests/test_purchase.py", line 268, in test_with_different_uom
    po_line.product_uom = uom_dozens
  File "/home/odoo/src/odoo/master/odoo/tests/common.py", line 2179, in __setattr__
    assert not self._get_modifier(field, 'invisible'), \
AssertionError: can't write on invisible field product_uom
```

closes odoo/odoo#95841

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-07-12 18:31:17 +02:00
Dharmraj Jhala d8d30829c6 [FIX] calendar: open calendar view from 'Reschedule' activity button
With recent commit[1], we now use the wowlEnv instead of the legacy one,
and use the service provided by env to call the rpc.

This was adapted in the activity model, but not on the patched method
under calendar.

This commit fixes the issues to adpat the change, and so the 'Reschedule'
button for the meeting activity now opens the calendar view as expected.

Apart from that, this commit also tries to align this button with other
activity buttons, for better UI.

commit[1] - https://github.com/odoo/odoo/commit/3573a7fef497d

taskID-2899402

closes odoo/odoo#95747

X-original-commit: b7efe2a80f9da175114cf1138565580981690001
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 18:31:13 +02:00
Odoo's Mergebot 71abeef70d [MERGE][IMP] microsoft_outlook, fetchmail_outlook: improve usability, lessen module complexity
Purpose
=======

Improve the usability of the outlook modules. Lessen module complexity.

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

Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.

Hide the password field for Outlook / Gmail mail servers.

Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending do not
fail).

Merge fetchmail_{google/microsoft} into google_gmail / microsoft_outlook?
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules, for both
providers, to lessen complexity.

Task-2811567

closes odoo/odoo#88215

Related: odoo/upgrade#3419
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-12 15:36:51 +02:00
std-odoo ee61556907 [REF] microsoft_outlook, fetchmail_outlook: merge microsoft / fetchmail outlook
Purpose
=======
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules into Microsoft Outlook.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo 87c682c1df [REF] google_gmail, fetchmail_gmail: merge google / fetchmail gmail
Purpose
=======
Most of the time, both module will be installed at the same time, or
none. For that reason, we want to merge both modules into Google Gmail.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo e9f712278d [IMP] microsoft_outlook, fetchmail_outlook *: improve usability
* fetchmail, google_gmail, fetchmail_gmail

Purpose
=======
Improve the usability of the outlook modules.

Specifications
==============
Remove the checkbox "Use Outlook" and instead use the
smtp_authentication and the server_type, to be consistent with Gmail.

Hide the password field for Outlook / Gmail mail servers.

Add constraints on the outgoing mail server to force the user to use
the right configuration (e.g. the from_filter, so the sending does not
fail).

Add an option in the mail module to install Outlook.

Show a message for the outgoing mail servers to explain each
authentication methods.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo afe8222712 [IMP] microsoft_outlook: allow customizing the outlook endpoint
Purpose
=======
If we want to deploy Outlook for a custom organization, it might be
useful to be able to customize the endpoint used in the API request.

For that purpose, we added a system parameter to overwrite the default
endpoint.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:50 +02:00
std-odoo eb2dd1d674 [IMP] base, fetchmail: improve the mail servers list
Purpose
=======
Improve the incoming mail server list view and the outgoing form view.
Show the most used option first, and make the view more responsive.

Task-2811567

Part-of: odoo/odoo#88215
2022-07-12 15:36:49 +02:00
Laurent Stukkens (LTU) 9a0050149e [FIX] sale_timesheet: prevent sale_timesheet_tour to indeterministically fail
Prior to this commit, the `sale_timesheet_tour` was indeterministically failing
due to the fact that the tour step responsible of saving the data was not waiting
for the previous step (responsible to confirm the SO) to be finished.

This commit fixes this issue by ensuring that the buttons that allow confirming
the SO are not visible any more.

closes odoo/odoo#95825

X-original-commit: 287a7449ed5c809847a6b0c9719b8b3cc0215e3a
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 13:21:36 +02:00
Camille Spiritus ca999dd8a3 [IMP] account: remove deprecated invoice date method
Deprecated method _get_default_invoice_date is no longer used and can therefore be safely removed.

closes odoo/odoo#95820

Signed-off-by: William André (wan) <wan@odoo.com>
2022-07-12 13:21:33 +02:00
Sébastien Theys 2e4ae1f5fb [FIX] mail: prevent crash when cancelling message edit
task-2917199

closes odoo/odoo#95814

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-07-12 13:21:30 +02:00
Rémy Baranx (bar) 2fbfbf0dce [FIX] calendar, microsoft_calendar: backport bugfixes from master
As several customers complained about lot of bugs in microsoft_calendar in 14.0,
It has been decided to backport bug fixes of the model layer from master to 14.0,
without the need of an upgrade script (no new field, ...).

In master, we use 2 ids (organizer event id + universal id) instead of only one,
to handle Odoo <-> Outlook sync correctly when several attendees sync their Outlook
calendar with their Odoo calendar. For that, we have added a new field.
To report this bug fix in 14.0, the existing field which stores the organizer event id,
is now a string storing both ids separated by a ':' as follow: 'organizer_event_id:universal_id'.

2 new compute fields have been added to be able to use these 2 ids more easily.

(all commits from the original PR have been squashed to ease forward-port)

closes odoo/odoo#95736

X-original-commit: 5e83318a7240585371efd31e407829793f3e732f
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-12 13:21:27 +02:00
Xavier-Do d6ad39abba [FIX] base: manage non existing ref
If the test is ran on a database without account installed, it will fail
because of the missing ref.

closes odoo/odoo#95735

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-07-12 13:21:24 +02:00
Sébastien Geelen (sge) 923d139f9f [FIX] web_editor: ensure no root inline node
During Editor initialisation, detect if the editable element contain orphan inline nodes.
If so we transform the base element HTML to put those orphans inside `<p>` containers.

This is used to ensure the HTML generated by Etherpad is compatible with this editor,
allowing the user to use all the features without loosing the Etherpad look.

task-2877273

closes odoo/odoo#93207

closes odoo/odoo#95347

Related: odoo/enterprise#28965
Related: odoo/enterprise#29130
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js

closes odoo/odoo#95445

Related: odoo/enterprise#29185
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-07-12 13:21:16 +02:00
Sébastien Geelen (sge) 0d77895b09 [FIX] web_editor: inlines should be pasted inside container
During paste HTML, an inline element or a textNode should never be
inserted outside of the targeted initial container.

Those kind of orphans elements should never be present in an HTML paste data,
but better safe than sorry.

Part-of: odoo/odoo#95347

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/src/OdooEditor.js

Part-of: odoo/odoo#95445
2022-07-12 13:21:15 +02:00
Sébastien Geelen (sge) 8556b6d35e [FIX] web_editor: adapt unit tests
* Adapt Unit tests to always have a container block element
* Add some tests to ensure the editable root direct child nodes are all blocks
* Fix paste HTML unit tests to properly check that we never paste inline
  elements or text nodes outside the target container

Part-of: odoo/odoo#95347

# Conflicts:
#	addons/web_editor/static/lib/odoo-editor/test/spec/collab.test.js
#	addons/web_editor/static/lib/odoo-editor/test/spec/copyPaste.test.js
#	addons/web_editor/static/lib/odoo-editor/test/spec/editor.test.js

Part-of: odoo/odoo#95445
2022-07-12 13:21:15 +02:00
Kevin Baptiste ecf07e1043 [IMP] hr,hr_expense: adapt kanban views to OWL
task-2900536

closes odoo/odoo#95317

Related: odoo/enterprise#29116
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 13:21:07 +02:00
Audric Onockx (auon) 7ab3254b59 [IMP] hr_timesheet: change settings description
Change descriptions in settings:
'Employee reminder' > '...timesheets users that still have timesheets to encode'
'Manager reminder' > '... timesheets managers that still have timesheets to validate'

task-2859663

closes odoo/odoo#93169

Related: odoo/enterprise#27754
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 13:20:59 +02:00
Rahul Prajapati 51c72ae955 [IMP] mail: open dm chat on mention or member click
Purpose:

Access the DM chat to a user when clicking on its @mention
(DM or chatter) or member name (in Discuss).
The same goes for @mention to channels.

Specifications:

- DM to Author should be opened after clicking on his name
- DM to Author should be opened after clicking on his mention
- DM to channel should be opened after clicking on it's mention
- There should be a grey background hover effect on channel members in
  members list

Task-2631948

closes odoo/odoo#92050

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-12 13:20:56 +02:00
Julien Van Roy 4cdd9a0d86 [FIX] account_edi_ubl_cii: fix embedding of pdf in xml
The embedding of the pdf inside the xml should only take place
for a defined list of EDI formats (bis 3, ubl_de, nlcius),
not for all. Otherwise, we get unexpected behaviours when
generating other EDI's xml (e.g. l10n_pe_edi).

closes odoo/odoo#95795

X-original-commit: 75a87bc7fa1f3331efe2048bb949e3426df2dc57
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-07-12 12:00:50 +02:00
Ivan Yelizariev e0c179b6d2 [FIX] sale: fix multi-company error with partner bank
On creating Invoice for an SO, Odoo checks for available bank records for the
partner and if there few of them, it chooses the first one.

However, the first one might be from another company, which leads to
"Incompatible companies error". It may happen when user works with several
companies (few active companies in the company switcher).

Fix it by filtering available bank records by company

opw-2745339

closes odoo/odoo#95790

X-original-commit: 2617772f07a77375b49a64a8e379ffe1d6f450dd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-07-12 12:00:47 +02:00
Hardik Prajapati bdc4b4a21b [IMP] base,project: improve project and the uninstall wizard
This commit does the following changes:
 - Improve some project filter and views
 - Align the module kanban buttons
 - Sort the module in uninstallation wizard

task-2731708

closes odoo/odoo#83339

Related: odoo/enterprise#23783
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-12 10:37:02 +02:00
Achraf (abz) d46494006f [FIX] hr: Prevent user to access to activities without rights
Steps:
- Schedule some activities to `admin` (users with hr officer)
- Remove hr rights to `admin`
- Log-in with `admin` and click on notification
- Click on `Summary`
- Traceback

If we click on `Summary` a `_search` is executed in `hr.employee`
When a user does not have the required rights we will apply `_search` on
the fields on `hr.employee.public` instead of `hr.employee.private`.
Except that in the case of `activity_ids` this field does not exist in
`hr.employee.public`

opw-2765032

closes odoo/odoo#95802

X-original-commit: c4a5c63b6141424e31d7a7c8bc6d0c00d58643c0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 08:40:01 +02:00
Philippe Wauthy fdee8ab152 [IMP] hr_holidays: make duration field read only
In hr_holidays, the duration field is editable but doesn't bring any added value.
The field is errorprone and not editable if you are not HR Officer. It should be the same in every case.

The duration field should be read only on the dashboard and time off creation screens.

task-2901951

closes odoo/odoo#95534

Related: odoo/enterprise#29352
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-12 08:39:58 +02:00