Commit Graph
164380 Commits
Author SHA1 Message Date
Michael (mcm) 1e1c447d0d [REF] tools: transpile esm to sync module
This commit changes the js transpiler to write sync module.
The goal is to remove all async module and simplify the
module loader in the future.

task id: 3265979

closes odoo/odoo#119186

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-21 23:46:16 +02:00
Aaron Bohy e8b75e4d99 [FIX] web: multi edit list: crash after validating with ENTER
Have a multi edit list view, select several records and edit a
field represented by an input (e.g. a char field). After typing the
new value, press ENTER to validate. The confirmation dialog opens,
click on OK/Confirm to save. Before this commit, an error was
thrown afterwards, because we tried to retrieve the value from the
input, but the input doesn't exist anymore as the edited row has
already been switched back to readonly. This commit fixes the
issue.

closes odoo/odoo#119082

Related: odoo/enterprise#40012
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-21 23:46:11 +02:00
Aaron Bohy 105299eb1d [REF] web: move list specific logic about multi edit
The primary goal of this commit is to simplify the RelationalModel
API, and in particular to remove its "fieldNodes" param, which was
only necessary for a list specific usecase, which is the opening of
the ListConfirmationDialog when multi editing. We also remove the
"blockUpdate" logic from the model s.t. it remains local to the
list controller. About this logic, we fix a minor issue as we no
longer open the "No valid record to save" dialog when the mousedown
event is trigerred on "Discard" (we instead wait for the mouseup,
like already done to open the multi save confirmation dialog).

Part of task 3179751

Part-of: odoo/odoo#119082
2023-04-21 23:46:11 +02:00
Julien Van Roy d026dfa38c [FIX] account_edi_ubl_cii: if no VAT PartyTaxScheme should appear
If a partner has no VAT number (for instance: a public administration),
the xml tag `PartyTaxScheme` should not appear for UBL Bis 3.

opw-3263542

closes odoo/odoo#119261

X-original-commit: 270ed9f92ee9c71cc38c4cc69fb2d7c2c780cf52
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-04-21 20:18:47 +02:00
Kevin Baptiste 9d216634c5 [FIX] website_hr_recruitment: sort jobs / departments by name
The jobs / departments / offices were not in alphabetical order but
ordered by the job they were in, which didn't make sense.

task-3278949

closes odoo/odoo#119260

X-original-commit: 5da763a8ef0503286fa5cc55e32970f4d785825a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-21 20:18:44 +02:00
Kartik Chavda b4ac7f54fa [REM] project: remove task dependency sub-type feature
Before this commit there is a sub-type to notify parent
if child stage change but with new to-do state feature
we don't to unnecessory notification on parent which is
more problemation then informative.

This commit remove task dependency sub-type and it's related
code.

task-3252755

closes odoo/odoo#118418

Related: odoo/enterprise#39972
Related: odoo/upgrade#4542
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-21 18:46:48 +02:00
clesgow 38c3861d78 [FIX] sale_mrp: enforce order on picking_ids
Given that `assertRecordValues()` is order-dependant to check the
values, ensures that the pickings given in the test are in a fixed
order.
If the test is run too quickly, both delivery picking and return picking
would have the same scheduled date, ordering them by 'id desc' since
both priority and scheduled date would be equals. Sorting them manually
ensures their order is consistent, and thus the assert checks the right
values.

closes odoo/odoo#119282

X-original-commit: 9bc41db19b6da7947b2d430d47de1c8f3220765b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-04-21 16:47:34 +02:00
Deependra Solanki bb914f863d [FIX] web_editor: do not scroll up when inserting a link
Before this commit:

When we write a long pad and go to bottom a insert a link when the modal opens
the editable area scrolls to the top.

After this commit:

Now from the bottom of the pad when we insert a link the editable area does not
scrolls to the top.

task - 3138700

closes odoo/odoo#119279

X-original-commit: 2c50808d9cebc7ba0913a098bf79a15ef36da47f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-21 16:47:31 +02:00
Nshimiyimana Séna f19de6f5cd [FIX] account: Early Payment Discount Grouping Error with Tax Grids
## Summary

The early payment discount (EPD) grouping functionality can break when
using taxes that add tax tags on their base lines.

## Steps to Reproduce

1. Install the `l10n_be` module
2. Ensure that `Cash Discount Tax Reduction` in the settings is set to
   `Always (upon invoice)`
