Commit Graph
161512 Commits
Author SHA1 Message Date
Alexandre Kühn dc2efbb124 [FIX] mail: good showing of avatar in discuss invitation screen
Follow-up of MILK web client redesign.

Before this commit, the avatar and im status in invitation popover
in discuss app were not showing properly: avatar not rounded,
and im status mispositionned in top-right corner.

This commit fixes the issue by absolutely positioning im status
like all other uses of IM status on top of user avatar.

closes odoo/odoo#122459

X-original-commit: 6061d4e718a8e15a1448c236414e8326ba5e13c5
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-25 19:16:27 +02:00
Leonardo Pavan Rocha 24659d9430 [FIX] calendar: fix calendar_appointments_hour_tour after milk
After the merge of the milk design at odoo, the calendar_appointments_hour_tour
started failing due to a change in the button that returns to the calendar
view. This commit fixes the tour by adapting the trigger selector to the new
design.

runbot-build-error-21004

closes odoo/odoo#122458

X-original-commit: e0e8833944ca351bd8712f81950de5513a34a0f8
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-05-25 19:16:24 +02:00
Pierre Masereel 40fdc32c2e [FIX] web: unescapeHTML doesn't match old _.unescape
Since we've created unescapeHTML to replace the _.unescape function. The
issue is that _.unescape was using the hex code '&#x27," for the
character " ' ". And the new function uses the decimal code '&#39;', but
as there are some old domains for dashboard have ben stored escaped with
'&#x27', we are now unable to unescape them.

closes odoo/odoo#122457

X-original-commit: 1516b52cc7266e4cb2afed2941d93f2f9bc21bb9
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-25 19:16:21 +02:00
Pieter Claeys (clpi) 4b5fb81084 [FIX] mrp: Update analytic lines when changing account on MO
Upon changing/removing/adding the analytic account on a manufacturing order, only the analytic lines due to the raw material moves are updated, but not the ones for workcenter costs.

To reproduce:
- Create an MO with a workorder on a workcenter which has an operating cost set
- Complete time on this workorder to generate the [WC] AALs on this MO
- Change the analytic account on the MO (or delete it)
  Bug: The [WC] AALs never get correctly updated.

This fix builds on https://github.com/odoo/odoo/pull/79614 to correct this behaviour and also take into account changes for the workcenter cost AALs when the analytic_account of a manufacturing order is changed.

Community PR: https://github.com/odoo/odoo/pull/117308

closes odoo/odoo#122396

Task: 3252742
X-original-commit: 35e3af77051d1dfdf54600b607acfb593aa49e34
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Claeys Pieter (clpi) <clpi@odoo.com>
2023-05-25 16:29:50 +02:00
Manushi Shah (mash) 2baa501c4f [FIX] mass_mailing: ensure close button is visible in mobile preview
This commit adapts the style of the close button on the mass mailing "mobile
preview" to ensure that it's visible in both regular mode and dark mode.

Task-3326846

closes odoo/odoo#122394

X-original-commit: 440c0f04c7fe59953bfb2924a668f76316c6215e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-25 16:29:47 +02:00
Jérémy Hennecart (jeh) da38afff6d [FIX] website(_slides): delete autoplay of all iframes in the iframefallback
Delete the autoplay for all iframes in the iframefallback.
The autoplay was causing issue where the sound of the previous video
was played on the background. Now we delete the autoplay for all iframe
directly.
This happened in media_iframe_video, youtube player and vimeo videos.
We can do this for all iframe source url directly as it impacts other
modules like website_slides or website_event_track_live.

task-3012952

closes odoo/odoo#122392

X-original-commit: 6be8af36726d750065972e122e8f4a0aa0f56a17
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Hennecart Jérémy (jeh) <jeh@odoo.com>
2023-05-25 16:29:44 +02:00
aliya 0872475ab5 [FIX] account_peppol: add proxy urls
This commit adds proxy urls for prod and test peppol servers that are missing at the moment.
Additional small fixes:
- `default_peppol_move_state` when receiving a new document should match the state on the iap server
- not committing when running tests

closes odoo/odoo#122385

X-original-commit: ec895c56c36794f76b5b778833cee655a7c9bfec
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-05-25 16:29:42 +02:00
Thomas Lefebvre (thle) e513ff1c55 [FIX] website_sale: authorise the change of shipping address
Steps to reproduce:
Without being logged in,
complete the purchase flow on the ecommerce,
taking care to have a different billing
and shipping address.
If you change the delivery address,
you will get an access error.

