Commit Graph
158942 Commits
Author SHA1 Message Date
Kevin Baptiste 17ec1676f3 [FIX] hr_skills: add proper padding
A double line would appear if the resume / skills were empty.

task-3196398

closes odoo/odoo#114144

X-original-commit: 35ffc195e807db3fd5ea1576816c631d219863c0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-02 17:12:59 +01:00
Pablo Montenegro 7d4e464aad [FIX] l10n_ar: Invoice document type letter
OPW 3117373
Task: 57576
The printed invoice hides part of the document type letter in the header.
This commit solves that problem and also this issue: https://github.com/odoo/odoo/issues/108994

closes odoo/odoo#113603

X-original-commit: 91581e9090d2382ff584c199efcf3b7206ddac66
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-03-02 17:12:57 +01:00
luvi 4f2a962db6 [FIX] note: fix activities menu in dark mode
This commit fixes the style of the "Add a note" element in the
activities menu list. Before this commit, the background was white
because the color was hardcoded in a scss file. This is not longer
the case with this fix.

Also, the input has a transparent background to match with the
background color.

task-3208042

closes odoo/odoo#114143

X-original-commit: 5829183b57478b3316cacda931c2245b17896a63
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-02 16:01:28 +01:00
Samuel Degueldre b795fe45f6 [FIX] point_of_sale: fix crash when closing session with draft orders
In odoo/odoo#112219 we removed the usage of useListener for
cross-component communication, one such use was to close the pos from
the closing popup. The closeSession method was moved from the closing
popup to the store but the corresponding error handling method wasnt. It
appears that the closeSession method doesn't need to be on the store at
all, only the closePos method. This commit moves the closeSession method
back to the closing popup, so that it has access to the
handleClosingError method again.

closes odoo/odoo#114127

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-02 16:01:22 +01:00
Jorge Pinna Puissant 91303252f4 [REF] web, *: simplify concrete fields API - remove value setDirty
This commit, is part of a series of commits that aim to simplifie the
concrete fields API.

In this commit we will remove setDirty prop from concrete fields. Now if
needed the fields can declare itself dirty using triggering
"FIELD_IS_DIRTY" on the model's bus.

Note that this PR partially revert [1] and completely revert [2]

task-id 3179751

[1] : 89c2a3978e
[2]: c79bb3c9c6

closes odoo/odoo#114124

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-02 16:01:19 +01:00
Romain Derie e7b0ee3012 [FIX] website_blog: prevent params to be lost when only one blog
With DB having only one blog (most common case, but we are used to test
it with demo data where we have two), the query params are lost when
accessing the blog controller without passing a blog.

Eg, `/blog?search=hubble` will redirect to `/blog/travel-1`

This is because the business code is doing an early redirect if we
access the `/blog` URL without a blog post passed to it to redirect to
that blog post URL directly (since there is only one), but that redirect
is not passing the query parameters.

The main impacted params are `state`, `order` and `search` but it's the
same for all others.

Step to reproduce (in later version):
- Be sure to only have one blog
- Drag & drop the search snippet in the homepage or anywhere
- Make it search on blog only (through the snippet option)

Type anything, it will not work and won't do the search. It will just
redirect to the blog page.

closes odoo/odoo#114107

X-original-commit: 41c27fd4912fb9f50ce5f31fff7c17c77b8530f7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-02 16:01:17 +01:00
Alexandre Kühn 76d339a266 [FIX] mail: upload file on draft record
When uploading a file on a draft record, it crashed.
This happens because the file upload was applied on record
while still in "draft".
This fixes the issue by awaiting chatter is saved, to proceed
with the file uploading.

opw-3204555

closes odoo/odoo#114106

X-original-commit: 45bcd91026b93997e7ba2509c5c4176db269c3c6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-02 16:01:14 +01:00
Ivan Yelizariev a1187c5140 [FIX] base: update currency symbol for EGP
LE is most commonly used today.

opw-3188129

closes odoo/odoo#114094

X-original-commit: e901ee541407b70fee8bad0d6adc80e0726079d2
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-02 16:01:11 +01:00
niyasraphy 0a6a901208 [IMP] website_profile: remove italic style from email
before this commit, when a verification email is
send to the user when validating the website user
profile, there is no spacing/overlapping between
the email(in italic) and !