3. Create a bill and set the payment term to `2/7 Net 30`
4. Add a product line (`l1`) with any Belgian tax and save
5. Add the same product line again (`l2`) and save
6. Attempt to add another product line or remove an existing one and
   save: an error will occur, stating that the move is not balanced

## Cause

The EPD grouping key depends on various factors, including the
`tax_tag_ids` (tax grids) of the product lines. However, the system
currently processes mixed EPDs before taxes. As a result, when saving at
the end of step 5, EPDs are calculated for `l2`. However, `l2` does not
have tags at this stage, while `l1` does, since it was saved earlier.
This discrepancy leads to incorrect EPD grouping.

opw-3129639

closes odoo/odoo#119226

X-original-commit: 044957eac66bad04aa64dd16488843369cd0833e
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2023-04-21 15:02:20 +02:00
FrancoisGe 1b0b0edb3f [FIX] web: Kanban move column and record
In the commit a2342f636c, we wanted to
use isFieldReadonly to find out if the groupField field was readonly or
not. Unfortunately, this function was not suitable for this use case.
IsFieldReadonly only works on a record and not on a list. It was a
mistake to move this function to the Datapoint.

In this commit, we will put IsFieldReadonly back in the Record and
not use it to know if the field of the groupField is readonly or not.
As in the past, we will consider that a field is readonly
if its modifiers.readonly is true (we cannot take into account the
expressions to be evaluated because the record is not accessible).

How to reproduce:
Go to a kanban view group on a field with an "attrs={readonly: [...]}

Before this commit:
The view will crash.

After this commit:
No errors occur.

closes odoo/odoo#119144

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-21 15:02:17 +02:00
Victor FeyensandPaul Morelle cbd67bd099 [FIX] website_sale: do not create zero-quantity lines
We do not want to allow the creation of lines with zero quantity,
Although we do not know of a standard flow making such requests,
the cart_update routes could accept information such as
* {"product_id": X, "set_qty":0}
* {"product_id": X, "add_qty":0}

If a line with product X already exists, it'll be deleted.
If no such line exists, a new one would be created, which is not
something we want to support.

closes odoo/odoo#118999

X-original-commit: 231c8aa79ddd0b1f4ed47508fa22596ac19daacb
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Paul Morelle <pmo@odoo.com>
2023-04-21 15:02:15 +02:00
Viktors Lipskis (vili) a216ee0bc3 [FIX] web,calendar: fix mismatched tags
This commit replaces a closing </xpath> with a </div>, and also prevents some
potential issues with class overrides for the div.

closes odoo/odoo#119196

Signed-off-by: Arnaud Joset <arj@odoo.com>
2023-04-21 10:53:06 +02:00
rhe-odoo a40039632c [FIX] pos_Loyalty: remove loyalty program info
The loyalty details on the orders were not useful for the end user.
Now we delete it from the order widget. It also fits the sale behavior where we don't show those informaitons.

closes odoo/odoo#118789

Task-id: 2980232
X-original-commit: bafcda0e8c851fb66b0f6c6cb890cf0bdaad596d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-21 09:48:41 +02:00
Vincent Schippefilt 7d2baaa0c7 [IMP] web: project unity_read
Introduce an optimised way of reading a graph of data from the webclient.

Before this commit:
When reading data from the webclient it could at most read multiple ids of the same model in one RPC.
This mean that when reading x2many or specific information on many2one, that could only be done after the initial read (when the client knows the ids of the comodels) and model by model.

After this commit:
Introduce methods web_read and web_search_read_unity. Both method receive a specificiation for the fields instead of a list of fields. The specification can request fields from the model, as well as follow relations and request fields for each relations, recursively.

Example of web_read specification for account_move
```python
{'name': {}},
{'date': {}},
{'journal_id': {'fields': {'display_name':{}}}
},
...
{'invoice_line_ids' :
    {
        'fields': {
            'journal_id' : {'fields': {'display_name:{}}},
            'move_name' : {},
            ...
            'tax_ids' : {
                fields: {
                    'display_name':{},
                    ...
                }
            }
        }
    }
}
```

