Commit Graph
164380 Commits
Author SHA1 Message Date
Julien Carion (juca) 7e6dd0e7c0 [FIX] mail, hr: fix avatar card popover
This commit introduces various fixes regarding the avatar card.
First one makes sure that the avatar card popover won't launch when
there is no user image associated with the many2one_avatar_user_field.
Second one prevents the card from opening when the related model is not
"res.users".
Third one allows to display the phone number of users even without hr
installed and makes sure that the work_phone and work_email are shown
in priority if available when hr is installed.

Direct fix to Task-3167110

closes odoo/odoo#129876

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-02 15:59:50 +02:00
Jurgen (jugj) f1e17a30f7 [IMP] fleet : Add D.E.A history view for Belgium
In this PR we add the automatic encoding of disallowed expenses rates for fleet based on tax deduction
task-3186404

closes odoo/odoo#125548

Related: odoo/enterprise#42768
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-02 15:59:33 +02:00
Pierre-Yves Dufays 169eaec793 [IMP] base,test_new_api,website:prevent merge of partners with more than 1 user
We prevent to merge partner linked to more than one user (by raising an
exception) to avoid having multiple user pointing to the same partner as a
consequence of a merge.

We want to avoid this situation because it generates weird behaviors. As
res.user inherits from res.partner, having multiple user pointing to the same
partner makes the fields of that partner shared with all those users. This was
decided following the tentative to improve partner merge in website_slides
(odoo/odoo#114840), where we also noticed strange behavior like completing a
lesson with one user were adding karma to all the users linked to a same
partner.

We have also adapted WebsiteVisitorTests tests in website that were failing
because they were merging partners with more than one user: simply by merging
partners with only one user.

Task-3167160

closes odoo/odoo#125322

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-08-02 15:59:24 +02:00
Hugo Carlier (Huca) ebfb7112c5 [IMP] project: modify the behavior of parent tasks deletion
Before this commit, when deleting a task with subtasks, only the parent
task was deleted. As child tasks are the required to have the same
project_id as their parent, they could end up views of another project
with no clear link to it. Generally speaking, keeping child task, when
their container (parent task) is removed does not make sense.

Therefore, this commit changes the default behavior for task
deletion. When a parent task is removed, all its child tasks are removed
as well. To avoid such a behavior in exceptional situation where child
task can make sense without their parents, the user first need to remove
this link before unlinking the parent task.

A warning is added in all the views where a task can be deleted (form,
calendar and list) to warn the user of this new behavior when he deletes
a task.

task-3044991

closes odoo/odoo#121260

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-02 15:59:20 +02:00
Jurgen (jugj) a64a8b7813 [IMP] hr_contract : Rework the contract form view to make it lighter
In this PR we make several UX changes that should make the life of the user easier:
- Add the possibility to upload personal documents in the contract
- Fine tuning of some fields (control of exclusive fields, conditional appearing of certain fields to not overcharge the display)
- Improve the order of tabs and their layout

task-3069359

closes odoo/odoo#122116

Related: odoo/enterprise#39804
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-02 15:59:16 +02:00
Alexandre Kühn 0f6e28098e [FIX] mail: starred counter should have muted background
Before this commit, all badge color matched the messaging menu
color badge. Most badge counter in discuss show needaction counter,
so it makes sense to have a catchy color scheme (e.g. white text on
red background).

For starred counter in discuss sidebar, the counter is meant to see
at a glance how many messages are starred, without it being too
catchy.

This commit fixes the issue by introducing a `o-muted` modifier on
`o-discuss-badge`, which displays a grey background for starred
counter.

Also fixes a bug in dark mode where badge background color was
incorrect.

closes odoo/odoo#130452

X-original-commit: de232c330140fd4156e7f416fddfce88b21e71c5
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 14:41:33 +02:00
Valentin Chevalier 8d8637453e [FIX] payment_stripe: don't show button when there is nothing to pay
When applying a coupon, the amount can be totally covered, with nothing
left to pay. Express Checkout buttons should not be shown in that case.

After this commit, Stripe's Express Checkout buttons will not be shown
if the amount is not defined.

opw-3427969

closes odoo/odoo#130450

X-original-commit: 87e24d16c3dde8ab03d7c966b532f75a8c40ac30
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-08-02 14:41:26 +02:00
Martin Trigaux 360915b3f0 [FIX] base: remove wrongly untranslated term
The label was already Status on the field but not in the search view.
"State" is always used for the meaning location.
Sharing the same term meant it was not possible to have two different
translations.

closes odoo/odoo#130444

X-original-commit: 70fcdf30fc842410aafa9e61d2a1903589a15311
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-02 14:41:18 +02:00
Alexandre Kühn 30a0c7a84a [FIX] mail: vertically align subtype description and tracking value
Follow-up of [1]

Before this commit, when a message had both subtype description and
tracking values, they were displayed horizontally instead of
vertically.

This happens because [1] set `d-flex` on `textContent`, which is
horizontal by default. This assumes there's only 1 HTML node for
actual `textContent` so that message action list could be
positioned next to 1st text content line.

However, when message has subtype description and tracking values,
there is more than 1 HTML node in `textContent` and the intended
visual is showing them in `d-block`. This `d-flex` made them display
horizontally instead of `d-block`.

This commit fixes the issue by having a single actual HTML node in
`textContent` when there's a subtype description and some tracking
values. This allows to position `textContent` parts as desired
(e.g. with `d-block`) while having position of message action list
working as intended in original template of `Message`.

[1] https://github.com/odoo/odoo/pull/128940

closes odoo/odoo#130435

X-original-commit: 469f46c602c842c7a7fae49e0af701e979ff18ba
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 14:41:13 +02:00
vlst e5500cd788 [FIX] point_of_sale: Error pos category
Impacted Version : Master only

Issue: Traceback when clicking on the `New` button
in the `POS Product category` view. 

Steps to reproduce :

	Step 1: Open POS 

	Step 2: Go to Configuration

	Step 3: Open product category

	Step 4: Click on New -> traceback appears

The cause of the issue is trying to access properties
on a record that is not yet created.
The solution is simple: we adapt the code such that it
can handle the case where the record is not yet created

closes odoo/odoo#130398

Task: 3450117
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-02 14:41:10 +02:00
Didier (did) 93f134d640 [FIX] im_livechat: reintroduce history command
task-3435244

closes odoo/odoo#130362

X-original-commit: 2e834a8439cc260c25d95233492df13e9b77c2de
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-02 13:20:34 +02:00
Jorge Pinna Puissant fa5c70d61d [REF] web: RelationalModel: unity always return an object for many2one
Before this commit, in some cases (many2one invisible) unity returned
an integer as value.

Now, to be consistent, unity always return an object for many2one.

Note that, web_read_group still returns an array as value for many2one.

part-of task-id~3179751

closes odoo/odoo#130340

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-02 13:20:30 +02:00
Pierre Pulinckx (pipu) 09535ef5e6 [REF] website_*: Change registerTours of tour_utils
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/odoo#130248

Related: odoo/design-themes#678
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:23 +02:00
tsm-odoo 7b88ae4760 [FIX] mail, *: start bus service lazily
*: im_livechat, web.

Since [1] the messaging service is added to the livechat embed
bundle. As a consequence, the bus service is started even when
it is not needed. This is wrong since it would lead to lots of
useless connections to be made.

This PR prevent mail services from starting the bus eagerly in
this context and adds a tour in order to prevent further errors
on this matter.

closes odoo/odoo#130059

X-original-commit: b2bcef3c3b57061ef0694a5fc3c326cc8babc818
Related: odoo/enterprise#44782
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 13:20:11 +02:00
Julien Carion (juca) 6da48dbc95 [IMP] web: add show weekends to calendar
This commit adds the "show weekends" functionality to calendar which
allows the user to choose whether weekends should be shown in the calendar
or not (defaults to false).

task-3425523

closes odoo/odoo#129107

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:07 +02:00
Matheus Leal Viana (malv) 07cf57b2dd [FIX] account,l10n_be: Translate BE reconcile template
Versions:
---------
- saas~16.2+

Steps to reproduce:
-------------------
1. Install Belgium accounting module
2. Switch to the company with the template
2. Go to Accounting -> Bank -> Reconcile Items

Issue:
------
Translations are only being loaded in French

Cause:
------
There is no translation assigned to the other
expected language: English, German and Dutch,
and the field name of `account_reconcile_model`
did not have the parameter translate = True

Solution:
---------
To fix this issue we have to add the respective
translations using name@Lang and add the parameter
`translate = True` in the field name of
`account_reconcile_model` so that the translations
can be loaded to this field.

OPW-3316716

closes odoo/odoo#126542

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-08-02 13:20:03 +02:00
Ahmed Khalaf be8e6281f6 [IMP] stock: optimize move reservation
This commit improves the performance of reservation by removing
the `get_available_quantity` and `update_reserved_quantity` inside
`_action_assign` which each does a search on quants with the same domain,
both of which are done per move to assign.

Instead the quants needed by the moves to reserve are fetched first and
are then filtered in memory for each move to reserve from.

A new function is provided `get_quants_by_product` which should be used
when reserving moves to fetch the relevant quants once and then call
`_update_reserved_quantity` on them which will filter them in memory.
This avoids searching for quants for every move.

The changes in `point_of_sale` and `product_expiry` are all
due to the the method signature change and change nothing in the flow.

Performance stats:

These stats are from the Odoo profiler on the `_action_assign` called
on a specific number of moves. For each number of moves the duration was
taken multiple times and the average was taken. The 10 moves durations
were quite random since the numbers were very small and could be considered
an outlier.

Before this commit:

| No. of Moves  | SQL Queries | Duration (s) |
| ------------- | ------------- | ------------|
| 10  | 70  | 0.044440283 |
| 100  | 633  | 0.398992664 |
| 1,000  | 4,518  | 6.264924025 |
| 10,000  | 46,954  | 79.76809310 |

After this commit:

| No. of Moves  | SQL Queries | Duration (s) |
| ------------- | ------------- | ------------|
| 10  | 62  | 0.062840558 |
| 100  | 540  | 0.323033646 |
| 1,000  | 3,893  | 4.062329989 |
| 10,000  | 39,259  | 49.92596793 |

Besides 10 moves duration, there's a general performance
improvement of 20% - 35%

closes odoo/odoo#116803

Related: odoo/enterprise#40633
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-08-02 13:19:55 +02:00
adsh-odoo 40b17cee0f [FIX] crm: update the helper store
As the "Create" button is renamed to "New" so update it and remove "top left" in
helper to enhance clarity and avoid any confusion.

Task-3420529

closes odoo/odoo#130432

X-original-commit: 7a1bcb9c74eb48877731367b3da95c1eec7db19b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-02 06:18:53 +02:00
Brice bib Bartoletti 44a9c61ea5 [FIX] l10n_gr: make tax data comply with constrains
The aim of this commit is to correct the tax data

Context:
The constrains linked to tax repartition line aren't triggered.
This resulted in some invalid data to be merged.

Before the commit:
l10n_gr contains invalid tax data

After the commit:
l10n_gr tax data are valid

closes odoo/odoo#130426

Task-id: None
X-original-commit: 671d8fc49e3386ab7117b46f03a6fd4118ac22b9
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-02 06:18:50 +02:00
Guillaume (gdi) ca10ad3c2a [FIX] website: ignore carousel slides for history step
When you drop a block containing a carousel, you can change the slide.
Unfortunately, in edit mode, changing the slide creates a step in the
history (you slide in the other direction by pressing CTRL-Z). This is
not what you want.

task-3356629

closes odoo/odoo#130417

X-original-commit: 5c68489c4220fe50c26168f2fb98546626b36e78
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-08-02 06:18:43 +02:00
Julien Alardot (jual) 029a1ab2cc [FIX] hr_expense: Fix rounding mismatch
When paid by the company in another currency
with at least one tax, there may be
a rounding difference between the move and the expense

task-3390444

closes odoo/odoo#130397

X-original-commit: c889dcc83daeaccb09b7692e430e232778fc031d
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-08-02 06:18:39 +02:00
Julien Alardot (jual) a1d92ddd4a [FIX] hr_expense: Fix reports and moves accounting date
The accounting date on the report sheet and the linked
moves are always set at the current date

We want the accounting date to be the expense date,
or the most recent expense date when possible

task-3390444

X-original-commit: f1d03364230058f77f23bf0083e2757c8cd98e9a
Part-of: odoo/odoo#130397
2023-08-02 06:18:39 +02:00
MerlinGuillaume 86399fc785 [FIX] web: ignore incorrect Safari errors
Steps to reproduce: (on Safari only)
1. Install Email Marketing and Mass mailing on sale orders
2. Open Email Marketing and try to open 'Our last promotions, just for
   you!'
3. An error is thrown

Solution:
Ignore errors raised in Safari

Problem:
Error "ResizeObserver loop completed with undelivered notifications." is
raised by the ResizeObserver in
`mailing_mailing_view_form_full_width.js`. However in Safari (and
desipte the ResizeObserver flow being exactly the same than in other
browsers), the error message is "Script error." so we are not able to
correctly discard it in the error listener of `error_service.js`

opw-3339673

closes odoo/odoo#130389

X-original-commit: d00144d1198131ba7c68466b514518ca056ceef0
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-08-02 06:18:32 +02:00
aktr-odoo 2e35ae4194 [FIX] l10n_es_edi_facturae: handle traceback while send an invoice to partner
When the user attempts to send an invoice to a partner whose country code is not
set.

Steps to produce:
- Install sale_management,l10n_es_edi_facturae
- Open invoicing module > Create a new invoice
- Select a customer who does not have set country_id.
- Click on Add a line > Select any product
- Click on Confirm > Click on Send & Print > Click on save
- Click on Send & Print
- Error will be produced

This commit addresses a `KeyError False` while the user attempts to send an
invoice to a partner without a set country code. The function
`_l10n_es_edi_facturae_export_facturae` uses the partner's country code but
the partner doesn't have a set country code. As a result, a `KeyError` traceback
is generated.

Sentry-4330095746

closes odoo/odoo#130382

X-original-commit: 421d370ed30ff92a85bf7db0f4d6f1f3431b2b34
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-02 06:18:20 +02:00
Guillaume (guva) a72299fef1 [FIX] account: tax details query
When having a cash rounding line on an invoice,
base amount is taken twice into account in the tax
report when grouping by account > tax or tax > account.

Steps:

- Activate cash rounding, and create one with
  0.05 rounding, method 'HALF_UP' and
  'biggest_tax' strategy
- Create an invoice with a product line with
  unit price 1.24$, tax 15% (included in price)
- Select the rounding method created above.
- A rounding line for tax 15.0% and 0.02$ should
  have been created
- Go to tax report and group by Account->Tax or
  Tax->Account
-> Base amount is 2.48 instead of 1.24

opw-3336398

closes odoo/odoo#130375

X-original-commit: 34721726676dbee8b13dc19f449e5307140b6086
Related: odoo/enterprise#44934
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-08-02 06:18:16 +02:00
Samuel Degueldre c4b7d65e2e [FIX] web: stop leaking event listeners on EventBus in QUnit suite
In odoo/odoo#120893, the mail team changed their test utils so that they
would always start all services. This can cause issues because services
do not have any built-in destruction/cleanup mechanism, as in a
production application they are only supposed to be started once. Some
services add event listeners on global objects, in particular, the
tour service adds an event listener on the tour registry which is
global. If this event listener is not cleaned up, every time the tour
service is started, a reference to the environment in which this tour
service is being started is leaked. Since the environment contains all
started services, it is typically a pretty heavy object, especially
since in this context, all services are started instead of a select
subset.

This commit fixes that by patching the EventBus class to automatically
remove event listeners that were added on an event bus after the test,
in a similar fashion to what we do for some global objects like window
or the document's body.

closes odoo/odoo#130373

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-02 06:18:09 +02:00
Maximilien (malb) 182c8b0b84 [FIX] hr_expense: Fill payment_mode
When creating a new expense sheet the payment_mode is empty by default. When adding a new expense to it, the payment mode of the expense itself should be filled with 'own_account' but if the payment mode of the expense sheet is set, the payment_mode of the expense related will be the same as the expense sheet.

closes odoo/odoo#130372

Task: 3382023
X-original-commit: 662c98fb19aeef331f110d6dc4a3d68890af7df4
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-08-02 06:18:06 +02:00
Gauthier Wala (gawa) c83b7e80a4 [FIX] account: frequent tax undeterministic result
- Create a db with account installed (and a random loca)
- Run the test "test_quick_edit_total_amount"
=> The test may fail (undeterministically), especially the first time

The reason is that we don't have an order in "_get_frequent_account_and_taxes"
So, if we have the same number of lines with the same account and with a tax or without one,
we can not guarantee which tax is considered the most frequent.

We now define the order by saying that we should take the taxes into account,
so lines with taxes take precedence on lines without

Linked to runbot error 23385

closes odoo/odoo#130326

X-original-commit: bdb21983371fb62b01275471e8ca7099219e1053
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-02 05:11:10 +02:00
Guillaume (gdi) 952c9b4c73 [FIX] website: fix theme previews in right to left languages
Since Odoo 16.0, the configurator is translated in the user language.
Unfortunately, the theme previews are not yet translated in the user
language, so the user sees the theme previews in the default language
(English) but on a rtl page which causes alignment issues on the themes
previews. This commit fixes this issue by forcing the SVG containers
to be in ltr.

Steps to reproduce the issue fixed by this commit:
- Set the Arabic (Syria) language for an internal user
- With the internal user, create a new website
- Follow the configurator (in Arabic) until the theme selection step

=> Some text in the theme previews are not aligned correctly.

task-3398707

closes odoo/odoo#130325

X-original-commit: 1d0671a22582f423e55aad2907340700697c966e
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-08-02 05:11:03 +02:00
Laurent Smet dfd38a6a5a [FIX] account: Take care of res.partner.bank owned by another company.
We need to take care of the `unique(sanitized_acc_number, partner_id)` constraint
and avoid to create a new bank account if already exists in another company.

closes odoo/odoo#130324

Task: 3432443
X-original-commit: bc4cbd0e129d7f9d417752e162397ece5e1bfc0f
Related: odoo/enterprise#44903
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-02 05:10:55 +02:00
Laurent Smet ec44d4596e [FIX] account: Take care of archived res.partner.bank in _find_or_create_bank_account
We need to take care of the `unique(sanitized_acc_number, partner_id)` constraint.

Task: 3432443
X-original-commit: 687bc145c8889d05ee816b0cd8ed0378c301b4e7
Part-of: odoo/odoo#130324
2023-08-02 05:10:55 +02:00
mehjabinfarsana bb167d60e3 [FIX] l10n_sa_edi: make user error message translatable
before this commit, the user error message
on changing ZATKA submission mode
was not translatable
to user language

after this commit, user error message
will be shown in user's language

closes odoo/odoo#130323

X-original-commit: e00e253658cb0eefa8ea0f726f0a3bec6eaca7e6
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-08-02 05:10:51 +02:00
Benoit Socias cd46857b15 [FIX] web_editor, website: use dataset mimetype when modifying images
Since [1] the mimetype used when calling `modify_image` was obtained
from the data URL contained in the `src` attribute instead of the
dataset. This is wrong for background images because they do not have an
`src` attribute.
Thanks to [2] which repaired the value contained in `dataset.mimetype`,
this value can be used as it was before [1].

[1]: https://github.com/odoo/odoo/commit/0449fe85cb0e1d639a4e1aeba26e90906f79254d
[2]: https://github.com/odoo/odoo/commit/40811e72c50faf146ccdf9f26c332db9ebc69fa9

task-3446438

closes odoo/odoo#130322

X-original-commit: e3221fe5d5efa824365210f040e93654e0a30309
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-08-02 05:10:48 +02:00
Victor Feyens 14acd8599e [FIX] website_sale: make test more reliable
The test test_update_cart_zero_qty was checking the total amount
of the cart, but depending on installed localizations, the taxes
vary and the test can fail.

This commit changes the check to the untaxed amount to make sure
the test only depends on the sales price of the product defined in
the test setup.

closes odoo/odoo#130319

X-original-commit: a2c693795081953ed0ba07bfad210701fcf6f1f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-02 05:10:44 +02:00
Prakash Prajapati 6be8aeb376 [FIX] project: set correct company in project
steps:
   - install account module
   - Create company Odoo IN
   - Got to account > Configuration > analytic Plan
   - Open Project and set company as Odoo IN
   - install project module

issue-
   Analytical plan and project both have different company so traceback come up.
Fix:
   We have set company of analytic plan in project company.

task-3138082

closes odoo/odoo#130318

X-original-commit: d6171eb1c0e94cb1a22241dd250bc23247de3481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-02 05:10:41 +02:00
Victor Piryns (pivi) ed77febae6 [FIX] sale_timesheet: don't include expenses when printing Timesheets
Issue:
Follow up on #128432, but this time it's removing expense lines from
the pdf report when we print the Sales Order that has both
timesheets, and posted expenses.

Steps to reproduce:
- Install Sales, Timesheets, Expense
- Create an SO and sell a service that creates a Task > Confirm
- Log some timesheet on the task (3h for ex.)
- Create an expense related to the SO, approve it and generate the
  journal entries.
- Print > Timesheets on the SO
- In the pdf, we have table row entries for the expense lines.

Cause:
The report is basing itself on `timesheet_ids` to print the report,
those might include expense lines.

Fix:
Add a domain on `timesheet_ids` to exclude lines that don't have a
`project_id` set, those are not timesheet, so can be expenses. We
want to exclude those.

Affected versions:
16.0 up to master

Reference:
opw-3342274

closes odoo/odoo#130315

X-original-commit: c55f01cff7e415c48f823201ace63074bf9a9146
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-08-02 05:10:37 +02:00
Loukas Wets (lowe) 442a79eeb0 [FIX] point_of_sale: order name handling in order setup
The setup function was not correctly handeling Order.name when given in
options. It was regenerating it instead of using the one given in option.
For self orders it was changing the prefix from Self-Order to Order.

closes odoo/odoo#130310

X-original-commit: 11a4beea5cbcd817cca02d81b772a5e8b3d097b6
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-02 05:10:29 +02:00
Ahmed Mohamed 2c9bb123ba [CLA] 0xSaltyHash Signature
closes odoo/odoo#130309

X-original-commit: f3db39880e4d72d821b48d6e2532bfe1fe6af8e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-02 05:10:21 +02:00
Adrien Widart (awt) ce24bd66c1 [FIX] sale_stock,stock_account,point_of_sale: post anglo saxon inv
There will be some access errors if an accountman tries to post an
invoice

To reproduce the issue:
1. Create a product category FIFO-AUTO
2. Receive a product of that category at $10
3. Sale, deliver and create the invoice for that product
4. Create a user with basic access to account app only
5. Switch into that user
6. Confirm the invoice

Error: An error access is raised, he can not post the invoice

In the invoice posting process, we try to read some other models
(pos order, SVL, and so on) but the user has not any access to them

OPW-3302458

closes odoo/odoo#130301

X-original-commit: fbd8c96d0ea097a23fc1e283721f8219fe7ebcd0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-08-02 05:10:14 +02:00
Didier (did) a1c079bbf1 [FIX] mail: fix nextMentionRpcFunction
Before this PR, the `nextMentionRpcFunction` was always undefined and therefor
never used. This could lead to some RPC being lost if the previous one was too
slow.
This PR fix the issue by directly using the `rpcFunction` that is already assigned.

closes odoo/odoo#130292

X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 05:10:10 +02:00
Kevin Baptiste fef71bac14 [IMP] hr,hr_recruitment: add Newly Hired filter
Moves the Newly Hired search filter from hr_recruitment to hr.
This new filter is available to all employees and not restricted to Officers.

task-3346478

closes odoo/odoo#123420

Related: odoo/upgrade#4759
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-02 02:24:46 +02:00
Adrien Minne (adrm) 5c37116a99 [FIX] spreadsheet: fix list context menu traceback
There was a traceback when right clicking on a spreaded cell beacause
of the list "see record" context menu item. Fixed it.

closes odoo/odoo#130289

Task: 3425493
X-original-commit: 330381dbeac9a4783d7cef8130471d81be214504
Related: odoo/enterprise#44892
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-02 01:15:56 +02:00
Antoine Dupuis (andu) daacd9adc0 [FIX] l10n_eu_oss: Create OSS account with correct tags
Bugfix. When installing l10n_eu_oss with l10n_de_skr03, an OSS account
'17010 Unsatzsteuer 19% OSS' is created. However, this account has
no account tags set on it, so it gets left out from the Balance Sheet
report. (Note that in Germany, due to there being two CoAs, the Balance
Sheet report still works using account tags.)

The solution: when creating the OSS account, re-use the account tags
of the account we are copying.

closes odoo/odoo#130287

X-original-commit: f541ef903085ed95b0aa0bc6d3e82bf9efa2a23d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-02 01:15:53 +02:00
Victor Feyens d364c0a57f [FIX] sale: unreliable test
The test test_product_quantity_rounding fails when the currency
of the company rounds to the unit (decimal places = 0).

This commit makes sure the test doesn't fail with that setup.

Cf runbot build error 20612

closes odoo/odoo#130285

X-original-commit: fae7beacd950fcc349728f98681b6aa281572aa4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-02 01:15:49 +02:00
Gauthier Wala (gawa) b6dfc455cc [FIX] account: Fix tour in multi enterprise
The tour failed as soon as there were several companies installed.
The tax created could be assigned to the wrong company, and as such,
not used in the tour.

Linked to runbot error 22953

closes odoo/odoo#130281

X-original-commit: a4ad0a8f36f4091da5de99c5a54326dce3784817
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-08-01 23:52:36 +02:00
Aaron Bohy c10b5d0b1b [REF] web,*: tests: remove legacyExtraNextTick
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.

Part of task~3439226

closes odoo/odoo#130236

Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 23:52:30 +02:00
Pedram (PEBR) a18b19284f [FIX] mail: TypeError in cleanTerm function when email is falsy
The `cleanTerm` function was throwing a TypeError ("term.toLowerCase is
not a function") when the email value of a contact was falsy (like
`false`, `null`, or `undefined`), as it was attempting to call
`toLowerCase` on a non-string value.

This was particularly problematic when two contacts had the same name
and at least one of them didn't have an email.

The solution was to make `cleanTerm` consider non-sring values as
empty string, preventing the TypeError when value is `false` from
partner having no email.

opw-3439376

closes odoo/odoo#130233

X-original-commit: 2abdf7a8635ed90f0ad26c6407b21cf3c8c60fcd
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-01 23:52:26 +02:00
Victor Feyens c2c35f32cc [FIX] product: default pricelist should take precedence over new ones
The default pricelist automatically created for companies if the pricelists
are enabled should (like it was before with the Public Pricelist record in
the data) take precedence over newly created pricelists record.

This can be enforced by creating the default pricelist with a higher priority
(lower sequence).

closes odoo/odoo#130232

X-original-commit: ea1e83514bd6190a516f2cf92f800625876b789e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-01 22:31:01 +02:00
Victor Feyens 13bfb9eecd [FIX] product: correctly create/unarchive default pricelist when enabled
X-original-commit: 5e8547288f83e484ced67c4e44fda6df544f3c09
Part-of: odoo/odoo#130232
2023-08-01 22:31:00 +02:00
Renilkumar Kajavadra 8f1565dd74 [FIX] l10n_it_edi: logger error to warning while receiving file from SdiCoop
When there is an error in the proxy for incoming file for specified proxy user
from SdiCoop.
It will raise proxy error in the terminal.

This commit will change logger error to logger warning.

sentry-4297451894

closes odoo/odoo#130229

X-original-commit: a2882524371f39b210984c50b5702f142dff76ee
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-01 22:30:55 +02:00