after this commit as the italic is removed from
the email, there will be proper
spacing(no overlapping)

closes odoo/odoo#114073

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-02 16:01:08 +01:00
jash 2162dd4225 [FIX] spreadsheet_dashboard: decoding the dashboard data
Earlier, receiving data was size of the file which is not what we
want. And we are trying to decode that as they are in binary form. Which
can not working properly.

So refactor code accordingly.

Task - 3162824

closes odoo/odoo#113953

Related: odoo/enterprise#37650
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-03-02 16:01:02 +01:00
FrancoisGe f9edb9f2f4 [REF] spreadsheet: remove duplicate orderByToString
The orderByToString function has been duplicated in spreadsheet. We will
replace it with the one defined in web.

closes odoo/odoo#113873

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-02 16:00:56 +01:00
Jordan D. (Joda) 410709c114 [FIX] l10n_din5008: fix duplicate title on purchase order
How to reproduce
=================

1. Install `l10n_din5008` and `purchase`
2. Create a RFQ and print a Purchase Order. 2 Titles are displayed

opw-3162177

closes odoo/odoo#113508

X-original-commit: 42e6420e7259f3fe10937c58a73b7c88ead672f6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Dalcq Jordan (joda) <joda@odoo.com>
2023-03-02 16:00:53 +01:00
Adesh Jolhe 0de9824edf [FIX] website: prevent user to unlink default_website
Previously when we tried to delete default_website it was deleted.

In this commit we have fixed this issue by preventing user to unlink
default_website.Also we remvoe _unlink_except_last_remaining_website
method.

sentry-3874625419

closes odoo/odoo#113405

X-original-commit: 637af9f747bda0d6b4607d02a0e51d44cf889a89
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-02 16:00:50 +01:00
Adrien Guilliams (adgu) 6422b3781d [IMP] point_of_sale: fields added to X and Z reports
The module pos_daily_sales_reports has been added in 16.0 and forward-ported
in master. In master we merge this module with the module point_of_sale.

Forward-port PR: odoo/odoo#113228

closes odoo/odoo#113380

Related: odoo/upgrade#4366
Related: odoo/enterprise#37410
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-03-02 16:00:44 +01:00
Odoo's Mergebot a159f952a5 [REF] account, hr_{expense|holidays}, mail: move main attachment to mixin
Main attachment is quite costly and as it is implemented in mail.thread and is
therefore present in most model. In order to improve performance, we remove it
here from mail.thread and add it through a new mixin,only on model that
effectively use that features.

See sub commits for more details.

Task-2648976

closes odoo/odoo#110734

Related: odoo/enterprise#36164
Related: odoo/upgrade#4262
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-02 12:32:12 +01:00
Pierre-Yves Dufays ffd976cc69 [IMP] {test_}mail: make some improvements to the code, no functional changes
Some code cleanup done when moving the main attachment into its own mixin:
- improved docstring
- early returns
- code simplification
No functional changes should occur with this commit.

Task-2648976

Part-of: odoo/odoo#110734
2023-03-02 12:32:11 +01:00
Pierre-Yves Dufays 4cec1e12d8 [REF] various: apply main attachment mixin on models that use the feature
Add mail.thread.main.attachment in the inheritance chain of all models that
use the main attachment feature.

Note that we remove the main attachment from crm_case_15 of the demo data as
crm_lead doesn't use that feature.

Task-2648976

Part-of: odoo/odoo#110734
2023-03-02 12:32:11 +01:00
Pierre-Yves Dufays 4991dbc9a8 [REF] mail: adapt test using new main attachment mixin
Task-2648976

Part-of: odoo/odoo#110734
2023-03-02 12:32:11 +01:00
Pierre-Yves Dufays f8c7f2e5bb [MOV] mail: move main attachment feature to mixin
Main attachment is quite costly and as it is implemented in mail.thread, is
present in most model. In order to improve performance, we remove it here from
mail.thread and add it, through a new mixin, only on models that actually use
that feature.

Technical note: with the current implementation, even if the font-end view
expect the model to implement the main attachment feature and the model
doesn't, it doesn't crash. Indeed, the main attachment on the front-end is only
used to know the first image to display in the image 'carousel' on the right
(widget rendered through the presence of the class o_attachment_preview). And
as 'register_as_main_attachment' of ir.attachment doesn't crash even if the
model doesn't support main attachment feature, the only consequence is that the
first image to display is not persisted (if you refresh after changing the main
attachment, it will get back to the previous one).