Result for this example with 2 invoice lines
```python
{
    'id': 1234,
    'name' : 'invoice name ABC',
    'journal_id: {
        'id': 999,
        'display_name': 'Customer Invoices'
    },
    ...
    'invoice_line_ids': [
        {
            'id': 666,
            'journal_id': {
                'id': 999,
                'display_name': 'Customer Invoices'
            },
            'move_name': 'a move name',
            'tax_ids': [
                {
                    'id': 333,
                    'display_name: "15% tax",
                    ...
                }
            ]
        },
        {
            'id': 667,
            'journal_id': {
                'id': 999,
                'display_name': 'Customer Invoices'
            },
            'move_name': 'another move name',
            'tax_ids': [
                {
                    'id': 334,
                    'display_name: "21% customer tax",
                    ...
                }
            ]
        }
    ]

}
```

closes odoo/odoo#119034

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-04-21 08:02:17 +02:00
Vincent Schippefilt d5c93c624d [REF] base: rename and format on models.py
Part-of: odoo/odoo#119034
2023-04-21 08:02:17 +02:00
Sébastien Theys 90cb44e1e1 [REF] mail, *: rename mail.channel to discuss.channel
* = bus, calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot,
    mass_mailing, privacy_lookup, test_discuss_full, test_mail,
    test_mail_full, website_crm_livechat, website_livechat, base

In preparation of splitting discuss and mail modules.

Part of task-3265211

closes odoo/odoo#118354

Related: odoo/upgrade#4553
Related: odoo/enterprise#39661
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-21 02:21:53 +02:00
Daniel Kosky (dako) 65fd6d9b24 [FIX] stock: don't replace product/inventory view groups
The current view replaces the existing groups attribute of the inventory
page in the product template form view with two specified groups (with
only one of these groups being newly introduced in stock).

This commit changes the product view to utilise an xpath that adds the
single new group (stock.group_stock_user), instead of replacing the
content of the attributes.

closes odoo/odoo#119284

X-original-commit: 43c888bb4df26b608ee6b0bedfe41032b40cc883
Related: odoo/enterprise#40101
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2023-04-20 22:10:00 +02:00
Lucas Lefèvre e5d11fa7a5 [FIX] spreadsheet_dashboard_hr_expense: don't mix currencies
In the Dashboard app, expenses KPI amounts are currently expressed in the
currency they were made in, but with the currency symbol of the company
currency. It also means amounts with different currencies are aggregated.

We want the KPI to be expressed in the company currency and not in the
expense currency.

Note that even with this commit, the amounts are still mixing different
currencies if multiple companies are active

Task 3266092

closes odoo/odoo#119264

X-original-commit: e579ec5b3794d545676accdd23428557b75d05fa
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-20 22:09:57 +02:00
Vincent Schippefilt 23dcdb73d8 [FIX] core: fetch method on compute do not check depends available
Calling `fetch` with computed fields will also check that the dependencies
of those fields are fetched, which is good.
This commit adds a check that verifies that all the dependencies are already
fetched before re-fetching them.

closes odoo/odoo#119247

X-original-commit: 7ab724450c9aa29ad6c1739cff1e928d79666dac
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-04-20 19:30:40 +02:00
Sébastien Theys f9d7f7595f [FIX] bus, *: restore simple_notification handler
* = base_geolocalize, calendar, website_crm_partner_assign

Oversight of discuss refactoring. Code is restored into bus module as it
does not depend on any mail or discuss feature.

closes odoo/odoo#119243

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-20 19:30:37 +02:00
Alexandre Kühn 97fd1d7058 [FIX] mail: make precisely text of reply-to message clickable
Before this commit, clickable of a reply-to message mistakenly
extended all the way to the other end of the conversation.

closes odoo/odoo#119228

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-20 17:46:57 +02:00
Louis Wicket (wil) 192fe9efc7 [I18N] l10n_it_edi: update Italian translation
closes odoo/odoo#119218

X-original-commit: 3ed088ae93bdfe5565205949779cae8b7c1d34e7
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-04-20 16:40:48 +02:00
Benoit Socias 62eea00a9b [FIX] website: prevent dropping generated ToC outside its snippet
In the table of content snippet, both its generated entries and its
content wrapper can be dropped outside of it.
This cannot be allowed because the entries are generated from the
wrapped content that belongs to the same table of content snippet.
If any of them is missing, the feature is broken.

This commit prevents this by hiding the drag handle from the generated
table of content and from the content wrapper.
Note that they can still be moved using the arrows.

task-2752391

closes odoo/odoo#107510

Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-20 16:40:40 +02:00
Alvaro Fuentes 2f3e8ef154 [FIX] core: fix majorless upgrade
When we compare majorless scripts we must ignore the Odoo version.
Otherwise a module upgrade without major Odoo upgrade would fail to run
local scripts majorless scripts. That's what happens for example when
users click the upgrade button of a module.