Cause:
In some cases, we do not have access to
the `name` field of the `partner` record.

Solution:
Add `sudo` to be able to read the fields.

opw-3276877

closes odoo/odoo#122329

X-original-commit: 1d6ae6bbc765de5673fab5830a81510a1d8857ae
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-25 16:29:36 +02:00
Demesmaeker 217e146022 [FIX] sale,stock: differentiate container names
Following 78ae3da902 names were added to improve the view inheritance.
But some names were duplicates. This commit will ensure every name is unique to facilitate
inheritance.

closes odoo/odoo#122270

Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-05-25 16:29:33 +02:00
David Monnom (moda) da6197a028 [FIX] pos_sale: fix wrong function argument
Following the suppression of the use of useListener in this PR
https://github.com/odoo/odoo/pull/112219. A function adaptation has
been forgotten.

A correction was made so that now the argument in the declaration of
the said function is not decomposed.

closes odoo/odoo#122184

X-original-commit: 6f20131bb97fe174b19da45e8ceb982995261eff
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-25 16:29:30 +02:00
Rémy Voet (ryv) 28d47d1977 [IMP] core: avoid extra invalidate of compute no-store field.
`tocompute` in the `Transaction` contains store field on records to
be recomputed. No-store compute fields are directly invalidated from
the cache when a dependency changes (see `BaseModel.modified`).

In fact, `_recompute_field` was actually doing too much for nothing.
Also, it may invalidate caches of compute no-store fields for no reason
(e.g., if they are searchable). Remove the part for field compute
no-store field. And prevent `_recompute_field` callers from calling it
with no-store fields.

closes odoo/odoo#122147

X-original-commit: ba9ccb07fb12558667db97b866df492fd0f5ba4d
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-05-25 16:29:27 +02:00
Rémy Voet (ryv) 4e0eed85d6 [FIX] core: maximum recursion because of active fields.
In specific situation, unlink can lead to raise a `RecursionError`:
- The model `A` has a many2one `b_id` field toward a model `B`.
This field is set with `ondelete='cascade'`.
- The model `A` has one **store** related field **no-sudo** named
`a_related` (`related='b_id.b_other_field`).
- With `ir.rule` on model `A` with a domain containing `a_related`

You have one record B `b_1` with 20 records A linked to it
(`a_1, ..., a_20`). When you try to unlink `b_1`:

Stack:

  File "...", line 543, in ...
    b_1.unlink()
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 3594, in unlink
    self.env.flush_all()

=> At this point, `a_1, ..., a_20` have already been deleted from the
database because of the 'cascade' deletion. But the ORM doesn't have
any information about this, and `a_related` (for `a_1, ..., a_20`) are
flagged to be recomputed (because it depends on `b_id.b_other_field`)

  File "/home/odoo/Documents/dev/odoo/odoo/api.py", line 732, in flush_all
    self._recompute_all()
  File "/home/odoo/Documents/dev/odoo/odoo/api.py", line 728, in _recompute_all
    self[field.model_name]._recompute_field(field)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 6165, in _recompute_field
    field.recompute(records)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1348, in recompute
    self.compute_value(record)

=> `self.compute_value(recs)` raised a `MissingError` before recalling
`compute_value` with only the first `record` (but others are still in
the prefetch)

  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1368, in compute_value
    records._compute_field_value(self)

=> `a_related` of `record` is removed from to_compute, but only the
first record, not the rest of the records present in the prefetch set.

  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 4194, in _compute_field_value
    fields.determine(field.compute, self)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 100, in determine
    return needle(records, *args)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 689, in _compute_related
    values = [first(value[name]) for value in values]
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 689, in <listcomp>
    values = [first(value[name]) for value in values]
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 5860, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 2772, in __get__
    return super().__get__(records, owner)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1186, in __get__
    recs._fetch_field(self)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 3162, in _fetch_field
    self._read(fnames)

=> `_read` tries to read the first record + others from the prefetch set

  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 3215, in _read
    self.with_context(active_test=False)._flush_search([], order='id')
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 4607, in _flush_search
    self.env[model_name].flush_model(field_names)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 5560, in flush_model
    self._recompute_model(fnames)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 6134, in _recompute_model
    self._recompute_field(field)