Task-2648976

Part-of: odoo/odoo#110734
2023-03-02 12:32:10 +01:00
Maruan Aguerdouh (magm) a80033415a [FIX] product: fix product dymo labels printing long titles diplayed
Steps to reproduce:

- Go to a product with a long name
- Inside the product page go to "print labels"
- Choose "Dymo" as label type and print.
(For barcode you need to add a barcode number to the product.)

Issue:

The product name is not displayed correctly on the label because
is too long.

Solution:

Removing the fixed height int he label seem to have good behavior with
sizing the text.

opw-3120807

closes odoo/odoo#114097

X-original-commit: 37b49c6ced839cd82b77819845a52ba2cf8c4ab8
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-03-02 11:23:47 +01:00
David Monjoie 7be2eba0fb [FIX] web_editor: remove unnecessary structuredClone
Commit [1] introduced a usage of `structuredClone` in 16.0 where
it is not supported. This was a mistake introduced by backporting
[2] from master to 16.0.

However, the `structuredClone` was not necessary in the first place
anyway, so this commit removes it.

[1]: c472e600da3237d3cb0a6352a4d26ebb3ed6e20c
[2]: a5036864b1

closes odoo/odoo#114082

X-original-commit: 222ad55966d9161394b9412a5baf14043b36baea
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-02 11:23:45 +01:00
Samuel Degueldre 15bc39d3ef [FIX] pos_restaurant, *: allow selecting a table while offline
*: point_of sale, web

Previously, the error handling code was refactored and centralized, in
doing so, we broke the ability to select a table while offline: when
selecting a table we ask the server about the orders for the table. When
offline, this creates an error that was previously caught, and showed an
offline error popup, but continued the rest of the flow normally. The
refactoring centralized the display of offline errors to an error
handler, but removed the catching, causing the error to interrupt the
flow.

This commit fixes that by catching the error again, and when it's a
ConnectionLostError, it dispatched the error in a separate async call
stack (using Promise.reject) so that the display of offline errors is
still centralized, the the flow can continue normally.

closes odoo/odoo#114077

X-original-commit: f45f5e644b4b219b968fa19737d75cc710c823f3
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-03-02 11:23:42 +01:00
Benjamin Vray ceb68cc600 [FIX] web_editor: fix moving inner content in carousel slides
Before this commit, when moving inner content inside a carousel slide
(with the 'move' button), the carousel was jumping to the first slide.

Steps to reproduce the bug:

- In website edit mode, drag and drop a Carousel snippet onto the page.
- Move to the second slide.
- Click on the column to activate its overlay.
- Click and hold the "drag and drop" button of the column to start
dragging it.
- Release the mouse button.
- Bug: the carousel jumps to the first slide.

task-3006831

closes odoo/odoo#114067

X-original-commit: a09031d5f68de5d23bd9cab1910c6f9c50ad7cfd
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-03-02 09:11:23 +01:00
snd 415390d5e0 [FIX] stock: leap year in test
The test returns an error if today is within 365 days before the next 29th February: datetime.date(2024, 3, 1) != datetime.date(2024, 2, 29)

closes odoo/odoo#114053

X-original-commit: 880c0a76ac6333cbc9a8e89c865eb6caf309e0e3
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Diez Stéphane (snd) <snd@odoo.com>
2023-03-02 09:11:21 +01:00
Benjamin Vray a4335529c1 [FIX] web_editor: remove horizontal sizing options on mobile
In this commit, the horizontal sizing options are disabled from the
snippets overlay on mobile view as they were ineffective and
unnecessary.

task-2978500

closes odoo/odoo#113945

X-original-commit: b7359e47ce3888433a31592a365017c1183242a7
Signed-off-by: loco-odoo <loco@odoo.com>
2023-03-02 09:11:18 +01:00
Abdelouahab (abla) d72511cc4c [FIX] account: specify groups_id for adding bank action
To reproduce
============
- with Invoicing installed, give a user the group Billing Administrator without giving any Administration group
- connect to this user and try to add a bank account
an access right is raised