Example: upgrade from `11.0.1.0` to `11.0.2.0`, with a local `2.0` folder
for upgrades.
```
11.0.1.0 < 11.0.2.0 < 11.0.2.0 -> False (check before this patch)
     1.0 <      2.0 <=     2.0 -> True  (check with this patch)
```
While still: upgrade from `11.0.2.0` to `12.0.2.0`
```
11.0.2.0 < 12.0.2.0 < 12.0.2.0 -> False (before this patch)
     2.0 <      2.0 <=     2.0 -> False (with this patch)
```

closes odoo/odoo#119203

X-original-commit: 84ab74c62a19d08de8b6c7c4e3f3300d7e79bcf9
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-04-20 15:22:04 +02:00
Chong Wang (cwg) 26b9b656c6 [FIX] core: allow write translation for non-existing record
before this commit:
    record = env['model.name'].browse(id)
if record doesn't exist in the database and call
   record.translated_field_name = value
Then _get_stored_translation will raise
   TypeError: 'NoneType' object is not subscriptable

after this commit:
like write non-translated field, the value can be written to the cache, but not
the database and no error will be raised.
Note: The feature is only for the original ORM 'write', if the 'overriden write'
reads other fields of the non-existing record, a MissingError will be raised.

closes odoo/odoo#119202

X-original-commit: 3ba7ca28a68acccb8eb25f117900c1aa1980264a
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2023-04-20 15:22:01 +02:00
Mathieu Duckerts-Antoine d8e08067d4 [IMP] web: sample server: add test file
The new SampleServer class was introduced in c67b9f9907
without dedicated tests. We fix this oversight.

closes odoo/odoo#119188

X-original-commit: 693f7bd74066fa9854db4ecef751f13ec5c7e7a6
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-20 15:21:55 +02:00
Mahamadasif Ansari 4fa6ed837b [FIX] account: assign current date in due_date if date_ref not available
Unsupported operand type(s) for +: 'NoneType' and 'relativedelta'
occur when we create payment terms without a preview date (date_ref).
This is because date_ref has no value.

This commit solves the issue by adding a condition if date_ref is not
available, so it adds current date instead of it.

sentry-4068322613

closes odoo/odoo#119187

X-original-commit: a9f556c0d45c32574c94765462d4b59726fc3f19
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-20 15:21:53 +02:00
Benoit Socias 44c14b0daa [FIX] website: hide "This page" menu entry if it is empty
Before this commit the "This page" menu sub-section of the website's
menu is displayed as a clickable entry when it is empty.

After this commit any website custom menu sub-section title entry is
hidden if none of its children is displayed.

Steps to reproduce:
- Install website only
- Log in as a restricted editor
- Go to website
- Open the "Site" menu
=> "This page" appears as a clickable entry instead of being hidden.

task-3149639

closes odoo/odoo#119125

X-original-commit: 4625f717bdccd8eea851f74a87a102436627106b
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-04-20 15:21:47 +02:00
Mathias Mathy (MAMA) bf155195c3 [FIX] mrp: Missing serial on mass production
Issue :
- When mass producing a tracked product, an User Error is raised on validation of splitted MO.

Reproduction :
- Create Serial storable product "Component A", Lot storable product "Component B", Serial Storable product "Finished Serial Product"
- Immediate Transfer 10 * "Component A" and 20 * "Component B"
- Create a BoM for "Finished Serial Product", consuming 1 * "Component A" and 2 * "Component B"
- Create a Manufacturing Order for 10 * "Finished Serial Product" and Confirm :
- Click on "Mass Produce", Set "First SN", Generate all the serials and Apply
- Click on "Produce All"

Task : 3274962

closes odoo/odoo#118592

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-04-20 15:21:44 +02:00
Julien Van Roy 29e2645f4e [FIX] tools: support recent versions of fonttools
Support recent version of fonttools. In particular, class `_TTGlyphSet`
was refactored between 4.37.1 and 4.37.2 and no longer has an `_htmx`
attribute. Instead, the new attribute `hMetrics` can be used to get the
metrics from htmx.

closes odoo/odoo#118571

