Commit Graph
160033 Commits
Author SHA1 Message Date
sofiagvaladze 7ca2d7dbd6 [IMP] base: UX improvement
Remove an option used by the phone widget in the res_user view.

task - 3246848

closes odoo/odoo#117805

X-original-commit: a998437ed465f1a2a0aaee3651472ff8c58ba067
Related: odoo/enterprise#39387
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 17:31:49 +02:00
Dylan Kiss (dyki) 6863e795c7 [FIX] l10n_be: change legal report name
English term changed in source. Dutch and French via Transifex.

task-3193776

closes odoo/odoo#117789

X-original-commit: 8225fcfe0de231788952ec4c9f6d0eabdc387aa5
Related: odoo/enterprise#39372
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-04-05 16:26:35 +02:00
Sébastien Theys e477c5d71b [FIX] mail: keep mentions when toggling composer or editing message
closes odoo/odoo#117786

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-05 16:26:26 +02:00
Florent de Labarre dc13a614c4 [FIX] stock: add index
Before this commit, in large database, openning a sale.order can take 3s.
Because in module sale_purchase_stock, _get_purchase_order use a On2many field : stock_move_ids, with inverse field group_id.

Now it takes 200 ms.

closes odoo/odoo#117738

X-original-commit: 5fc448e7f6dcce94fb89b23be29c4d38a525dd97
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-05 16:26:23 +02:00
MerlinGuillaume 6a148518d1 [FIX] web: get datepicker value from event instead of element
When we use a 12 hour time format (without the `%p`), the time set is
always in the morning regardless of the period used (AM or PM).
Using `preparse` and `postformat` in the locale to change the symbols
used for numbers prevents the user from changing the date in the
datepicker because the date will be unparsable

Steps to reproduce:
1. Install Calendar
2. Go to Settings > Translations > Languages and open 'English (US)'
3. Set the time format to `%I:%M:%S`
4. Open Calendar and create a new meeting in the morning
5. Edit the meeting, set the time period to 'PM' and save
6. The time of the meeting doesn't change

Solution:
Get the time from the event passed when we close the bootstrap
DateTimePicker and convert it to luxon.
The period displayed when we open the datepicker is always 'AM'. This is
a limitation with the bootstrap DateTimePicker that uses the value from
the element[^1] (which is already formatted with the 12 hour format,
without the period info). Hence, the time is always in the morning

Problem:
The value of the element is used to set the date but this value is
already formatted with the 12 hour format (without the period info) so
it's always in the morning

opw-3150033
opw-3233229

[^1]:https://github.com/odoo/odoo/blob/16.0/addons/web/static/lib/tempusdominus/tempusdominus.js#L395

closes odoo/odoo#117781

X-original-commit: dc195613ecff17d6aadc6e6ad8ab6da3670eb85a
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-04-05 15:11:46 +02:00
Aurelien van Delft (avd) f44c546570 [FIX] hr_holidays: speedup Time Off dashboard
When opening the Time Off App, the JS performs an rpc to call
hr_leave_type.get_days_all_request. Inside this method there are
some __get__ on non-stored computed fields. This triggers
a recomputation of said fields in _compute_leaves. _compute_leaves
uses _get_employees_days_per_allocation.

When there is an hr.leave.type with request_unit = 'hour', you may
get lots of validated allocations by employee. When this is the case,
_get_employees_days_per_allocation gets quite slow, especially the last
part about 'Future available leaves'.

This commit optimizes this part of _get_employees_days_per_allocation.
In this part the allocations are grouped by employees
and Intervals instances are of the form (start, stop, records). This means
that for a given employee_id, all the records of one Intervals will have
the same start and stop values. This allows us to move the call to
_get_work_days_data_batch outside of the
for future_allocation_interval in future_allocation_intervals._items loop.
Because _get_work_days_data_batch is quite expansive, moving it out
grealty speeds up the _get_employees_days_per_allocation method.

Example speedup: in a database with 50 validated allocations for
the same hr.leave.type and employee_id, the timing of
_get_employees_days_per_allocation 7.39s -> 158ms

opw-3123457

closes odoo/odoo#117778