=> This is where the recursion starts, record compute will move forward
one by one. But sadly, the stack grows very fast, and with only a few
(already deleted) records to recompute, the issue will be generated.

  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 6165, in _recompute_field
    field.recompute(records)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1348, in recompute
    self.compute_value(record)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1368, in compute_value
    records._compute_field_value(self)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 4194, in _compute_field_value
    fields.determine(field.compute, self)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 100, in determine
    return needle(records, *args)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 689, in _compute_related
    values = [first(value[name]) for value in values]
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 689, in <listcomp>
    values = [first(value[name]) for value in values]
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 5860, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 2772, in __get__
    return super().__get__(records, owner)
  File "/home/odoo/Documents/dev/odoo/odoo/fields.py", line 1186, in __get__
    recs._fetch_field(self)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 3162, in _fetch_field
    self._read(fnames)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 3215, in _read
    self.with_context(active_test=False)._flush_search([], order='id')
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 4607, in _flush_search
    self.env[model_name].flush_model(field_names)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 5560, in flush_model
    self._recompute_model(fnames)
  File "/home/odoo/Documents/dev/odoo/odoo/models.py", line 6134, in _recompute_model
    self._recompute_field(field)

How to fix it:
Move the logic of the MissingError of `_recompute_field` inside the
`recompute` directly.

X-original-commit: c2aac02ac4f8c5cc4a9324134535393bd97338ce
Part-of: odoo/odoo#122147
2023-05-25 16:29:26 +02:00
Rémy Voet (ryv) 8f600f8a4b [REV] core: handle recursion error when resolving stored fields
This reverts commit 9e71094582ec4c9b719431e77538da8f91ffa9e3.

Why?
- It is useless in 16.0, the bug it claims to fix should not exist. In the
commit explanation the sentence 'this calls `_read`, which flushes the
field we're trying to read' is wrong, since
https://github.com/odoo/odoo/pull/66938 (merged in 15.5). (It is still true
for fields that are in an ir.rule, but it sounds very unlikely to have
a recursive field in ir.rule that causes trigger the problem)
- It creates worst errors (infinite loop for recursive field computation on
missing record - Next commit).
- Also, it looks like a dangerous fix that can hide or trigger new
issues.

X-original-commit: 4a46c1049a4cdc15f0e211d228fb976ba7a0173d
Part-of: odoo/odoo#122147
2023-05-25 16:29:26 +02:00
Aditya Sharma 64ba10525b [IMP] website_crm_partner_assign: add phone and email on portal page
Purpose:

Improve the lead and opportunity list displayed on the partner portal.

Specification:

-> Add the Email and Phone field to the list of the lead and the opportunity.
-> Change the name label of the lead's list with Lead.
-> Change the name label of Opportunity's list with Opportunity.

Task-3300626

closes odoo/odoo#121342

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-25 16:29:16 +02:00
Adrien Guilliams (adgu) 60f41b1f83 [IMP] pos: Change waiter screen
The PoS needed improvments for the mobile use.
This commit is changing the display of some screen and popups
like the NumberPopup. It also changes the logic of the
order count badge on the table. It now displays the number
of orderline (and their quantity) to send to the printers
or preparation display if there is at least one.

closes odoo/odoo#121286

Related: odoo/enterprise#41013
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-25 16:29:11 +02:00
Pieter Claeys (clpi) 439ca89a68 [IMP] stock: stock rule warehouse fallback
In stock_rule.py, the get_rule method uses the warehouse_id in the
values dict to look for rules, leading to frequent errors when the
warehouse_id is not set.
This small change uses the warehouse_id on the provided location as
a more intelligent fallback in case no warehouse_id was provided.

Task: 2479234
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

closes odoo/odoo#114315

Related: odoo/enterprise#37764
Related: odoo/upgrade#4514
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-25 16:28:56 +02:00
Pieter Claeys (clpi) a7aff968b7 [IMP] stock: option to replenish product on scrap
Added a checkbox to run a replenishment of the scrapped quantities.
If the option is selected and replenishment is impossible, an error message is presented to the user upon trying to validate the scrap order.

Task: 2479234 (nr 11)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:56 +02:00
Pieter Claeys (clpi) a080337d7e [IMP] stock,mrp: allow scrapping of kits
When creating a scrap order on a product which has at least one kit BoM, an option is added to create a scrap order for this kit.
The user can select from the kit BoMs of this product and the scrap order will add stock moves for all the components of the selected kit instead of for the product itself.