Problem
=======
the `groups_id` on the action `action_new_bank_setting` is not specified
so when runing the action we check if it has `groups_id`, if not, we check
if the user has the right to write on the target model which is `res.company`
here, which is not for this user because he doesn't have any Administration group.

Solution
========
specify `groups_id` to `account.group_account_manager`

opw-3199435

closes odoo/odoo#114108

X-original-commit: 68090907d1a4f26d66ece6827e0dd502e1d26844
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-02 00:28:07 +01:00
qsm-odoo f90bc872f0 [FIX] website: avoid marking some non-editable tab panes as editable
This reviews [1] (in particular changing my mind about [2] upon further
review). Indeed this was marking potential non editable tab panes as
editable by searching the whole DOM instead of editable savable zones.

In the end, what is searched for is also reviewed. Instead of searching
for a very specific structure, we now mark all oe_structure which are
direct children of tab-pane as editable (if in an editable zone) and
their parent (the tab-pane who have a direct oe_structure child) as
readonly.

[1]: https://github.com/odoo/odoo/commit/5fd99855654d220bafb8887cd0ae267042836d4b
[2]: https://github.com/odoo/odoo/pull/109430#discussion_r1115792052

closes odoo/odoo#114069

X-original-commit: d5d646281f1de672cff0e03903b88059ac17be18
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-02 00:28:01 +01:00
Benoit Socias 4a155bbede [FIX] website: not fail when no dynamic filter is defined
Since [1] when only website is installed, dropping a dynamic snippet
produces an error because no dynamic filter is defined and it tries to
specify one selected by default.

This commit avoids setting a default filter when there is none.

It did work in 15.0 because the log was inside
`_renderDynamicFiltersSelector` which contained an
`if (dynamicFilters.length > 0)` that avoided the problem.
In [2], when most of that logic was moved from the render method to the
fetch method, that condition was lost.

Steps to reproduce:
- Install website only
- Go to debug mode
- Drop a "Dynamic Snippet" or a "Dynamic Carousel"
=> Traceback appears because there cannot be a default filter when there
is no filter.

[1]: https://github.com/odoo/odoo/commit/3355dc16235355fe51e894f14e275210464608c6
[2]: https://github.com/odoo/odoo/commit/9e0b398fe608e716835260c5f9923f933d723f8e

opw-3166634

closes odoo/odoo#114068

X-original-commit: 8e23f08b1470ec5fe47a4459c4d3a8ad314c43b0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-02 00:27:58 +01:00
Guillaume (gdi) 53044c7fa4 [FIX] website,web_editor: prevent horizontal scroll on we-matrix
Before this commit, we-matrix could create a horizontal scroll bar in
the editor. This was because the inputs had a minimum width size.

Steps to reproduce the bug:
- Drop a chart block on a page
- Add some series

=> The matrix overflows from the editor.

There is no perfect solution to this problem... We have the choice
between:
1) Leave the existing overflow on the editor.
2) Put a horizontal scroll on the we-matrix.
3) Distribute the available space between the columns.

As we don't want a horizontal scrollbar, the best solution is to
distribute the available space between the columns. This solution has a
drawback which is that the cells can become really small if there are a
lot of columns but this solution seems to be the least bad from a UX
point of view.

task-3094162

closes odoo/odoo#114062

X-original-commit: 356e0a1fe5243078ba5f162b383279ae7e6a8136
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-03-02 00:27:56 +01:00
Samuel Degueldre 54c2ba1806 [FIX] pos_restaurant: fix crash when trying to pinch on touch screen
In odoo/odoo#112610 the draggable/resizable behaviour of the floor
screen was refactored, and in doing so the FloorScreen was converted to
a Component from a LegacyComponent. Doing so makes `this.el` unavailable
in the component but it was still using that for the pinch, causing a
crash.

This commit fixes that issue by using a ref instead of using
querySelector on this.el.

closes odoo/odoo#114058

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-02 00:27:53 +01:00
Paolo Gatti (pgi) 774e2e26e4 [FIX] l10n_it_edi_sdicoop: fix EDI notification logic
In some cases, Odoo's move state is unaligned to that on the
IAP Proxy Server, because the ACK message from Odoo to IAP
deletes all attachments from the EDI transactions on the IAP
without regard if they are with type "Send" or "Receive".

We fix both cases by making Odoo just look at the state and not
to the attachment when it's not needed, and it's only needed when
there is a rejection of the document being sent.