X-original-commit: 5a2efd2e5c3e65502c031f79f85319f3351f66e3
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 15:11:39 +02:00
Yolann Sabaux 95d36e4049 [FIX] analytic, sale: use partner_name in newly created analytic account
Steps to reproduce:
- Activate Analytic Account
- Create a Service Product - create project on order
- Create a quotation with the product
- Confirm the quotation
- Go on the project -> analytic account is "order # - partner_name"
- On the quotation - Create Invoice

Issue 1:
- The invoice has "order #" has the analytic account and not the "order # - partner_name"

Issue 2:
- if you create an invoice and wants to select the analytic account
  you cannot search it by the partner name, only by the "order #"

Cause:
When confirming the quotation, we create an analytic account. The
default name of the analytic account is the order name:
https://github.com/odoo/odoo/blob/bba5b6a440544151cc610bbc6848adfbadb38bfb/addons/sale/models/sale_order.py#L1416

Why is the analytic account displayed correctly on the project?
Because we use the `get_name` is triggered:
https://github.com/odoo/odoo/blob/bff34e0e8a8b2d211ef90ffea4f43c514e8cad28/addons/analytic/models/analytic_account.py#L115-L123

In the analytic distribution view, we only render the name of the
analytic account as it is defined primarly.

opw-3165655

closes odoo/odoo#117770

X-original-commit: b709a4491074169f6203ba98dec8847036262d6d
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-05 15:11:36 +02:00
Odoo's Mergebot 2e4f04ec58 [FW][FIX] mail: prevent to call _message_compute_subject outside of a thread model
While we run cron `Data Merge: Find Duplicate Records` then it raises a traceback
because `data_merge. model` has no method `_message_compute_subject`

This thread method is called in various steps when trying to post or notify a
message. With this PR we ensure notifying non-thread models is still working
as intended by being defensive when calling this method.

sentry-3947126655
Task-3254379

closes odoo/odoo#117763

Forward-port-of: odoo/odoo#117636
Forward-port-of: odoo/odoo#113460
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-05 15:11:34 +02:00
Mahamadasif Ansari 5ad9686b2f [FIX] mail: composer non-thread _compute_subject
When using the composer on a non-thread model a notification is sent instead
of posting a message, as the model does not support the posting process.
However there is currently a crash due to the default subject computation
which is solved in this commit.

Task-3254379

Part-of: odoo/odoo#117763
2023-04-05 15:11:33 +02:00
Renaud Thiry 442467ceb8 [FIX] mail: handle non-thread model in _message_format
Calling _message_format on a anything but a thread could throw a traceback.

Task-3254379

Part-of: odoo/odoo#117763
2023-04-05 15:11:33 +02:00
mky-odoo 2cc2690c8f [FIX] mail: prevent to call _message_compute_subject outside of a thread model
While we run cron `Data Merge: Find Duplicate Records` an issue raises because
`data_merge.model` has no method `_message_compute_subject`. Indeed it is
possible to notify on non-thread models but that method is a thread-only
method.

In this commit, we only call `_message_compute_subject` when it's available
in model.

sentry-3947126655
Task-3254379

Part-of: odoo/odoo#117763
2023-04-05 15:11:32 +02:00
roen-odoo 7d9035c79a [FIX] point_of_sale: Correct margin for product with no cost
Current behavior:
In the pos order report the margin is not shown for products with no
cost.

Steps to reproduce:
- Create a product with no cost
- Open a pos session, add the product to the order and validate it
- Go to the pos order report and check the margin for the product
- The margin is not shown

opw-3232131

closes odoo/odoo#117723

X-original-commit: 223400d371615907a7ba7d5616ffeec307892f16
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-05 15:11:23 +02:00
Benjamin Vray 33dbc2d025 [FIX] website: fix header vertical template with off canvas menu
Steps to reproduce the bug:

- Go to the website edit mode.
- Choose the 'vertical' template header.
- Select 'off-canvas' in the 'mobile menu' option of the navbar.
- Bug: On mobile view, the menu links are not clickable.

This is caused by the addition of the "order-first" class to the navbar
by commit [1], which causes the menu to be placed behind the backdrop in
mobile view when off-canvas is activated. This only happens with
Firefox, and there is likely a difference in how Chrome and Firefox
handle the "order" property based on the positioning of elements.

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

opw-3009202

closes odoo/odoo#117683