Task: 2479234 (nr 9)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:55 +02:00
Pieter Claeys (clpi) a235d3e968 [IMP] mrp: remove quantity consumed check on close MO
Allows to close an MO even when all consumed components are 0.

To avoid cancelling the MO immediately when it is confirmed without any
raw moves, a change was also implemented in stock_move to skip the
check to remove the linked MO in case `skip_mo_check` is set in the
context.

Task: 2479234 (nr 7)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:55 +02:00
Pieter Claeys (clpi) 9ce0fcba50 [IMP] mrp: production view updates
Add the scheduled production end date to the form and list views and
reorder the filter list.

Also fixes a bug where the end date of an MO without any workorders
was set incorrectly upon closing the MO.

Task: 2479234 (nr 5)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:55 +02:00
Pieter Claeys (clpi) 7d73a070d5 [IMP] mrp: show+search lot/serial in workorder kanban
Adds the option to search workorders by lot or serial number and
displays the lot/serial number on the workorder kanban view
(if applicable).

Task: 2479234 (nrs 3,10)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:55 +02:00
Pieter Claeys (clpi) eb6aab7ad0 [IMP] mrp, analytic: Add WIP report, optional columns in analytic line tree view
Adds a new WIP report to analytic line items and makes the Gross Margin list view more customisable by making the fields optional=show.

Task: 2479234 (nr 2)
Community PR: https://github.com/odoo/odoo/pull/114315
Enterprise PR: https://github.com/odoo/enterprise/pull/37764

Part-of: odoo/odoo#114315
2023-05-25 16:28:54 +02:00
Valentin Chevalier acbdb07c98 [FIX] website_sale: ensure lang and website_id on partner creation
by using the `request.website` context

closes odoo/odoo#88374

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-04-13 11:44:50 +02:00
Carlos Dauden d43c5689b2 [FIX] stock: _log_less_quantities_than_expected call _log_activity_get_documents with empty dict and raises error
closes odoo/odoo#122412

X-original-commit: 63a182f0931c44ba4f0b83bb1abf87385a2eaf38
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-25 13:49:57 +02:00
niyasraphy 8aa624c7ed [REF] phone_validation: class attribute to bypass the length validation
before this commit, if user need to bypass the validation
added for the length in custom module, the entire function
has be rewritten in the custom module.

scenario:

* add the phone_mobile_search field to the name search of res.partner model

* then open sale order form, and in the customer field enter any letter or digits, this user
error will be raised

after this commit, users just need to change the class
attribute: _phone_search_min_length in the
inherited module.

closes odoo/odoo#122411

X-original-commit: b89f948ef4789ec8dc400ef8c8e40778d5bbe406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-25 13:49:55 +02:00
Abdelouahab (abla) c89b2ddab3 [FIX] website_slides: avoid completing slide when not being a member
To reproduce
============
- add video to a course
- remove user from course if user is enrolled
- open video in full screen mode and play it
- move nearly to the last part of the video so that is detected as completed
- an error will occure

Problem
=======
- when the video is detected to be completed we want to mark the slide as completed
- as the user is not a member, we can't retreive the current slide which is the source
of this issue

Solution
========
as the use is not a member, marking the slide as **Completed** dosen't make any sense,
so checking if the user is member, should solve the problem.

opw-3295662

closes odoo/odoo#122393

X-original-commit: 885d8a18d06d3d3181a345a3fda2a420824f9896
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-25 13:49:52 +02:00
Aaron Bohy c174291e38 [FIX] web_tour: trigger an event when a step is consummed
Commit [1] converted the tour system to owl. In the legacy version,
it was possible to override a function to execute custom code when
a step was consummed. This was lost in the refactoring. This commit
introduces a bus on the tour service, and an event is triggered on
that bus each time a step is consummed.

[1] odoo/odoo@3a798039d6

closes odoo/odoo#122386

X-original-commit: 08331095d56eb5b0a4128f1776d6f6d3a4697dc0
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-25 13:49:50 +02:00
Paolo Gatti (pgi) e6d4ab62e9 [FIX] l10n_it_stock_ddt: Print not printing DDT in case of Dropshipping
The visibility of the "Print" DDT button wasn't taking into
consideration the dropshipping case.

closes odoo/odoo#122328