We reserve for the future a change to the ACK to only delete the
attachments by transmission type (Send/Receive) so that they don't
interfere.

Error case 1:
- Odoo client sends an invoice to the IAP Proxy
- The IAP proxy will send it to the SdI
- If everything goes well, the SdI will send a notification back
- The IAP proxy sees the notification and saves it
- The Odoo of the client downloads the notification and sends an ack
- The IAP proxy sees the ack and deletes the attachment
- (ERR!) The client resets to draft, modifies and re-confirms
- The state of his invoice is set again To Send
- Odoo tries to re-send the invoice with the same Id Transaction
- The notification for that Id Transaction is already on the IAP proxy
- Odoo client asks for changes, but just sees the old notification
- (-->) The old notif. has no attachment, so Odoo thinks there's no news
- The move in Odoo stays in the To Send state forever

Error case 2:
- Odoo client sends a Tax Integration for a Vendor Bill (reverse charge)
- The IAP proxy will send it to the SdI
- If everything goes well, the SdI will send the same Vendor Bill back
  as the client's CodiceDestinatario is actually the recipient in the XML
- The IAP proxy sees the file, the Id Transaction is the same
  for both the received and the sent documents
- The SdI sends a notification because the tax integration is OK
- The IAP proxy saves the notification, there are now two EDI
  transactions with the same Id Transaction.
- Odoo checks for new documents
- IAP proxy sends the document to Odoo
- Odoo sends an ACK for that
- (ERR!) the IAP proxy sees the ACK and clears the attachment
  from BOTH the records for sent and received document
- Odoo checks for documents updates and gets the record without
  the attachment
- (-->) The notification has no attachment, so Odoo thinks there's no news
- The move in Odoo stays in the To Send state forever

Ticket link: https://www.odoo.com/web#id=3194378&model=project.task
opw-3194378

closes odoo/odoo#114051

X-original-commit: f85744ee4533ea8593b81a88ef200ec4dc1b1b94
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-03-02 00:27:48 +01:00
Guillaume (guva) 9069d17794 [FIX] l10n_din5008: add shipping address in .pot
Add missing term "Shipping Adress"

opw-3198115

closes odoo/odoo#114023

X-original-commit: 50eafb5447fc28b31904f529116a90bffc3a4734
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-03-01 23:28:38 +01:00
Ahmad Khanalizadeh 3bd787a4bb [FIX] point_of_sale: prevent adding extra rounding line
Steps to reproduce:
1. Make a cash rounding method, make it specific to cash
2. Add a product line with non-rounded price
3. Enable invoice, and add a customer
4. Make a payment with a combination of cash and bank
5. Validate, an error appears that "the move is not balanced".

The issue is there is a rounding line added, that should be removed.
However, here `unlink` and `write` methods, trigger a dynamic sync
operation that re-generates the rounding line, making the move
unbalanced.

To fix the issue, we can prevent the sync operation, so that no extra
rounding lines are added.

opw-3180708

closes odoo/odoo#114020

X-original-commit: 3bd28525d9486e2f33b8d338c39675125fa22d7a
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
2023-03-01 23:28:35 +01:00
Kevin Baptiste 0f2e567ff3 [FIX] hr_holidays: show sum of closest allocations
In the time off dashboard, only the number of available days of the
first closest allocation to expire was shown, which is not correct.

If you have many allocations expiring on the same day, their sum should
be shown.

task-3203519

closes odoo/odoo#114010

X-original-commit: ff35654ae8c44014aab99ec07493f035e9a2d80d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-01 23:28:32 +01:00
Samuel Degueldre 7d451e2200 [FIX] point_of_sale: fix crash when switching to pos in new tab
In odoo/odoo#112219 the closePos method was moved to the pos store, but
one call site was improperly adapted and tried to call the closePos
method on the Chrome component instead of on the pos store, this commit
fixes that.

closes odoo/odoo#114009

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-01 23:28:29 +01:00
Hansun (hale) fd30bdeffb [FIX] website_crm_partner_assign: foolproof translation for partner lvl
To reproduce the issue:
1. Add French as a language to your profile
2. Install [CRM], [Resellers] on Apps
3. On [Settings]>[Website]
- set the language to French then SAVE
4. Go to [CRM]
- click [Configuration]>[Partner Level]
- click Gold
- click [Go to Website] at the top right corner
- adjective and subject order is not natural for French speakers