X-original-commit: 7baa2d3e4949cf3c6e1b1130f03cc2b051dbff0f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-05 15:11:20 +02:00
Maximilien (malb) 41b39f2a57 [IMP] hr_expense: adding tooltip
Before this PR, the field tax_ids had no tooltip.
Since v16 we now allow the use of all taxes in the expenses module now. But, there is not much mention that price-excluded taxes will be used as price-included taxes.
In the release notes it just mentions that all taxes are usable, but there is no mention of anything else. This seems a bit confusing. Adding the tooltip will help users.

Also adding fresh exported .pot

closes odoo/odoo#117351

Task-id: 3252757
X-original-commit: df28d24699a6bfb4ea142fc07b10c1835d9d4323
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-04-05 15:11:17 +02:00
std-odoo 8078ce2fee [IMP] im_livechat: compute the KPI globally
Purpose
=======
Compute the KPIs globally, and not for the current user.

Task-2827996

closes odoo/odoo#91945

Related: odoo/enterprise#27658
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-05 15:11:06 +02:00
std-odoo df9e9ec261 [IMP] digest, *: compute the KPI in batch
*: account, crm, hr_recruitement, im_livechat, point_of_sale,
   project, sale_management, website_sale

Purpose
=======
Now, the KPI are computed based on their `company_id` and not based
on the current company. If no company is set on the digest, we compute
it based on the current company.

The KPIs are computed based on their company. Most of the time, they
will all belong to the same company so we can improve the performance
by computing them in batch.

Task-2827996
See odoo/enterprise/pull/27658

Part-of: odoo/odoo#91945
2023-04-05 15:11:06 +02:00
Mahdi cheikh rouhou (macr) 1b76e2835d [FIX] stock : update UoM of SM on product change
An error appears when we try to change the product in transfer line via
product/search

steps to reproduce the error :
1- create 2 products : Test 1 (UoM is Cm) and Test 2 (Uom is g)
2- create a delivery order and add Test 1
3- UoM error due to the UoM not being updated at the time of change

The error was happening because when updating the product directly in
the line section , the stock_move item already has a UoM and the if
statement makes it impossible to change it , so the error appears.

opw-3231298

closes odoo/odoo#117504

X-original-commit: ece3dea8c1ab43a854a57513cc317e8618010542
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-04-05 13:57:50 +02:00
Pulinckx Pierre (PIPU) 29d55e4403 [REF] *: Replace underscore functions by native JS
Replace _.last, _find, _.extend, _.some, _.every

Taskid 3246238

closes odoo/odoo#117319

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-05 12:50:43 +02:00
niyasraphy f4fab2d10c [FIX] fleet: missing avatar image for model and vehicle field
before this commit, in the list view of
fleet (fleet.vehicle),
services (fleet.vehicle.log.services) and
odometer(fleet.vehicle.odometer) the vehicle_id
and model_id field with many2one_avatar is
not showing the image of vehicle and model.

* open fleet -> fleet -> fleet
* switch to list view
* model field will be with empty image
* similarly in services and odometer menus

after this commit, the widget will be removed
from the field as the avatar field doesn't
exists in the model level.

closes odoo/odoo#117752

X-original-commit: e57b6f898775a0e432ae1a21266a0f4bf82c0242
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 10:45:57 +02:00
desdelinux 27d9f5c8ff [FIX] l10n_pe_edi: Gain and Loss exchange rate accounts are on the opposite field by default
Issue:

When activating the multicurrency in PE, the default exchange rate accounts are placed in the opposite fields (gain account should be an income account and loss account should be an expense), currently they're the other way around.

Fix:

Change the default account so Odoo created the journal entries for exchange rate differences the correct way.

Task Latam: https://latam-localizations.odoo.com/web#id=967&menu_id=88&cids=1&action=188&model=project.task&view_type=form

Reference:

https://www.noticierocontable.com/diferencia-de-cambio-venta/
https://www.noticierocontable.com/asiento-contable-perdida-diferencia-cambio/

closes odoo/odoo#117745

Replace: #115361
X-original-commit: 45694e1b0eeb46a5f1b75cee738f20e9a670ae63
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-04-05 10:45:54 +02:00
Andy Quijada [Vauxoo] 3925f602bb [CLA] Update Vauxoo's CLA adding ajqn9094
Incorporate Andy Quijada (ajqn9094) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#117729

