Commit Graph
164380 Commits
Author SHA1 Message Date
miad-odoo d31b3ecb84 [IMP] mail: add mixin to compute many2one duration
This commit implements a mixin, `MailTrackingDurationMixin`, that can be added
to a model with a `many2one` field. It computes the time a record spends in each
value the many2one field takes and stores it in a JSON field
(`duration_tracking`).

The primary use is with the StatusBarDurationField
(`widget='statusbar_duration'`), to compute and display the time a record has
spent in each stage in the form view statusbar.

To specify on what field the computation has to be done, the model that inherits
from this mixin has to specify  `_track_duration_field`.  (e.g.
_track_duration_field = 'stage_id')

Computation is based on `mail.tracking.value` messages, so tracking has to be
activated for that field.

Task-3032773

Part-of: odoo/odoo#108554
2023-07-18 13:07:41 +02:00
Lucas Vermeulen (luve)andMorgane Demesmaeker a3ee978f1b [IMP] (*_)loyalty: restrict programs to specific pricelist(s)
When specified, restrict the promotion to customers using said pricelists

task-3049956

closes odoo/odoo#107656

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Lucas Vermulen (luve) <luve@odoo.com>
Co-authored-by: Morgane Demesmaeker (edm) <edm@odoo.com>
2023-07-18 13:07:34 +02:00
Loan (LSE) bbe22683b5 [FIX] pos_six: missing "Send balance" button
To reproduce (16.1 and >):
 1. Install PoS and enable Six payment method
 2. Create a payment method using Six
 (the IP can be set randomly, it does not matter here to have the
 terminal connected)
 3. Add the Six payment method to the PoS configuration
 4. Open the PoS session
-> The "Send balance" button of the navbar is totally missing

For now, the manifest try to load the assets at:
`pos_six/static/src/app/**/*`
But, since 16.1 the file location for the XML and JS is misplaced in
`/static/app` instead of `/static/src/app`,
as such, the template file is missing.

opw-3422166

closes odoo/odoo#128813

X-original-commit: 859390a42cb8b2b10b017dca2ea5734cd8915c49
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-07-18 11:42:47 +02:00
Saurabh Choraria a85bc31c04 [FIX] website_slides: prevent traceback while accessing archived embedded slide
When user archive a slide from a course and try to access route
'/slides/embed/<int:slide_id>' of that particular slide, user get the error.

steps to reproduce:
    1. Go to Website and click on courses menu.
    2. Open a course and archive a slide in it.
    3. Then go to '/slides/embed/<int:slide_id>' route.
    4. Access that particular slide that you have archived in route.
    5. The error will occur.

Applying this commit will fix this issue.

sentry-4025579653

closes odoo/odoo#128797

X-original-commit: c097112109fb2de003242bda89e10e656236b774
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-18 11:42:39 +02:00
Carlos Roca 72edf3c885 [IMP] event_sale: Allow extend event configurator to write more fields than 2 defined.
Before this change, if you tried to extend the event configurator to add new fields,
it was not possible because only the two defined fields (event_id and event_ticket_id)
were updated.

After this change, all fields that are returned in the closeInfo.eventConfiguration
will be updated.

This is useful to avoid redefining the _openEventConfigurator function again and
to make this functionality more extensible.

closes odoo/odoo#128792

X-original-commit: 0002d38dd074a537568b4aba4588b285c06356d9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-18 11:42:37 +02:00
Xavier-Do 4c9968397b [IMP] base: avoid invalidation on xmlid updates
Splitting the cached revealed a missing cache invaldation.
The cache invalidation added a a query in test_related_fields

The query can be avoid by not updating the xmlid if it is not useful.

closes odoo/odoo#119813

Related: odoo/enterprise#42527
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-07-18 11:42:27 +02:00
Xavier-Do 88786dde49 [IMP] base, website: add an api to populate the cache
Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Xavier-Do 402e5d0acb [FIX] microsoft_calendar: remove unused _from_uids
Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Xavier-Do b373c32c4d [FIX] base: don't invalidate for all company.write
The cron hr_presence will write hr_presence_last_compute_date on company
leading to an invalidation of the cache.