Desired behavior: Remove the word 'Partner' (show level only)

Impacted versions: 14.0 up to master

opw-3160102

closes odoo/odoo#113999

X-original-commit: dd5446c66aba2a86ef331e7e832d44f0f22d7142
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-01 23:28:27 +01:00
xO-Tx 4de7f5f785 [FIX] website: open the right EditMenuDialog for content menus
To reproduce the issue:

- Go to website > In a website page with content menu (Event,...).
- Edit mode > Click on a menu item > Click on the "Edit Menu" on the
displayed link popover.
- A dialog to edit the menu appears, but this time it targets the main
website menu instead of the currently edited one.

Starting from [1], an OWL component `EditMenuDialog` is used to edit
website menus. It gets the targeted menu as a `rootID` prop value and
fallbacks to the current website main menu if this value is not
provided.

The goal of this commit is to target the right content menu by providing
the corresponding `rootID` value.

Remark: before [1], a different code was used to open the "Edit Menu"
dialogs and it was based on sending a `beforeReloadCallback` to the
`edit_menu` action (to save page updates once the menu edition is saved,
before finally reloading the page). Now, this callback is sent as a
`save` prop value to `EditMenuDialog`, which means the old callback is a
dead code => removed in this commit too.

[1]: https://github.com/odoo/odoo/commit/2c77b90eee4945d25e9d7f0ffe24484cf91b650a

task-3172234

closes odoo/odoo#113995

X-original-commit: 15deee2424434e9f520a8651b771627704a784a5
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-03-01 23:28:24 +01:00
Dossogne Bertrand 13c575afde [IMP] hr{|_hourly_cost}: move employee currency field
This commit moves the currency_id field on the
employee model from hr_hourly_cost to hr in order
for it to be used in payroll localisations.

task-3029348

closes odoo/odoo#113992

X-original-commit: 60599b735568c1873fdfde85e667b05347432382
Related: odoo/enterprise#37661
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-03-01 23:28:18 +01:00
MerlinGuillaume d1d3992dc0 [FIX] web: add Mongolian moment locale
An error is raised when trying to render date picker with the Mongolian
locale

Steps to reproduce:
1. Install Sales
2. Install and switch to Mongolian language
3. Open Sales and create a new quotation
4. An error is raised: `locale() locale mn-MN is not loaded from moment
   locales!`

Solution:
Add the Mongolian locale. It is not present in the version of Moment.js
we use (2.19.3) so we get it from a newer version (2.29.2)

Problem:
The Mongolian locale was unintentionally removed in this PR
https://github.com/odoo/odoo/pull/111986 so we add it back

opw-3188184

closes odoo/odoo#113983

X-original-commit: 055c13af01c445c5e105d63ea3cd98e3ad2915a8
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-03-01 23:28:13 +01:00
Adrien Widart (awt) ff75b9d4f4 [FIX] purchase_stock: add POL to existing PO if draft
To reproduce the issue:
1. In Settings:
   - Days to Purchase: 10
2. Create two products P01, P02:
   - Storable
   - With the same seller
     - Delivery Lead Time: 1.0
3. On replenishment page, create a new line:
   - Product: P01
   - Min Qty: 1.0
4. Order once
   - a RfQ is created and the order deadline is in ten days
5. Time travel to the next day
6. Repeat steps 3-4 with P02

Error: a second RfQ has been generated. However, as the first one is
still in draft state, the POL of P02 should be added to that first RfQ

When processing the orderpoint of P02, at some point, we try to find
an existing RfQ with its order deadline equal to `today + 10 days`.
Since we are the next day (step 5), the order deadline of the first
RfQ is `today + 9 days`, so we don't find it.

OPW-3047931

closes odoo/odoo#113982

X-original-commit: 8bf7f9038915be520488b2602c20929ca115a033
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-03-01 23:28:10 +01:00
std-odoo 5d15afdb30 [FIX] google_gmail: remove the constraint on the from_filter
Bug
===
Remove the constraint on the from_filter for the Gmail outgoing mail
server, because it can be used for custom domain name, and we can allow
an email address to send as an other one.