X-original-commit: 53fc292afe73eb67cdbf9dcb0fbb8dcff5caadd9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-05 10:45:49 +02:00
Touati Djamel (otd) e324243e5f [FIX] stock: validate an immediate transfer without a backorder
Steps to reproduce the bug:
- Create a Storable product “C1” tracked by Lot:
    - Update the Qty to 10

- Create a Storable product “P1”:
    - Add a BoM:
        - add 1 unit of  “C1” as component

- Enable 3 steps for the manufacturing operation in warehouse settings

- Create a Mo to produce 1 unit of “P1”:
    - Confirm the MO
    - Click on related transfer:
        - Select the “Pick component”
        - check that the qty is reserved correctly
        - Try to validate it without setting Qty done
        - The immediate transfer is triggered, validate it

Problem:
The backorder's wizard triggers when it shouldn't

To know if we should create a backorder, we check if the qty reserved
is equal to the qty done, and as the qty done was not set correctly
during the validation of the immediate transfer, the two quantities
are not identical, therefore the widget is trigger:

https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_picking.py#L1128-L1132

opw-3240264

closes odoo/odoo#117706

X-original-commit: dd44e1f69dfd217fafa9c2ec5da8b211b2ff3513
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-04-05 10:45:46 +02:00
flvr-odoo b89daa7412 [IMP] test_lint: adding check to starred argument
Adding the if condition to handle starred argument passed to
cr.execute

Adding two test to test that case

closes odoo/odoo#117688

X-original-commit: 4ab64dcd21ecd99c081975beee5ac13d2aa70a6b
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-04-05 10:45:43 +02:00
Adrien Guilliams (adgu) fd74765d7a [IMP] point_of_sale: remove the background loading of partners and products
The loading of products and partners in background is too slow for the moment.
For configurations with a lot of products or partners, the loading is slowing
the whole behaviour of the PoS while it is not really necessary to load
20K products. This commit sets the default behaviour of the PoS to "not load
products and partners in the background", it also adds a button
on the ProductScreen for user to load more products when
a search term is put in the search bar and the same on the PartnerListScreen
for loading partners. This load will load 30 items at a time.

closes odoo/odoo#117667

X-original-commit: 389c85af5983f2f25c7c24f21d3c3716077d7119
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-04-05 10:45:40 +02:00
David (dafr) bfee5cca53 [FIX] mrp_workorder: fix duration_percent out of range
duration_percent field is a stored integer.
In postgresql, integer are 4 Bytes long, which create a range of -2147483648 to +2147483647.
With a small duration_expected, and a big duration, we can easily break these limits.

OPW-3253333

closes odoo/odoo#117744

X-original-commit: 97892d04341a2cbbe07e4db6442a451b0cf0b164
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David <dafr@odoo.com>
2023-04-05 09:42:48 +02:00
Touati Djamel (otd) 97f9289058 [FIX] mrp: wrong BoM from orderpoint in 3 steps
Steps to reproduce the bug:
- Go to the warehouse settings:
    - enable “3 steps for manufacturing”
- Create a storable product “P1” with 2 BoM
- Create an orderpoint:
    - Preferred route: Manufacturing
    - Product: “P1”
    - BoM: select the second BoM
    - To order: 1

- Click on the “Order once” button

Problem:
The manufacturing order is created with the first BoM instead of the
second.

As we are in 3 steps, the “run_pull” function is triggered first, with
values prepared from the orderpoint so the bom is well set:
https://github.com/odoo/odoo/blob/16.0/addons/stock/models/stock_orderpoint.py#L515-L523

Then the “run_manufacture” function is triggered but with vals prepared
from the move, not from the orderpoint, so we lose the BoM information
that the user has selected:
https://github.com/odoo/odoo/blob/16.0/addons/stock/models/stock_move.py#L1334-L1340

opw-3217945

closes odoo/odoo#117732

X-original-commit: 2371cd29e1c0cfa54b682b2100b9db7f5633a7b4
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-05 09:42:46 +02:00
Dossogne Bertrand 7e28908349 [FIX] hr_holidays: fix accrual cron
Before this commit, having an accrual plan with no
level before a certain amount of time would result
in a crash because no relevant level is found.
This commit avoid that error.