See: https://github.com/fonttools/fonttools/commit/b818e1494ff2bfb7f0cd71d827ba97578c919303
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-20 15:21:42 +02:00
Michael Tietz 5aa5bacd8f [FIX] stock: allow nested multi-warehouse inventory flow
Steps to reproduce:
- Enable multi-warehouses (i.e. have a company with 2 warehouses:
  warehouse_1 and warehouse_2)
- Set warehouse_2's view_location to a location within warehouse_1
- Check the warehouse_id of a location within warehouse_2

Expected result:
warehouse_id = warehouse_2

Actual result:
warehouse_id = warehouse_1

The issue with this is each warehouse may be configured with their
own routes/rules, therefore a product within warehouse_2 may not
follow the warehouse_2 routes/rules. Note that a nested warehouse
situation like this may occur with warehouses located in  different
countries, but products from both warehouses are sold in the same
ecommerce store and `website_warehouse_id` only allows 1
warehouse to be assigned to it

closes odoo/odoo#119181

X-original-commit: 83613b56cadf1a12331db9d4d41ab688d68768e9
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-20 14:10:35 +02:00
Alexandre Kühn c8fe8cb668 [FIX] mail: better separate header and content of chat window visually
Before this commit, content inside chat window could visually fuse
with the header in a way that makes it hard to see the separation
between the header and the content.

This commit fixes the issue by adding a small border below header
when there is some content.

closes odoo/odoo#119173

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-20 14:10:29 +02:00
Touati Djamel (otd) 3c3c856c2b [FIX] mrp, purchase{stock,mrp}: use route set on product in orderpoint
Steps to reproduce the bug:
- Install purchase, then mrp (in this order)
- Create a storable product “P1”
    - route: buy
    - Add a supplier
    - Add a BoM
- Create a delivery for the product “P1”
- A need is created
- Go to inventory > operation > replenishment

Problem:
An orderpoint is created with the preferred route: Manufacture instead
of buy

As the "Purchase" module was installed first, the override of
the `_set_default_route_id` function will be triggered first, the 'buy'
route will be set in the created order point because the product has a
supplier. Then, the function in the MRP module will be triggered and
since the product has a BoM, the 'buy' route will be replaced by
"Manufacture".

opw-3228971

closes odoo/odoo#119172

X-original-commit: 227d038efbadf25e3a7be7cceedd9159b71162a3
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-20 14:10:27 +02:00
Maruan Aguerdouh (magm) ae412254f3 [FIX] *: fix kanban_view_ref to work in newer versions
Steps to reproduce:

- Install Sales.
- Go to any quotation and toggle mobile device mode in the browser.
- Go to Other Info > click in Sales Team field.

Issue:

We stop supporting the 'kanban_view_ref' in newer versions of odoo. So
we won't be able to get proper view.

Solution:

Changed the way we ref the kanban view to use context to get the
referenced kanban view.

Related to #39499

opw-3152174

closes odoo/odoo#116031

Related: odoo/enterprise#39499
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-20 13:03:32 +02:00
paso-odoo 1e37ad3a17 [FIX] stock: expected singleton issue in quants when lot/sn number
If applied, this commit will solve the issue of the singleton when there are 2
quants with the same location and same products but one quant with a lot and
another quant without a lot number.

Steps to produce:
- Create one quant with location-1 and without lot number.
- Create another quant with location-1 but with the lot number.
- Create 3rd quant with location-1 with same lot number as step2.
The error will raise in 3rd step as it is not accepting the 2 quants where one
is with lot number and another is without lot number.

see - https://tinyurl.com/2hqrgmwm

sentry - 4024572562

closes odoo/odoo#119152

X-original-commit: 05a7f5c04804423cfc3a833a1b3f0b5eec3fc147
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-20 11:57:47 +02:00
BernatPForgeFlow 737e0056cb [IMP] stock: Activity schedule from stock orderpoints
When an orderpoint triggers a procurement for a product and the system does not find the procurement route, it schedules an activity remembering what was the error.

If a normal user without admin access rights, makes an action that triggers the orderpoints, like confirming a MO, the activity schedule is not creating due to an access error on 'write' operation to a Product Template.

So, all activity schedules triggered from an orderpoint should be created without checking access rights.

closes odoo/odoo#119066

X-original-commit: e7de0b7f88ad55f662319aabcc5d989367b8c659
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-20 11:57:39 +02:00
Arnold Moyaux e1e8f33ca9 [FIX] purchase_stock: wrong supplier from orderpoint:
Use case to reproduce:
- Set "receive good in input and then stock" on the warehouse.
- Set two suppliers on a product. one from a partner (higher priority)
  and one from a child partner (lower priority).