E.G. if the user has an email address "admin@mycompany.com" and he
activated "all addresses from the domain", he would be able to set
- email: admin@mycompany.com
- from_filter: mycompany.com
to use the mail servers for all email addresses in the same domain.

Task-3169015
Ticket-3141747

closes odoo/odoo#113959

X-original-commit: e9426c8b7bd4eb3d5c2c1c89fcf6ee3bdef95b3b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-01 23:28:07 +01:00
momegahed e429addc1d [FIX] web: invoice preview is not rendered correctly
Steps to reproduce:

- go to any invoice
- click on Preview
- the lines after the invoice number are in separate rows

Bug:

here is bootstrap 4 implementation of `.col-3`
```
.col-3 {
  -ms-flex: 0 0 25%;
  flex: 0 0 25%;
  max-width: 25%;
}
```

and here is bootstrap 5 implementation:
```
.col-3 {
  flex: 0 0 auto;
  width: 25%;
}
```
we can notice that bootstrap 5 changed the way that the width is
applied to the flex object.

now in https://github.com/odoo/odoo/pull/51715

the width property is overridden for the class `.col-auto` which is
not useful in bootstrap 5 anymore anyway. This creates a problem with
elements that are both `col-auto` and `col-3` as the override from
`col-auto` misses with the new `col-3` implementation

Fix:
remove the override of `width`

OPW-3171131

closes odoo/odoo#113938

X-original-commit: b9d19643cbdfb58531f5bd7020f26c905df9c5b8
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-03-01 23:28:02 +01:00
Maruan Aguerdouh (magm) da6bf603ee [FIX] web: fix pie chart when no data and when negative and positive data is mixed
Steps to reproduce:

1. Install Dashboard & Inventory (enable multi-locations)
2. Make inventory adjustments to have a location with negative stock
3. Go to the dashboard app & click on “Inventory On Hands”.
4. An error shows up: TypeError: chart.dataSource.getData() is null

Issue:

If one of the locations have negative stock, the pie chart will not be
displayed and it will throw many errors, It has the same behavior If
every location have negative stock.

Solution:

Discussed with the PO, when we have positive and negative values, we
want to ignore the negative values and display the pie chart with the
positive values only. For this case, we modified `_prepareData` and
`_isValidData` methods so they check and filter the positive values in
case we have any. For the other case when we don't have any data, that
can be displayed in the pie chart, we added a way to don't get any error
and only display a blank pie chart.

opw-3103967

closes odoo/odoo#113794

X-original-commit: 3fdfc357097fc77cb998e8a6794efe1f9ffa53bb
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-03-01 23:27:58 +01:00
Martin Maes 0967efaa24 [FIX] delivery: pick up point delivery address not showing
Fixed the problem where the address of the delivery was not correct on
	- emails
	- order pdf
	- order confirmation page

The solution is to create a new partner of type delivery linked to the existing partner.
We first check if the partner exists based on the address to avoid creating an infinite number of res.partner

Fixed the problem where the non-logged user could not check the pick up locations

Remove the possibility to pay if no carriers are selected

closes odoo/odoo#105848

Related: odoo/upgrade#4124
Related: odoo/enterprise#33986
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-03-01 23:27:55 +01:00
Martin Maes cb1b5970a5 [IMP] delivery: Sendcloud and Fedex delivery points
The main goal of this commit is to add the possibility to use delivery/pick up points with the carrier Sendcloud.
The user can check the "Use Sendcloud Location" on the shipping method and choose the radius and radius unit to limit the distance between the address of the recipient and the pick up point.

As Fedex already had a similar feature and to prepare the pick up points implementation for future carriers, we factorized the existing Fedex code into the website_sale_delivery module.

The issue where it is impossible to select a pick up location when there is only carrier has also been fixed.

The factorization applies to :
	- /controllers/main:
				- set_access_point sets the address of the access point directly in the order
				- get_access_point retrieves the data set in set_access_point
				- get_close_locations calls the API of the carrier and returns the pick up locations obtained

	- /website_sale_delivery.js:
				- getCurrentLocation retrieves the location already set in the order and displays it
				- _onClickShowLocations displays a dropdown with all the pick up points available in the area
				- _displayCarrierDropper displays the button showing the dropdown
				- _onClickLocation sets the location in the order