closes odoo/odoo#117722

X-original-commit: 7cc075604c2fffe3710e3b76a004e730650d62b1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 09:42:43 +02:00
Antoine (ande) ce0e1c095d [FIX] mrp_account: no currency in analytics
Current behaviour:
Cannot add a Work Order to a Manufacturing Order
if the analytic account linked to the MO doesn't
have an associated company.

Expected behaviour:
Should be able to add a WO to a MO even
if the linked analytic account doesn't have
an associated company.

Steps to reproduce:
1. Activate analytic accounts
2. Activate work orders
3. Create an analytic account without company associated
4. Create a Manufacturing Order
5. In miscellaneous, link the analytic account
6. Try to add a WO line
7. Error log

Reason for the problem:
When trying to add a WO line, if the MO has been linked
to an analytic account, it checks for the currency in
the company in the analytic account, which was not
existent, since the company didn't exist.

Fix:
When trying to access currency, if the company in the analytic
account doesn't exist, it defaults to the company in the WO.

opw-3210708

closes odoo/odoo#117708

X-original-commit: f0d8f5e82e62e0bcfc05e25dac2504f8f07537f4
Signed-off-by: Demany Antoine (ande) <ande@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-05 09:42:37 +02:00
amdi-odoo 31715f5b87 [IMP] web: clarify "Archive" modals
Removing the "Oks" from the "Archive" modals to
clarify what confirming the action will do.

Also fixing a wording error in the form controller
archive modal.

Task-3241064

closes odoo/odoo#117588

X-original-commit: 61c8b51a3d77e913acacead6379cd686693f86ce
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-05 09:42:32 +02:00
Jurgen (jugj) 7f49268019 [IMP] hr_contract : Make the contract view the same accross all apps
task - 3061227

closes odoo/odoo#116704

Related: odoo/enterprise#38833
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-05 09:42:29 +02:00
Odoo's Mergebot b6002975f2 [IMP] website_event: consider country and city while searching events
Currently, website users/visitors are not able to search the events based on
where they happen.

This PR improves the behavior by allowing the users/visitors to type the
city/country name in the search box and returns the events that are happening
in the country or city that matches the search term. To allow this, we have
utilized the `search_extra` search option and searching the matching events with
`sudo` because public users can not access the `address_search` m2o of the event.

This PR also shows the event location name when users search for the event.
Also add the "_getFieldsNames" method to easily override this method to
add a field name from another model.

Note that searching with sudo is just to add event ids in the domain. The final
result will be returned with not sudoed environment and so the record rules are
always respected.

TaskId-2791031

closes odoo/odoo#89796

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-04-05 09:42:24 +02:00
Mahamadasif Ansari eb132590db [IMP] website{_event}: show event location in search bar
Currently, if a user searches for an event based on a location name, the
location name is not displayed.

This commit shows the event location name when users search for the event.
Also add the "_getFieldsNames" method to easily override this method to
add a field name from another model.

task-2791031

Part-of: odoo/odoo#89796
2023-04-05 09:42:23 +02:00
D J 50d6f18250 [IMP] website_event: consider address while searching events
Currently, website users/visitors are not able to search the events based on
where they happen.

This commit improves the behavior by allowing the users/visitors to type the
city/country name in the search box and returns the events that are happening
in the country or city that matches the search term. To allow this, we have
utilized the search_extra search option and searching the matching events
with sudo because public users can not access the address_search m2o of the
event. Apart from that, this commit also adds the ability to address_search
the event based on location (name) of the address on address_search.

Note that searching with sudo is just to add event ids in the domain. The final
result will be returned with non sudoed environment and so the record rules are
always respected.

TaskId-2791031

Part-of: odoo/odoo#89796
2023-04-05 09:42:23 +02:00
flvr-odoo 3cfcb204ed [FIX] web : isolate new tab to external ressources
This commit is a security reinforcement.

Before this commit:

ir.action.act_url was able to handle and redirect to protocols like
file:, javascript:, date: ... This is unnecessary in the context of
this action. It could potentially be abused by a poorly written custom
module