X-original-commit: 8a45ae0842a6ac08b321e44113896581d9af42bd
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-25 12:23:34 +02:00
Andrea Grazioso (agr-odoo) 4d32efba90 [FIX] l10n_it_stock_ddt: support dropshipping in ddt
Have an IT company configured
Activate Dropship
Create a Product P with dropship enabled and vendor configured
Create a quotation to an IT customer, add P to a line, confirm.
Purchase will be created automatically, confirm it.
Go to dropship picking, confirm, print

The DDT report does not show up correctly:
- Warehouse address is the company address
- Customer address is the vendor address

opw-3128812

X-original-commit: b8fe190bdfbe9901426344acf26e18c0ca52794c
Part-of: odoo/odoo#122328
2023-05-25 12:23:33 +02:00
vlst b1d166bb80 [IMP] pos_self_order: Change style of buttons in settings
The buttons for the QR Code Menu setting are quite unappealing. This PR changes their style.

Closes 3338270

closes odoo/odoo#122301

Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-25 12:23:30 +02:00
Habib (ayh) 655e1ea63c [IMP] web: stop autocomplete click event
The analytic_distribution component used an extension of the AutoComplete component for 2 reasons.
1. to get access to the focus event
2. to stop propogation of the autocomplete input click (which prevented the analytic popup from functioning well)

The need for the focus event was removed, and it doesn't make sense to maintain an extension to simply stop event propogation. For this reason, the extension was removed, and the `.stop` is added directly to the AutoComplete

Part of task-3180055

closes odoo/odoo#122424

X-original-commit: ebee32b8aa994bfd3fd375f6deb10676356a5d4a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-05-25 11:07:22 +02:00
Habib (ayh) db39fa70d1 [IMP] analytic: add search more option
Allow users to find analytic accounts in the analytic widget if there are more than 7 results for their search criteria, by providing a Search More option.

Additional Enhancements include:
- remove the 'Add a Line' button. replace with an empty tag (no analytic account, remainder of distribution)
- remove the custom AutoComplete. this was used to set the active group on autoComplete focus, and to prevent propogation of click events.
- no longer keep track of the active group (editing plan). Instead pass the group (plan id) to the relevant functions.
- rename variables, for example request > searchTerm
- keep the header of the popup in place (no scroll when there are many tags)
- test the widget in list view (with the search more feature)
- add a new analytic account list view, as users should not multi-edit in the search more dialog

Current behavior before PR:
Users were forced to type the entire analytic account name if they had many analytic accounts with similar names.

forward port of 36391b9aea82091bf7b689658e07149860b01a61
Desired behavior after PR is merged:
A "Search More" option is added to the Autocomplete options when there are more than 6 analytic accounts found. The Search More option provides a SelectCreate Dialog where users are able to find the required analytic account easily. Users are able to select multiple accounts by checking the items in the list.

Task-3180055

Forward port of bef8e00d78f439936534cef8b2fd8313f03f3b1c

X-original-commit: 9f12669bcc1f23198d12a97b31feb6cb82894e11
Part-of: odoo/odoo#122424
2023-05-25 11:07:21 +02:00
clesgow eab3b230d3 [FIX] mrp: use qty with uom in overview first line
Steps to reproduce :
- Create a product with a default `kg` uom
- Create a MO to produce 100 `g` of this product
- Open the MO Overview
- The first line indicates we try to produce 0.1 `g`.

For a `mrp.production`, `product_qty` is the quantity using the record's
linked uom, while `product_uom_qty` is the quantity using the product's
default uom.

closes odoo/odoo#122417

X-original-commit: 825d69636453d45f689983d1948850f35a696534
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-05-25 11:07:09 +02:00
Paul Morelle 215bf5397e [FIX] website_customer: make res.partner.tag.classname overridable
The selection function get_selection_class for the field classname has
obviously been thought to be overridable by subclasses in order to add
new selection classes if need be.

However, before this commit the method was passed directly to the
Selection constructor, which used the callable object directly. If it
was overridden by a subclass, the Selection object would still use the
same non-overridden callable instance.

With this commit, we give the name of the method instead of the
callable, which makes that the method is resolved after all overrides,
and therefore the resulting selection will be the overridden one.

closes odoo/odoo#122416

X-original-commit: 91bea59678c92dbb06151dbf757398f588aeefdb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
2023-05-25 11:07:03 +02:00
paso-odoo a2e282d04d [FIX] l10n_id_efaktur: fix the issue of invalid literal base10 in efaktur
If applied, this commit will solve the min-max issues for efaktur.

- invalid literal for int() with base 10: when we enter all characters
string in the min or max it will raise an error like this.