Part-of: odoo/odoo#105848
2023-03-01 23:27:55 +01:00
Stanislas Gueniffey b100626de0 [FIX] web_editor: allow copy-pasting link target
The `target` attribute for a link specifies where that link should open
(for example, in a new tab). Previously, copy-pasting links in the
website editor (within text blocks for example) would remove the
`target` attribute. This implied loss of functionality.

This commit whitelists the `target` attribute to fix that behavior.

task-3184150

closes odoo/odoo#113908

X-original-commit: 1464752aca36198e5fed5dc8f5b5041244e6e4a9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-03-01 22:35:53 +01:00
Stanislas Gueniffey 866ee94791 [FIX] web_editor: allow html if data-oe-type=html
The `isHtmlContentSupported` function incorrectly returned `false` for elements
inside `data-oe-type="html"` nodes even though those in fact do support html.

task-3184150

X-original-commit: 7d9a040fdefa527ace3150e39a03b833024b7973
Part-of: odoo/odoo#113908
2023-03-01 22:35:53 +01:00
qsm-odoo b20f120cab [FIX] web_editor: properly hide fa sizes buttons that should be hidden
Commit [1] added buttons with a `data-dependency` equal to "fake",
thinking it would hide those buttons automatically as the "fake" widget
would not exist. Somehow this got merged despite the fact that was not
working (testing probably focused on the more important things [1] was
fixing). At some point, using a fake dependency was hiding an element
but this changed one year earlier with [2].

This commit explicitly hides widgets with `data-dependency="fake"`.

[1]: https://github.com/odoo/odoo/commit/f59affcdfe9529645a02680214f3d7d96ebacf6e
[2]: https://github.com/odoo/odoo/commit/e927d1e89bc124002bb5e0b69dee711ea0d8147c

task-3208632

closes odoo/odoo#113936

X-original-commit: 7a46759a529b2d781585e0dbcb99bf7084c88007
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-01 20:55:02 +01:00
Romain Derie 1d309793d4 [FIX] website_blog: show search bar even if more than one blog
Commit [1] hid the blog navigation bar if there is only one blog.
It made sense as that navigation bar purpose is simply to select a
specific blog and not "all".

But commit [2] introduced a search bar in that blog navigation template
which was hidden if only one blog existed.
It does not make sense as the search targets blog posts which you still
want to be able to search even if you have a single blog.

This commit fixes that by moving the visibility condition from the whole
container (which includes both the search bar and the navigation bar) to
the navigation bar only.

[1]: https://github.com/odoo/odoo/commit/0a540e0ef25a439e29a762de5b35a2c6a63ad7f7#diff-6ed720c420b3e0591aeaf1c45061775765e1901d1592c46eb36b804c4c7c39f5R8
[2]: https://github.com/odoo/odoo/commit/ea009585e1d14041fe19f1e6e190b286e96c0681#diff-6ed720c420b3e0591aeaf1c45061775765e1901d1592c46eb36b804c4c7c39f5R24

closes odoo/odoo#113928

X-original-commit: 1e0bd3143623d89f504e67fb74e0f56b540530cc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-01 20:54:59 +01:00
gawa-odoo 4fc16e94a7 [FIX] l10n_de{,_skr03,_skr04}: change tax report lines name and order
The regulation for the German tax report has changed.
We adapt it and its export to the regulation (that changed in Jan 2023)
The reference for this tax report comes from https://www.bundesfinanzministerium.de/Content/DE/Downloads/BMF_Schreiben/Steuerarten/Umsatzsteuer/2022-12-21-muster-der-vordrucke-im-umsatzsteuer-voranmeldungs-und-vorauszahlungsverfahren-fuer-das-kalenderjahr-2023.pdf?__blob=publicationFile&v=1
and from elster.de

We can see some lines are wrong.
Some categories are also not well-ordered.
Some indentation should be done better.
Some taxes had to change, as the report lines they were pointing to should not exist,
and the tax row had to be added
Some taxes should point to a tax report line when they were not.

A migration script has been added to transform the tag of the amls who have '+68'/'-68' to the same for '60'.
The reason being that this tag was used for the `account.sales.report`.

opw-2767535
opw-2974560
task-3082233

closes odoo/odoo#113864

X-original-commit: 5ef2970f6197b6e4353a96389f68e8ea29fb998c
Related: odoo/enterprise#37615
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-03-01 18:43:01 +01:00