It also would not isolate the landing page in case of a new tabs.
It means that chrome would still consider the tab to be from the
previous domain in case no url was passed and js was executed.
This would allow the newly open tab to still make query's to the
referrer using the referrer's cookie. While not stricly necessary
if we already prevent url that start with "javascript:", it is a
nice to have.

After this commit:

New tabs are not able to access referrer informations or execute
javascript interacting with the referrer. Also, it is now impossible
to redirect to protocols other than http and https directly from
the ir.action.act_url

Test update:

All new tabs are required to have the "noreferrer" argument

Tested an example of an unsupported protocol.

closes odoo/odoo#117687

X-original-commit: a020072da17e32fca0bbe6ed02b1afaeec8e8a02
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-05 08:38:30 +02:00
Hansun (hale) 0d4a89ac9d [FIX] mrp: broken UI of Work Center Setting
1. Install [Manufacturing] on Apps
2. On [Settings]>[Manufacturing]
- toggle on [Work Orders], [Quality] & [Quality Worksheet]
3. Go to Manufacturing
- Work Centers (a.k.a WC) Overview should be visible
- if no W.C. by default, add from [Configuration]>[Work Centers]
4. click on the 3 dots at the top right corner of each WC card

Issue: ugly layout
Fix: restore the style

affected branch: saas-16.1 up to master

closes odoo/odoo#117695

X-original-commit: 40a5d29d9b5b4070269175a83866837c7725b8c9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-04-04 21:11:45 +02:00
FraB af4ad5772c [CLA] add signature for FrancescoBallerini
closes odoo/odoo#117720

X-original-commit: 8b98ad868f7810d9fdcf26a355a646b3eed53410
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-04 20:08:47 +02:00
Sébastien Theys 672f2b2383 [FIX] mail: return guests in /who command
closes odoo/odoo#117717

X-original-commit: e4d832804b6d317a4dedc6a11e2e62c1721a6190
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-04 20:08:44 +02:00
Pooja Kantesariya 7b5b26d8a0 [FIX] mail: return guests in /help command
task-2917720

X-original-commit: 320501875e027ae8fbb46d1c8b892d2f189595b7
Part-of: odoo/odoo#117717
2023-04-04 20:08:44 +02:00
Odoo's Mergebot 4b98911916 [MERGE] test_mail(_*): cleanup class usage
Remove 'TestMailCommon' and 'TestSMSCommont' test classes. Use MailCommon
or SMSCommon when possible to ease move of test addons and inheritance.

'TestMailCommon' was useless and is replaced by the 'MailCommon' class defined
directly in Mail addon, easing inheritance and imports.

'TestSMSCommon' was useless and is replaced by the 'SMSCommon' class defined
directly in SMS addon, easing inheritance and imports. See community PR for
more details.

Task-3263512

closes odoo/odoo#117606

Related: odoo/enterprise#39291
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-04 20:08:38 +02:00
Thibault Delavallée c7af3b7c09 [REF] test_mail_sms: simplify SMS-based test class usage
'TestSMSCommon' was useless and is replaced by the 'SMSCommon' class defined
directly in SMS addon, easing inheritance and imports. See community PR for
more details.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:37 +02:00
Thibault Delavallée c9848bbf58 [REF] test_mail(_*): simplify Mail-based test class usage
'TestMailCommon' was useless and is replaced by the 'MailCommon' class defined
directly in Mail addon, easing inheritance and imports.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:37 +02:00
Martin Trigaux 826fee8b02 [FIX] mail_group: reference new MailCommon class
TestMailCommon was an empty class in test_mail kept for backward compatibility
while MailCommon is in mail. This is needed as we plan to move test_mail in
another addons path in order to isolate test addons.

Task-3263512

Part-of: odoo/odoo#117606
2023-04-04 20:08:36 +02:00
Touati Djamel (otd) 0ad863ba24 [FIX] stock: display forecast for the current warehouse
Steps to reproduce the bug:
- Create two warehouses in the same company
- Create a storable product “P1”:
    - Add 10 units in each warehouse
- Click on the forecasted widget

Problem:
The quantity on hand is 20 instead of 10 while the current warehouse set
in the filter is "WH1", because the warehouse has not
been added in the context, so we calculate all the quantities available
in all the locations of the current company:
https://github.com/odoo/odoo/blob/c05815ae6b8bd7afceb760395af09c707c89c485/addons/stock/report/stock_forecasted.py#L164
https://github.com/odoo/odoo/blob/3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd/addons/stock/models/product.py#L275