- Error is also raised when the min or max is blank and try to save the
record.

So, I have update the value as 0 if the min value or max value not
generated.

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

Sentry - 3936020226

closes odoo/odoo#122340

X-original-commit: 78ecfd66f1d6e043cefa4f88faa49505e4418f06
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-24 23:25:56 +02:00
Hoang Tien Dung a4e00c586c [CLA] signature cla for hoangtiendung070797
closes odoo/odoo#122285

X-original-commit: b061cf714cbd24b4c6cd39dc1b968d69857d74af
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-24 18:17:43 +02:00
Nasreddin Boulif (bon) 7359b47a81 [FIX] event[_sms]: send emails direclty after attendee confirmation
Steps to reproduce:

  - Install `Events` module
  - Create a new event and set it to `Autoconfirmation`
  - Create a new attendee and confirm it

Issue:

  Mail that confirm registration is not sent to attendee.

Cause:

  When computing the `schedule_date`, it take the value of the
  `registration_id.create_date` WITH the microseconds.

  When creating a new attendee, at some point we run the mail schdelure
  that compare if the `schedule_date <= now`.
  `schedule_date` and `now` have same value except for the microseconds
  (set on `schedule_date` but not on `now`).
  Therefore `schedule_date > now` and the mail is not sent.

Solution:

  Remove microseconds from the schedule_date.

opw-3079389

closes odoo/odoo#122188

X-original-commit: f2adca45dcec5a11daa92d07bae00615210ea0de
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-05-24 17:05:46 +02:00
Mahamadasif Ansari d4192a3337 [IMP] account_edi_ubl_cii: add base_vate module in dependency
AttributeError: "res.partner" object has no attribute '_run_vat_test' log error
is generated, and nothing is imported when users upload invoice file that have a
VAT field. This is because the "_run_vat_test" attribute is defined in the
"base_vat" module and is not installed due to countries not having VAT.

This commit add the 'base_vat' in depends to prevent above error.

sentry-4074943505

closes odoo/odoo#121747

Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-24 17:05:43 +02:00
Alexandre Kühn 54eeb14123 [FIX] mail: correct style for discuss call
closes odoo/odoo#122288

X-original-commit: 8c69f8d57b87bf4247ed5b97a24bb2d7c0221b8b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-24 15:45:35 +02:00
paso-odoo 882d91a828 [FIX] loyalty: fix missing loyalty product update issue
If applied, this commit will solve the issue of missing product issue while
installing the following modules: loyalty_delivery, pos_loyalty, sale_loyalty,
website_sale_loyalty

Steps to produce:
- Install loyalty module.
- Go to 'Products' or 'Product Variants'.
- Delete the product 'Gift Card'.
- Now install the 'sale_loyalty' module.

This commit will raise an userError while deleting the loyalty products.

sentry - 4112536971

closes odoo/odoo#121484

X-original-commit: 3488d292b514bbf4190f19bd8271b3e68b3eb055
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-05-24 15:45:26 +02:00
kir-odoo c3b7a87462 [IMP] stock: improvements in replenishment wizard
With this commit:
========================
- Added a new field `forecasted_qty` in replenishment to display the
  forecasted qty based on a selected warehouse in the wizard
- Changed the `route_ids`(m2m) field to `route_id`(m2o) so that
   we can apply a specific route for the
  replenishment instead of the product's default routes
- Reduced the width of all the fields
- Remove the time from the scheduled date and make the unit field not editable.
- Can see vendor information with info icon field when buy is selected
- Hide the Dropship route from the Route

TaskId : 2579425

closes odoo/odoo#96948

Related: odoo/upgrade#3796
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-24 15:45:23 +02:00
Hamza (hisl) 602e1c77b3 [FIX] purchase : correct line id for invoice origin
Steps to reproduce:

1. Create a bill from document,
2. Fill in PO in auto complete, confirm, check the bills list.
3. The source document is not populated in the list.

What is the current behavior that you observe?
The source document is in the log, but does not show up in the dashboard.

What would be your expected behavior in this case?
The PO should show up in the source document in the list

OPW-3284992

closes odoo/odoo#122280

X-original-commit: e3289decaf95034f0ebba307350d3913a604eb8d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-24 14:28:28 +02:00
Adrien Guilliams (adgu) a04adfac93 [FIX] pos: fix pos traceback when delete order
This commit resolves 2 bugs.
The first one is that, in a PoS without pos_restaurant installed,
if we delete the last order of the list, we get a traceback.
This is resolved by adding an empty order if there is no order left
in the order list.