- Set the child partner as the vendor on the replenishment report.
- Order a replenishment for the product.

It happens due to an hack that use a field on `stock.move` in order
to temporaly store the partner among the moves until the RFQ.
But this field is a many2one on `res.partner` model and not on
`product.supplierinfo`

`_run_buy` receive a partner and still use `_select_seller` with the
partner in order to find the best pricelist. But it won't use the
specific supplier price list set on the orderpoint.

In order to fix, we don't store anymore the price list partner on the
intermediate move. In run_buy we receive the orderpoint if it's the
origin of the procurement. On the orderpoint the supplierinfo is set.
So we take it from there.

opw-3180945

closes odoo/odoo#119063

X-original-commit: 3cd5b9b7688ef7e6c6fa4fce1c0ad319fb577745
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-20 11:57:36 +02:00
Đào Nam 373c3008be [FIX] barcode: Fix barcode handle error
In this paragraph, we are trimming the string and then converting it to an int type. But there is no guarantee that value_string can be converted to int

closes odoo/odoo#119059

X-original-commit: 84fca48dfbabbaa928823d3a27621c77cc53d6dd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-20 11:57:34 +02:00
Alexandre Kühn 7995349001 [FIX] mail: correct breadcrumb when open discuss from chat window
Before this commit, when opening Discuss from chat window and then
accessing the settings page of a channel, the breadcrumb showed
"Unamed" as the name of the App instead of "Discuss".

This happens because the client action was not named when expanding
the chat window by opening Discuss app.

closes odoo/odoo#118939

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-20 11:57:31 +02:00
Pulinckx Pierre (PIPU) 608e90e998 [REF] *: Replace underscore functions by native JS
Replace _.map(), _.flatten(), _.delay(), _.contains(), _.pluck(), _.isUndefined(), _.isEmpty(), _.isString(), _.isEqual(), _.isBoolean(), _.memoize(), _.invoke(), _.bind(), _.escape(), _.debounce(),
_.str.sprintf(), _.str.repeat(), _.str.startswith(), _.str.trim(),
_.str.escapeHTML(), _.str.escapeRegExp(), _.str.startsWith(), _.str.include()

closes odoo/odoo#118012

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-04-20 11:57:29 +02:00
Jorge Pinna Puissant 95c7031027 [FIX] web: kanban: read more is briefly shown when quick create
Before this commit, when quick creating a new record in a kanban view,
the "read more" button is briefly shown (flickering). This issue occurs
because, when creating a new record, we increment the number of records
in the group before adding the record to the list of displayed records.
This means that for a brief moment the number of records of the group is
bigger than the number of displayed records, therefore the "load more"
button is show.

Note that this flickering was introduced due to the following
refactoring : https://github.com/odoo/odoo/commit/067bcac53336b5f66f695b1c10b333d8c722225d

Now, we increment the number of records on the group after we added the
record to the displayed records' list.

closes odoo/odoo#119142

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-20 10:52:06 +02:00
Thanh Dodeur c741bbb4a3 [FIX] mail: prevent potential memory leak of AudioContext
Before this commit,

The audio context used in media_monitoring was not
closed. Which could lead to memory leaks.

The source was not connected to the destination in the
script processor (used in old browsers that do not support
audioWorklets), which would prevent the monitored audio to be used as
an audio source.

closes odoo/odoo#119124

X-original-commit: f1c3f78dd6e17fe2a3f5a01d8510ca4343b880fe
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-20 10:52:00 +02:00
flvr-odoo 86fd55b8e7 [FIX] auth_signup: inactive password res_partner
This commit prevent the reset of password for de-activated partner

closes odoo/odoo#119114

X-original-commit: 71f4cf2da157d3457885339d116c38d673187b59
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-04-20 10:51:57 +02:00
Rémy Voet (ryv) 3864f2cf84 [FIX] core: fetch method with 'id' always generates sql query.
Calling `fetch` with 'id' in the `fields_name`, will always generate
SQL query even if all requested field values are in the cache.
This is because we also look for values in the 'id' field cache,
but we don't ever fill the cache for `Id` fields.

closes odoo/odoo#119107

X-original-commit: 3ba8d0e5e57e1358cc8958abf511d514515eccb2
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2023-04-20 10:51:54 +02:00
uso-odoo 58a3fa82ff [FIX] mrp : prevent traceback while operation use in bom
When Operation is 'Archive' and it is still in use as 'Consumed in Operation' in
bom while creating Manufacturing Order and confirming it, KeyError will be
generated.