for the filter, the default one is added in the context here:
https://github.com/odoo/odoo/blob/16.0/addons/stock/static/src/stock_forecasted/forecasted_warehouse_filter.js#L19

opw-3194872

closes odoo/odoo#115255

X-original-commit: 10ea5d0cfb08b733322d0274e191a20f7f53cd78
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-04 20:08:33 +02:00
Adesh Jolhe c039064ca4 [FIX] account: prevent traceback while reload template
When a new tax is created and click on Reload button of fiscal Localization it
will generate traceback.

Steps to Produce:-
- Create a new Tax.
- Then open the setting of invoicing and Click on reload Button which is located
  inside fiscal Localization.
- IndexError will be generated.

Cause:-
- When a user creates a tax from UI `get_external_id` return an empty string and
we try to `spilt` an empty string and get 1 index value and because of that
it gives traceback.

Fix:-
- Check xml_id is not null before trying to spilt and get the value from xml_id.

Sentry-4042986115

closes odoo/odoo#117709

X-original-commit: 3b86115d5f989c3b35579e75c67d94d120ef6be2
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-04 19:11:55 +02:00
Romain Derie ef8dc0a167 [IMP] website: keep showing dropzone message even if content inside
There is a very nice and clear system that helps the user to figure
what are the available area to drop content inside, and what will they
do: are they shared between products, or product specific etc.

The issue is that once you have dropped a snippet inside, that helper
message is not shown anymore, but it's still not obvious which area is
used for what, actually you have no clue which one is which, especially
if you come back on the page later: at best remember there were 2
separate zones but you don't especially remember which one is which.

Keeping the message helps in that regard without any negative impact.

Note that making the message appear when there are already a snippet
will work out of the box in the sense that the message will be
duplicated and shown twice: one at the very bottom of the area and one
at the very top.

Note that there is 5 cases to consider here:
- Empty website.page in edit mode (no drag & drop)
- Empty website.page with drag & drop
- Non empty website.page with drag & drop
- Empty product description with drag & drop
- Non empty product description with drag & drop

This commit also takes care of fixing the text color issue where the
"editor message" could not be read because of text color too close to
bg color.

task-3160416

closes odoo/odoo#117705

X-original-commit: 9236628b0d037a0a9444d13a30d813f4a8413377
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-04-04 19:11:53 +02:00
Sébastien Theys b7dd007396 [FIX] mail: allow click on suggested recipient input
closes odoo/odoo#117681

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-04 19:11:48 +02:00
Sébastien Theys 4e33fc4816 [FIX] mail: add recipients as follower when sending message
Part-of: odoo/odoo#117681
2023-04-04 19:11:47 +02:00
Audric Onockx (auon) 00b6a18225 [FIX] project,hr_timesheet: fix performance issue in task kanban
It takes a too long to load project task kanban view.
And ~85% of this time is spent in `ProjectTask._get_all_subtasks`,
which is a recursive method returning the children of the children,
while any, of the task, for each task, just to display their count.

We replaced this recursive method with a SQL request,
which is way faster. Also, it can be called in batch.
It will return a dict {id: subtask_ids}.

task-3246085

closes odoo/odoo#117624

X-original-commit: 3b55936fed9ebdcfb8190437ad66c3e42c26b01c
Related: odoo/enterprise#39295
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 18:07:14 +02:00
rolandojduartem 89d6b78871 [CLA] Update Vauxoo's CLA adding rolandojduartem
Incorporate Rolando Duarte (rolandojduartem) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at:
www.odoo.com/submit-pr

closes odoo/odoo#117655

X-original-commit: 4c633bbec60ac9dcbbe2c3364f95d15f8a3ab0f5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-04 17:03:41 +02:00
Thomas Lefebvre (thle) 7151c117e4 [FIX] calendar: correct description of 'free' option
On a calendar event, the 'free' option does not hide the element.
So that the user doesn't expect this behavior,
you have to modify its description.

opw-3047999

closes odoo/odoo#117654

X-original-commit: ecc850f4df1151a793d36fdd58621665a6e1a414
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-04 17:03:37 +02:00