task-id: task-id: 3291831

The second bug is that, with pos_restaurant installed,
when going to a retail PoS, if we createan order with some products,
then create a new order from the TicketScreen, add some products,
go the the TicketScreen and delete the current order
and then click back, we have in the ProductScreen the order
that is supposed to be deleted.
This order doesn't show up in the ticket screen anymore.
This comes from the fact that the _selectNextOrder function is
not correctly implemented, leading to the next order not being
chosen because we do not have a table (we are in classic PoS).
This fix resolves this problem by changing the _selectNextOrder
function and the newly added addOrderIfEmpty function in models.js.

closes odoo/odoo#122269

Task-id: 3291821
X-original-commit: cd956daf21695bef4753301fe29a6ece1e97d32a
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-05-24 14:28:25 +02:00
tsm-odoo 314b19610c [FIX] bus: remove simple notification service from frontend
Since [1], the notifications of type `simple_notification` are
handled by a service in the bus module.

Before [2] those notifications were handled by the messaging handler
which was only loaded in the backend.

This commit restores the previous behavior as the simple notification
service starts the bus service which result in the websocket worker being
loaded why it should be done lazily (i.e. only when the livechat is used).

[1]: https://github.com/odoo/odoo/pull/119243
[2]: https://github.com/odoo/odoo/pull/110188

closes odoo/odoo#122266

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-24 14:28:23 +02:00
aliya 98bc8bf129 [FIX] account_edi_ubl_cii: fix checkbox_ubl_cii_label
In Send and Print wizard (`account_move_send`):
1. Choose a company, eligible for ubl
2. Create two invoices for different partners: one that can receive ubl and one that cannot
3. Select both invoices in the list view and try to send them

A traceback occurs because one of the partners has `ubl_cii_format` and the other one doesn't. So we try to get `code_to_label[False]` and it breaks.
The ubl xml file will be generated only for the valid invoice anyway, so this fix should not cause any side effects.

closes odoo/odoo#122253

X-original-commit: 67ffc0f7762f685ad68d9c873800140918b38ca1
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-05-24 14:28:17 +02:00
tsm-odoo e2fbff5511 [FIX] im_livechat: fix chatbot restart message display
Markup usage has been enforced in the mail module since [1].

Since the `chatbot_restart` method doesn't make use of it,
the content is escaped and the whole html structure is
printed to the DOM.

This PR fixes this issue.

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

closes odoo/odoo#122251

X-original-commit: 4909bdfbb0354310f3e6d21e1ecc7177b74b34bc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-24 14:28:14 +02:00
Josse Colpaert bbf4fb625b [IMP] account_edi: refactor method to override mail attachments in localizations
closes odoo/odoo#122187

X-original-commit: 8d815adb0254256aa707d8c5568330adf25d83c1
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-24 14:28:12 +02:00
Arnold Moyaux a78bba1214 [FIX] stock: prevent the import of stock.move.line with reserved quantity
Use case: Create an import file for a picking with stock.move.line
directly in it and add some reserved quantity on the stock.move.line.

The import of stock.move.line is not possible directly via a
stock.move.line menu but it still possible on a picking or
mrp.production import. However the create does not expect that and never
reserve the quants. So it result with quant <-> sml inconcistencies in
the data and the error can not reserve more than you have in stock.

opw-3277938

closes odoo/odoo#122156

X-original-commit: 3e78316a51f2cb8d347af1b87abcdcb775107115
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-24 14:28:09 +02:00
Abdelouahab (abla) 90c94b0de1 [FIX] hr_expense: scrolling in tree view
To reproduce
============
create many Expenses records, go to expenses in List View
scrolling not working

Problem
=======
some style classes are not applied on the correct element, which leads to this behavior

Solution
========
apply the classes on the correct element

opw-3300041

closes odoo/odoo#122133

X-original-commit: b7bc19e30afaf1e6374620b7a3bfbdf26c63e765
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-24 14:28:06 +02:00
Samuel Degueldre c7ce04a8ed [REF] point_of_sale, pos_hr: remove HeaderButton
The HeaderButton component is used once and is mostly presentational,
this commit inlines it into the navbar.

closes odoo/odoo#122035

Related: odoo/enterprise#41336
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-24 14:27:59 +02:00