This commit makes the invalidation based on a list of field.

This may break some non tested behaviour, will be a good opportunity to
add test if any bugfixes is linked to this change.

Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Xavier-Do 595aa24843 [IMP] registry: multiple ormcache
One of the main issue with ormcache is that the invalidation clears
everything, meaning that some value, slow to compute but with a long
lifetime, can be removed from the cache because an easy to invalidate
value is cleared, like after writting or creating a product has an
example.

Most example in the code will try to invalidate the cache of the models
doing something like `env['ir.qweb'].clear_caches()` but it is
finally equivalent to `env.registry.clear_cache()`, and cross worker.

The idea is to have multiple cache, maybe with specific sizes for a
specific purpose.

Having one per model is maybe a bad idea because it will be difficult
to size the LRU correcly, and it is too dynamic. Checking invalidation
may be expensive.

The proposed solution is closed allow a limited number of named caches,
using onse sequence per cache. This is actually close to the
cache_longterm.

We want to discourage using a specific cache for one use case in
the buisness code. Adding a cache shouldn't be something easy, doable
in stable.

Note that we could also change the invalisation mecanism using an
insert only table. We an check the sequence of this table, but also
fetch all invalidation messages.
Another possible improvement, especially if we have more than x cache is
to have a global sequence, checking signaling would mean to check the
main sequence, and only the other ones if the main one changed.

Note that this poc is inspired from the long term cache but not all
use case where applie yet.

Part-of: odoo/odoo#119813
2023-07-18 11:42:26 +02:00
Xavier-Do dda0f64cf7 [FIX] base: avoid cache_invalidation on settings
A cache invalidation was triggered when displaying the settings page
because of a write on ir.property

    return call_kw(request.env[model], method, args, kwargs)
  File "/home/xdo/osrc/master/odoo/odoo/api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/xdo/osrc/master/odoo/odoo/api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/xdo/osrc/master/odoo/odoo/models.py", line 6689, in onchange
    record._onchange_eval(name, field_onchange[name], result)
  File "/home/xdo/osrc/master/odoo/odoo/models.py", line 6403, in _onchange_eval
    res = method(self)
  File "/home/xdo/osrc/master/enterprise/sale_stock_renting/models/res_config_settings.py", line 17, in _onchange_padding_time
    self.env['ir.property']._set_default("preparation_time", "product.template", self.padding_time)
  File "/home/xdo/osrc/master/odoo/odoo/addons/base/models/ir_property.py", line 203, in _set_default
    prop.write({'value': value})

This commit will avoid this by checking the current value.

Part-of: odoo/odoo#119813
2023-07-18 11:42:25 +02:00
Xavier-Do a0c1f41780 [IMP] base, website: small refactoring
Mainly to simplify website overrides and general api

Part-of: odoo/odoo#119813
2023-07-18 11:42:25 +02:00
Gauthier Wala (gawa) 3c631d4378 [FIX] l10n_pl: tax report sequence and formula
Fix to the commit https://github.com/odoo/odoo/commit/cd799a6bdf7ac6897ca9561342f6e39bea1dba25
The problem being that the formula shortcut of the line account_tax_report_line_do_przeniesienia
has not been emptied, which makes the upgrade create a second balance expression,
which is prevented.
We also have problem with sequences (for example the line account_tax_report_line_kasy_rejestrujace).

It makes it that people having upgraded or created
a db before the commit can't update the module or upgrade to upper versions.