Steps to Produce:-

1) Create a new product, create bom for that product, add components, and
   create or add at least 2 operations to the BoM.
2) In the components of 'Consumed in Operation' add the newly created operation.
3) Now, Archive one operation.
4) Create new Manufacturing Order with a newly created BOM
5) Try to confirm it.

KeyError will be generated.

By applying this commit, if there are no operations left after archiving
one linked to the component then the server error won't occur

sentry - 4042593205

closes odoo/odoo#119098

X-original-commit: ba2364f9188ff44c68a1b86d5029884815a33216
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-20 10:51:51 +02:00
roen-odoo 2eafad8bf1 [FIX] pos_restaurant : add missing t-ref
Current behavior:
When printing a bill in the restaurant you had an error poping.

Steps to reproduce:
- Open a restaurant session
- Go on a table and add some products
- Click on the bill button
- Click on the print button
- You get an error

opw-3259014

closes odoo/odoo#119041

X-original-commit: 1d1808e7136c6416fe88c28e7971e97707de2557
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-04-20 10:51:49 +02:00
Guillaume (gdi) 256e16f4d2 [FIX] website: remove horizontal scrollbar on mega menus
Since [this commit], a horizontal scrollbar appears on mega menus. This
is because Bootstrap position the dropdown automatically and the mega
menus are a bit shifted on the right (due to a `translate3d` added by
dynamic position of popper). This commit fixes the problem by removing
dynamic positioning for mega menus.

Steps to reproduce:
- Have a system setting that enlarges the texts size or zoom the page
- Have a mega menu
- Open the mega menu

=> There is a horizontal scrollbar.

[this commit]: https://github.com/odoo/odoo/commit/8689241f86e2d4ddb4e4510951f92b80e115b914

task-3133137

closes odoo/odoo#118842

Signed-off-by: loco-odoo <loco@odoo.com>
2023-04-20 10:51:46 +02:00
Guillaume (gdi) 9bd294823c [FIX] website: remove the margin above the mega menus
Since the upgrade to Bootstrap 5 and especially since this [BS5 commit],
there is a gap between the mega menu and the navbar when the user opens
a mega menu. This commit removes that gap.

Steps to reproduce the bug fixed by this commit:
- Have a mega menu on your website.
- Drop a block of a dark color at the top of the page (it helps to see
the problem).

=> When you open the mega menu, you can see a small piece of the block
of dark color between the navbar and the mega menu.

Technical explanation:
This [BS5 commit] introduces a new css rule that adds a
`margin-top: 0.125rem;` on the `.dropdown-menu[data-bs-popper]`. However
when [mega menus were introduced], another css rule prevents having a
gap between the nav and the mega menu (`margin-top: 0;` on
`.o_mega_menu`). This commit makes sure that it will be a `margin-top`
of 0 by making the property more important.

[BS5 commit]: https://github.com/odoo/odoo/commit/c48f57ea2538ad51e00ac27d58f8e191781444f3
[mega menus were introduced]: https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7

task-3133137
opw-3226013

X-original-commit: b41c76bd7583756ad059f77f0d3c1151720b0b0b
Part-of: odoo/odoo#118842
2023-04-20 10:51:46 +02:00
Guillaume (gdi) ca835299b5 [FIX] website: enable opening of dropdowns after a scroll
This commit allows to reopen submenus and mega menus if one of them was
opened when scrolling on a page of a website.

Steps to reproduce the bug fixed by this commit.
- Have a submenu or a mega menu in the navbar
- Open a dropdown of the navbar
- Scroll down

=> It is no longer possible to open the dropdown.

This commit fixes this issue and adds a test for this flow.

task-3133137
opw-3226013

X-original-commit: 9b1de9e28697edbb6e1fa88665294f983f60e37f
Part-of: odoo/odoo#118842
2023-04-20 10:51:45 +02:00
std-odoo 8ca2de9bfc [IMP] web: allow to use favorite in Knowledge embedded view
Purpose
=======
Allow to use favorite in Knowledge embedded view.

For that purpose, we need to hook some function in the web module
(because favorites are stored in view arc and not using ir.filters
records).

Task-3251129

closes odoo/odoo#117188

Related: odoo/enterprise#39057
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-20 10:51:36 +02:00