[TBG](https://upgrade.odoo.com/web#id=791&action=178&model=upgrade.request.traceback.group&view_type=form&cids=1&menu_id=107)
[upg-868024](
https://upgrade.odoo.com/web#id=868024&active_id=868024&model=upgrade.request&view_type=form&cids=1&menu_id=107)
[upg-845419](
https://upgrade.odoo.com/web#id=845419&active_id=845419&model=upgrade.request&view_type=form&cids=1&menu_id=107)
[upg-765801](
https://upgrade.odoo.com/web#id=765801&active_id=765801&model=upgrade.request&view_type=form&cids=1&menu_id=107)

closes odoo/odoo#128808

X-original-commit: 0e76fa6c9a6644bb3dc98b1d04be492b907c2318
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-07-18 10:20:08 +02:00
Benjamin Vray 8423c0dd90 [FIX] web_editor, website: fix image link option broken
Since this commit [1], when clicking on an image that is not a link and
then clicking on an image that is a link, the first image that is not a
link becomes a link.

This issue occurred because we were triggering
'activate_image_link_tool' in 'toggleLinkTools' before the options for
the selected image were ready. As a result, 'activate_image_link_tool'
was being triggered on the previous image (the one that is not a link),
causing it to become a link.

To fix this, we now only trigger 'activate_image_link_tool' if the URL
input needs to be focused (e.g., when clicking on the "edit link" button
in the image popover).

Steps to reproduce the bug:
- Drag and drop a "Columns" Snippet onto the page.
- Click on the image of the first column.
- Click on the button to create a link in the options of the image.
- Type "/" in the url input.
- Click on the image of the second column.
- Click on the image of the first column.
- Click on the image of the second column.
- Bug: a link is added on the image of the second column.

This commit also modifies the "link_tools" test to avoid this bug
reappears.

[1]: https://github.com/odoo/odoo/commit/11ee7d5520c3a14a381b3f5b973114670f1e2edb

task-3422238

closes odoo/odoo#128806

X-original-commit: fef32aa339177a2ca008ab988cb0ac0a670c110c
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-07-18 10:20:05 +02:00
Kevin Baptiste 9c0d20fa27 [FIX] hr: trust account when needed
Changing the value of `allow_out_payment` when it was already set to
False would trigger an AccessError.

closes odoo/odoo#128800

X-original-commit: 74f15362beaf967cefe509d5b9b66c5436bb661b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-18 10:20:02 +02:00
Dylan Kiss (dyki) b3b0e3f138 [FIX] account: no error on unlinking unposted moves before lock date
Currently when unlinking moves, we check whether the dates of these
moves are not before a lock date. If so, we show an error to the user.

However, if the move is not posted, we have no reason to show an error,
since unlinking an unposted move, even before a lock date, is a valid
operation. This change only checks the lock date for posted moves.

opw-3305506

closes odoo/odoo#128701

X-original-commit: 1d18a5e4aaa254eba2b12cf1bae19ac2cc4c3c6f
Related: odoo/enterprise#44199
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-07-18 10:19:55 +02:00
Julien Mougenot 8ce99b1eb1 [FIX] web: display daterange separator in readonly
Before this commit, a forward-ported fix regarding the display of the
arrow separator in daterange fields has been incorrectly adapted to fit
conflicting changes, and the separator does not appear in readonly with
both date values set.

This commit fixes that by restoring the proper conditions.

closes odoo/odoo#128509

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-07-18 10:19:53 +02:00
niyasraphy 424b4f0f23 [IMP] point_of_sale: add total field to pos.order.report tree
before this commit, the total amount of the order
is not displayed in pos.order.report tree view.

* point of sale -> Reporting -> Orders

* switch to pivot view

* click on any pivot cells

* in the tree view, no information about the order amount

after this commit, the total will be shown to
the user in tree view.

closes odoo/odoo#126003

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-18 10:19:50 +02:00
niyasraphy 4005ef7667 [IMP] point_of_sale: rec_name for report.pos.order
before this commit, on opening the form of
report.pos.order model the breadcrump is
shown as report.pos.order(1) , ie, model_name id

after this commit, the rec_name (order number) is set
for the model and clean breadrcump will be shown

Part-of: odoo/odoo#126003
2023-07-18 10:19:50 +02:00
Joseph Caburnay a493df731a [FIX] point_of_sale: pass event on the input event handler
During the forward port of the following PR:
https://github.com/odoo/odoo/pull/127730, the event was not passed to the input
event handler, which causes an error when the user tries to enter a new value
for the the other payment methods.

This commit appropriately passes the input event to the handler.

closes odoo/odoo#128801

X-original-commit: 70ea3d8998d873a7649f57af3bbd8aa82daac6ad
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-18 09:07:18 +02:00
Adrien Widart (awt) 01a86d8cb8 [FIX] mrp_subcontracting_dropshipping: dropship twice from same vendor
To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Edit the route "Dropship Subcontractor on Order":
   - Open the Buy rule:
     - Propagation of Procurement Group: Leave Empty
3. Create three products P1, P2, P_comp:
   - Storable
   - With a vendor (V1, V2, V_comp)
   - P_comp's routes:
     - Dropship Subcontractor on Order
4. Create a BoM:
   - Product: P1
   - Type: Subcontracting
   - Subcontractors: V1
   - Components: 1 x P_comp
5. Repeat step 4 with P2 and V2
6. Create and confirm a PO:
   - Vendor: V1
   - Products: 1 x P1
7. Repeat step 6 with V2 and P2
8. Open the purchase orders list

Error: There is only one PO with V_comp. It contains 2 x P_comp and
the dropship address is P1. This is incorrect. There should be two
PO, one for P1 and another one for P2

When confirming the PO, a MO is created (subcontracted) and then the
system creates and processes a procurement for the component.
Because of the component's routes, it leads to the `_run_buy` method.
It will check whether a PO already exists or has to be created. To do
so, it creates a domain based on few criteria, such as the value of
`dest_address_id`:
https://github.com/odoo/odoo/blob/6d28c9c2e5ea3e9a3b8a872627a411bbfe2f2a59/addons/mrp_subcontracting_dropshipping/models/stock_rule.py#L17-L21
But here is the issue: `partner_id` is not defined.

OPW-3370648

closes odoo/odoo#128791

X-original-commit: 094e45d120c525d8b65bca7c0d10d10dbb6383cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-07-18 09:07:16 +02:00
Touati Djamel (otd) d4451de884 [FIX] mrp: update the quantity in the MO unit of measure
Steps to reproduce the bug:
- Create a storable product "P1":
    - Unit of measure: KG
    - Bill of Materials for 1 "g" of "P1":
        - Component: 1 unit of "C1"
    - Route: Manufacture
    - reordering rule: Min 0, Max 0
- Create a Sales Order with 510 g of "P1" and confirm it.
- A Manufacturing Order for 510 g of "P1" will be created.

- Create a second SO with 510 g of "P1" and confirm it.

Problem:
The quantity in the MO will be updated to 1.02 g of P1 instead of 1020g

"Whenever we update the quantity, the `_run_manufacture` function is
triggered. Consequently, we use the `product_uom_qty` from the
manufacturing order to calculate the remaining quantity. However,
this field is computed, and it converts the quantity into the unit of
measure of the product, rather than that of the manufacturing order.

https://github.com/odoo/odoo/blob/3b801a6d48f1feffd1b87a7d54731ab58e8d63e9/addons/mrp/models/stock_rule.py#L75

https://github.com/odoo/odoo/blob/5118d248ccf16fe4d2703c2a64e0267f783a56d1/addons/mrp/models/mrp_production.py#L171-L172

Opw-3410254

closes odoo/odoo#128776

X-original-commit: 04371c0ec777cede50e940f45064f86cb4cb8964
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-07-18 09:07:13 +02:00
Victor Piryns (pivi) 3ef3d3a8c1 [FIX] sale_timesheet: don't count expense as record hours on SO
Issue:
Expenses linked to an SO are counted as 1 hour of timesheet linked
to the SO.

Steps to reproduce:
- Install Sales, Timesheets, Expense
- Create an SO and sell a service that creates a Task > Confirm
- Log some timesheet on the task (3h for ex.)
- Create an expense related to the SO, approve it and generate the
  journal entries.
- On the SO, the smart button shows 4h clocked, and when you click
  on it, the expense line is showed, which shouldn't be the case.

Cause:
Incorrect domain taking the `order_line` without filtering on the
fact that they may be expenses or not.

Fix:
Specify the domain on the action to exclude expense lines.

Affected versions:
- 14.0 - count is correct, only action is showing more lines
- 15.0 - same as described in the commit msg
- saas-15.2
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master

opw-3302460

closes odoo/odoo#128764

X-original-commit: 7ee275a4a454898989d15f42941f4a1bb7a48db9
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-07-18 09:07:11 +02:00
David Monnom (moda) b4339b49a0 [IMP] pos_restaurant: online table booking
Adds the possibility to book a table online from the website.
The booking is then visible in the POS.

When a new table is created in the PoS, a linked resource is created
in the appointment application, which allows the user to add these
resources to appointment_types, authorising visitors to reserve tables
online.

In pos_config, you need to choose an appointment_type via which the
appointments will be retrieved

A websocket has been integrated to retrieve new bookings instantly
from the PoS, which are displayed directly on the tables.

closes odoo/odoo#124850

Related: odoo/enterprise#42489
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-18 09:07:06 +02:00
Gurupreet Singh c6ff1034a7 [FIX] project: fix groupby by none issue in project sharing
Steps:
- Go to portal and select tasks and search anything in search bar.
- Showing  no tasks available
- choose group by none and search anything it will show table labels.

Fix:
shows warning when there is no record when groupby by none.

task-3183771

closes odoo/odoo#128560

X-original-commit: 1d858798f53d56e5b81cc9df0fa70113dedd4f50
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-18 07:54:48 +02:00
momegahed 9102df15cc [FIX] l10n_ch: change the address format to standard
Steps to reproduce:
1- install swiss localization
2- create a QR bill

Bug:
the addresses contain the field `o.company_id.country_id.code` which is
not the standard of the swiss QR bill

fix:
remove the field

opw-3395089

closes odoo/odoo#128796

X-original-commit: 4bc39ebca4f8db66ec5ad938a113adac03f90cec
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-07-17 23:08:41 +02:00
Walid HANNICHE (waha) cd93450aa7 [FIX] loyalty_delivery: ignore discounts for free delivery
Steps to reproduce:
- Create a delivery free over 100$
- Create a discount that apply on all products for 90%
- Create an SO for 200 $

Bug:
the delivery is free although total amount is under 100$

Fix:
Gift cards and eWallets should be taken into account because they are
different way of payment the rest of discounts should be ignored

opw-3382153

closes odoo/odoo#128795

X-original-commit: 22f5b5ce245a5ebdda0f39f291401fe5bd19e4dc
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-17 20:36:09 +02:00
Didier (did) 1e12962743 [FIX] mail: suggested recipients are checked by default in chatter
Before this PR, suggested recipients without partner where not
checked and needed to be manually created. This is prone to mistakes
when sending an email to the suggested recipient.

This PR checks all the suggested recipients by default and create
the missing partners when a message is posted, and when full composer
is open. That way, there's far less risk to not send the email to
suggested recipient, and instead the user should manually uncheck
to not send the email.

closes odoo/odoo#128647

X-original-commit: 258b2420676fb1a0d7e834ab79f6bf1ec0f73254
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 20:36:07 +02:00
Andrea Grazioso (agr-odoo) b544f6abb9 [FIX] stock_account: reposition serial/lot table
Go to Settings, Enable "Display Lots & Serial Numbers on Invoices"
Now have a [PROD] tracking "By Unique Serial Number"
Add 5 SN
Create a Sale order for 5 units [PROD]
Delivery
Create invoice
Check portal preview

Issue : Preview will be messed up. Invoice footer will overlap the table
displaying lot/SN
This occur after 3764914c86
The element containing the total has been moved into a right column
(floating element) to show invoice business data in the left column.
The lot/SN table inheritance xpath would put it after the total. This commit
reposition the table on the left column

opw-3301241

closes odoo/odoo#128775

X-original-commit: 0e9fc0f92f76537662fc1102dc5d90153dabaad4
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-07-17 19:26:08 +02:00
Samuel Degueldre 2d42501a5b [FIX] mail, web: fix memory leak in QUnit test suite
With the discuss refactoring, two memory leaks were introduced:
- the activity service opens a broadcast channel for cross-tab
communication.  Because services have no destruction mechanism, the
broadcast channel is never closed, and since most tests create their own
test environment with services, each test would leak an instance of the
activity service as it is captured by the bound onmessage function. The
activity service holds a reference to the mail store which results in a
large leak
- the RelativeTime component creates a timeout so that it can update its
time every minute or every hour depending on how old the message is,
this timeout is cleared when the component is destroyed. This component
tries to initialize the value of its timeout to `null`, but it does so
*after* calling the method that actually sets the timeout, causing the
timeout to be overriden with null and never cleared

The BroadcastChannel problem has been solved by adding BroadcastChannel
to the browser object, and patching it in the test setup code of web, as
it's a generic problem with BroadcastChannels. The timeout problem has
been fixed by simply reordering the lines so that we don't override the
timeout and it gets correctly cleared when the component is destroyed.

closes odoo/odoo#128768

X-original-commit: bd25f14d7a746fe48e09edea7ebb4aaa4634fbdc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 19:26:05 +02:00
mano-odoo 3df4eaff92 [FIX] *: minor settings spacing issues
The purpose of this commit is to review the responsiveness and spacing
of some settings that were visually broken.

The nested checkboxes were growing too much on smaller screens
making the content overflow.

This commit adapts these checkboxes settings to make them more readable
and consistent.

It also review the input that overflow similarly to nested checkboxes
such as the count of extra hours in attendances settings.

In 16.2 some SCSS was added to control field widget spacing on mobile,
however it was breaking the layout for the `.o_boolean_fields`.

Task-3113372

closes odoo/odoo#126347

X-original-commit: 80aa03e86bd47e6349a5fa69397857fdf6a8cc0b
Related: odoo/enterprise#43142
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-07-17 19:26:03 +02:00
Alexandre Kühn e9110383ed [FIX] mail: active style of discuss sidebar item in dark mode
Before this commit, when an item in discuss app is active or
mouse-hovered in dark mode, there was no indicator.

This is caused by `bg-200` being equivalent to `bg-view` in
dark mode, therefore the active items were not visually distinct
from the background.

This commit fixes the issue by keeping `bg-200` in white mode, but
this becomes `bg-100` in dark mode. That way, active items are
slightly highlighted as they should

closes odoo/odoo#128767

X-original-commit: d66db4aa257984ae984d3207819c2a23b0f6897c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-17 18:13:56 +02:00
duongnguyen 3e56aab146 [FIX] mail: wrong parameter type for add_members
The method 'add_member' has 'partner_ids' as a optional parameter , but
the thing is the test 'test_attachment_hijack' is only passing it as a
single ID off res.partner record. Let's say if somewhere we overide this
method and write something like
self.env['res.users'].search([('partner_id', 'in', partner_ids)]) , it
will fail because 'partner_ids' should be a list.

closes odoo/odoo#128759

X-original-commit: 75cb1266afa8b921f8d0ca153f5d05ad47c9b14c
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-07-17 18:13:53 +02:00
Louis Wicket (wil) 2391d31693 [FIX] im_livechat: use frontend language for welcome bot
Translate Welcome Bot's messages according to the language of the
frontend.

closes odoo/odoo#128745

X-original-commit: 68fca3cc6a62adf418c516f28a6b29e235475b5f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-17 18:13:51 +02:00
Antoine Guenet 4f5ca706ca [FIX] web_editor: prevent removal of heading element
On a products category page, there is an element ready to host a heading
but it's not explicitly marked as unremovable so when the user tries to
remove any snippet inside it, the heading host is removed as well. This
fixes it by using the `isUnremovable` utility function instead of simply
checking for the `oe_unremovable` class.

Steps to reproduce the issue this commit fixes:
1. Go into the website module
2. Click "Shop"
3. Click "Furnitures"
4. Click "Edit"
5. Drop a title block in "Drag building blocks here to customize the
header for "Furnitures" category."
6. Click the trash bin on your snippet to remove it.

It doesn't get removed. Well now it does.

task-3383348

closes odoo/odoo#128744

X-original-commit: d1836d2830d098e2c29cca2643b0b354859daeca
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-17 18:13:48 +02:00
Horacio Tellez (hote) 4c484a9822 [FW][FIX] sale: method call over self instead of precise record
Each order does necessarily have the same confirmation template.
And `_get_confirmation_template` is `ensure_one` so it raises when self holds multiple records.

closes odoo/odoo#128743

Forward-port-of: odoo/odoo#128551
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-17 18:13:45 +02:00
Sébastien Theys b43f8c840e [REF] mail, im_livechat: move "discuss.channel/last_interest_dt_changed"
To discuss folder.

Part of task-3265211

closes odoo/odoo#128593

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-17 18:13:40 +02:00
Sébastien Theys a008feec69 [REF] mail: move discuss.channel/unpin to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:39 +02:00
Sébastien Theys ba5cbd21e7 [REF] mail: move discuss.channel.member/fetched to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:39 +02:00
Sébastien Theys d4399cef37 [REF] mail: move discuss.channel.member/seen to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:39 +02:00
Sébastien Theys 91c331c185 [REF] mail: move discuss.channel/transient_message to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:39 +02:00
Sébastien Theys 95592d7fa5 [REF] mail: move discuss.channel/legacy_insert to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:38 +02:00
Sébastien Theys 485379ad60 [REF] mail: move discuss.channel/joined to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:38 +02:00
Sébastien Theys 91872440b1 [REF] mail: move discuss.channel/leave to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:38 +02:00
Sébastien Theys adae210696 [REF] mail: move discuss.channel/new_message to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:38 +02:00
Sébastien Theys bcc420e5d4 [REF] mail: move command palette to discuss folder
Part of task-3265211

Part-of: odoo/odoo#128593
2023-07-17 18:13:37 +02:00
Matheus Leal Viana (malv) 1e842901a0 [FIX] purchase_requisition_stock: calculate on-time rate when percentage is zero
Versions:
---------
- 16.0

Steps to reproduce:
-------------------
- Create a new Purchase Order.
- Set the Vendor to a brand new contact.
- Add a product that would be delivered.
- Confirm the PO, set the Expected delivery date in the past.
- Notice that on_time_rate and on_time_rate_perc are both -1.
- Process the delivery.
- Now on_time_rate is 0 but on_time_rate_perc is -1 still!

Issue:
------
The field OTD is -1 even when On-time delivery is 0

Cause:
------
The issue is happening because if po.on_time_rate == 0 the value
Is set to -1.

Solution:
---------
Modify the condition to ‘po.on_time_rate >= 0’ to handle this case

OPW-3413668

closes odoo/odoo#128584

X-original-commit: 4e3bf2242808435fd13be323af535cc6cc816da3
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
2023-07-17 18:13:30 +02:00
Gabriel de Paula Felix (gdpf) 9b5070576e [IMP] microsoft_calendar: test checking single recurrent event deletion
Added a test asserting the correct functionality of single events deletion.

closes odoo/odoo#127980

X-original-commit: d93d564022bcdafece33f11f578013420b106b64
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-17 18:13:16 +02:00
Gabriel de Paula Felix (gdpf) fa23a1d118 [IMP] google_calendar: test checking single recurrent event deletion
Added a test asserting the correct functionality of single events deletion.

X-original-commit: 2676c0e1b9988e862d2c21479d34372b1a5c9cea
Part-of: odoo/odoo#127980
2023-07-17 18:13:15 +02:00
Gabriel de Paula Felix (gdpf) 5ed8417e72 [FIX] calendar: can't delete single event
In the 'calendar' module, the deletion of a single event wasn't being handled during archive. Now, the option 'self_only' is considered in the function 'action_mass_archive'.

X-original-commit: b8feb452c3311ce0ec526ed7304a0ce80af77c22
Part-of: odoo/odoo#127980
2023-07-17 18:13:15 +02:00