Commit Graph
167026 Commits
Author SHA1 Message Date
Julien Carion (juca) 0c7e7e12af [IMP] web: edit domain button is available while loading records count
This commit removes the requirement that the records count should be
set before the edit domain button is shown for domains which must be
edited in a dialog. This could be annoying in cases the records count
loads slowly.

task-3561782

closes odoo/odoo#139969

X-original-commit: f2ba825eac5e4bda3d1b1d3676a1b737701c0fb8
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-10-30 09:00:58 +00:00
adsh-odoo b3542480ab [IMP] various: add page name on html fields to ease finding them
-> This commit add/change the name of the page corresponding to the string
   attribute because To be able to detect a field, Knowledge needs to be able to
   read its page name.

For more reference: Task-3501211

Task-3524474

closes odoo/odoo#137428

Related: odoo/enterprise#48315
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-30 09:00:56 +00:00
tsm-odoo 1306635db8 [FIX] mail: fix highlight pin message from notification
Since [1], highlighting a pinned message from the notification sent
to the channel does not work anymore. This is due to a `super` call
missing. This PR fixes the issue.

Steps to reproduce:
- Go to a channel
- Pin a message
- Click on the "message" link
- Nothing happens

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

closes odoo/odoo#139948

X-original-commit: 68992ba05eb48459800df17707741295a4f47c9c
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-30 07:37:13 +00:00
Renaud Thiry 77de6e827a [IMP] mail: Allow hiding tracking
It is sometimes desirable to completely remove a field
from the automated tracking message
when setting a custom message that already covers the change being made.

Add a filtering method on threads to allow models to selectively
hide tracking values from emails and messages.

task-2974500

closes odoo/odoo#109606

Related: odoo/enterprise#31795
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-30 07:37:12 +00:00
Thomas Lefebvre (thle) 4aeef08c61 [FIX] hr_recruitment: check mail before use it
Steps to reproduce:
-------------------
- create a job application;
- add an applicant name;
- add an email with a wrong format.
- save;

Issue:
------
A traceback occurs.

Solution:
---------
Check that the normalized email exists
(that it is not `False`) before using it.

opw-3544918

closes odoo/odoo#139952

X-original-commit: 3f52f9e84e42f5ad13ca96a92ea40b9a35d4353c
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-10-30 06:35:06 +00:00
Fabien Pinckaers 142f38e263 [IMP] web_hierarchy: clean up UX org chart
closes odoo/odoo#140238

Signed-off-by: Fabien Pinckaers (fp) <fp@odoo.com>
2023-10-29 17:29:11 +00:00
Odoo Translation Bot 6739c317d1 [I18N] Update translation terms from Transifex 2023-10-29 00:07:17 +02:00
Fabien Meghazi 2738f8972e [ADD] base: add support for custom imbus & cron_trigger postgres notifications
This patch provides the possibility to implement a custom security layer on top
of Odoo's imbus notification system and ir_cron live triggering system.

The key addition is the `ODOO_NOTIFY_FUNCTION` environment variable (opt-in),
which can now define a custom postgresql function to be called instead of the
default `pg_notify` function. This allows for greater flexibility and control
over the notification and triggering mechanisms within Odoo.

closes odoo/odoo#140089

Signed-off-by: Fabien Meghazi (fme) <fme@odoo.com>
2023-10-28 19:59:03 +00:00
Laurent Smet b28c4f2b1d [IMP] account, mail: Several invoice creation when mail alias with attachments
Problem
---------
Previously, when receiving an email with several attachments, we created
1 invoice that contained all the attachments.

Objective
---------
We want to create several invoices depending on the attachments received.
No invoice should have more than one PDF document.
No invoice should have more than one XML document.
Other attachments should be placed in seperate invoices (except for the
first invoice that can contain 2 attachments: ex. image and PDF).

Solution
---------
Update the _extend_with_attachments to behave like such.

task-3526248

closes odoo/odoo#140196

Related: odoo/enterprise#49779
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-28 15:25:43 +00:00
Ritika Shekhawat 4fca21f599 [FIX] project_timesheet_holidays: fix generation of timesheets for public holidays
Steps:
 - Open Time-Off
 - Go to configuration
 - In public Holidays
 - Create a new public holidays

 Issue:
 - The validation error occurs.

 Cause:
- It get employee from the company which is not selected due to this
 employee consider as a invalid employee.

 Fix:
 - Add domain in employees_groups so it consider only selected companies
  employee while creating public holiday.

 Task: 3504636

closes odoo/odoo#140185

X-original-commit: fe88f384d186cf4e3e5505dde78d68e286c34a0e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-28 11:13:45 +00:00
c0b683e2f4 [IMP] web,*: improve darkmode
This commit introduces some adjustments to the dark mode color scheme
and the use of bootstrap classes in Community.

- Mini calendar contrast -

The colors were not using variables, making them non dynamic
and breaking the contrast in dark mode.

- Avoid !important rules spreadsheet -

Prior to this commit, spreadsheet top bar was using a `bg-white` class,
making it pure black in dark mode.

Since spreadsheet is designed with light colors and we don't provide a
dark mode for it, we remove that class and set a `background-color`
property using CSS in Enterprise.

- Input color -

This commit fixes the focus behavior on the searchbar in the control
panel, the `command_palette_search`, and the `start a conversation` in
discuss.

- Copy clipboard field border color -

Make use of the `text-primary` color for the copy to clipboard field
We use the o-theme-color function to avoid an undefined since primary
doesn't exist in the o-theme-text-color map in white mode.

- Web_editor toolbar variables -

The toolbar was using the `o-brand-primary` variable
which was set to a darker shade. This caused issue when activating an
option due to how vibrant the color is.

- Improve the controls on border-color -

Introducing a custom property on the border-color to allow
further control on individual components (such as the popover).

- Improve setting tabs colors use -

Prior to this commit, the colors of the settings tabs menu were kinda
inverted. The menu was light in dark mode and dark in light mode.

We fix this by changing the values associated to the CSS variables in
use.

- Make model field selector dark mode proof -

Fixing the design of the model field selector popover in both
light and dark mode. Since the popover was using custom style with
arbitrary values, it was not designed for the dark mode and had a lack
of consistency.

To improve the design, we use variables rather than custom style, and
make sure the desired render is as close as before.

- Sign colors use -

This commit aims to improve the sign module in both light and dark mode.
There were some readability issue with some `btn-light` having poor
contrasts in both light and dark mode, and the use of some classes was a
bit unexpected (e.g `card-header` to set a grey background with some
padding).

- Improve buttons design inside listview -

Prior to this commit, this button was using custom CSS to make it look
like a primary button, while it was using classes related to secondary
buttons.

We remove the custom CSS used to style it correctly and keep our button
design consistent.

- Messaging menu layout in mail -

This commit aims to improve the design of the notifications displayed
in the messaging menu. Prior to this commit, the notifications dropdown
was using custom CSS variables overriding the regular behavior
of our dropdowns.

In fact, the layout was generating some friction:

1) Marking a notification as read would turn its background into a
darker color

2) Effects like `:hover` were all based on the custom CSS variables
resulting in an inconsistent layout.

- Multi company selector adaptations -

In darkmode the multi company selection was using the btn-light which
creates a weird effect and overrides the dropdown default hover behavior

This commit uses the btn-link to display an hover effect on the
company switch and on the checkbox while blending with the background
and the default dropdown hover effect.

- Adapts default badge design -

Improve the design of the default badges in dark mode.

If you open the light mode, these badges are dark grey with a white
text. If you switch to dark mode, they are dark grey but with a dark
text, which makes them look either muted or off.

We make use of SCSS variables to handle the color of the component,
providing a good styling in both modes.

- Fix kanban cards borders inside dropdown -

Fixes the issue with the divider inside the kanban dropdown menu not
showing in dark mode.

To ensure it is visible, we assign it the `$dropdown-divider-bg`, which
is the color it should use, as the horizontal divider above uses.

- Fix tour pointer design for dark mode -

This commit aims to insert the tour pointer and its content inside the
styling we applied to our tooltip.

To do so, we make sure it uses CSS variables, allowing more control and
consistency, plus we replicate the overall look of our tooltips.

- Fix `text-primary` on action background contrast -

This commit improves the readability of our `text-primary` classes when
it's used on a `$o-component-active-bg` background.

Prior to this commit, the `text-primary` was not meeting the contrast
standard, mainly when you were using the `CMD+K` shortcut on the
app switcher.

To prevent that, we changed the background to a `$o-component-active-bg`
background with an opacity ensuring our text provides a good contrast.

- Fix input states -

Prior to this commit, the `--o-input-border-color` CSS variable was
using the `$o-form-lightsecondary` variable to define the standard color
of the `border-bottom` property of our inputs.

This was conflicting since `$o-form-light-secondary` is also used to
define the `background-color` of our table on focus.

With this commit, we separate these two element with different variables
to make sure they don't affect each others.

- Fix kanban ghost background -

Before this commit, if you created a project without any stage or element
in it, the ghost cards that act like placeholders would be pure `#000` in
dark mode, due to the `bg-white` class.

This commit replaces that class with a `bg-light`, providing a better
visual result in both light and dark mode.

- Fix new message design -

Improve the design of the new message element while
inside Discuss, using our danger color, ensuring a good visual result in
both modes.

task-3201038

closes odoo/odoo#139966

Related: odoo/enterprise#49666
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: chgo-odoo <chgo@odoo.com>
Co-authored-by: stefanorigano <sri@odoo.com>
2023-10-28 10:07:53 +00:00
Alexandre Kühn 05f434c222 [FIX] mail: show original format of email message in white theme
Before this commit, messages of type email had their style initially
altered on the UI to match the theme, notably the background and font
color. To see the original format, a floating button
"Show Original Format" was shown in the top-right corner of these
messages.

The main problem with this button is that most email messages do not
have a different visual between altered and non-altered, so this
button felt useless most of the time. Also, the original style of
email message is a annoyance in dark theme but not in white theme.

This commit removes the presence on the button and the style of
email message is now based on the chosen theme:
- white theme: always show the original style of the email
- dark theme: always show a slightly altered style of the email

This commit also fixes a bug where message of type `email_outgoing`
were not properly considered as email messages. To fix this issue,
`message.type === "email"` has been replaced with
`message.type.includes("email")` to also take these messages into
account.

Task-3573855

closes odoo/odoo#140176

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-28 01:18:30 +00:00
Arnold Moyaux cab82ee919 [FIX] stock: rollback invalid quantity instead of warning
Replace the warning by a usererror. That way it rollbacks to the
previous quantity. It will avoid to fake the user thinking he could
bypass the warning and remove the quantity silently later.

closes odoo/odoo#140172

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-28 01:18:29 +00:00
Walid 63d5b7cc36 [FIX] stock: take into account default return locations
Steps to reproduce:
- Enable locations in Inventory settings
- Edit Delivery on operation types
- Set a default return location
- Create and confirm an SO and it's delivery
- Create a return
- default return location is ignored

Bug:
since commit[1] returns have been redesigned and the default location
was not considered

Fix:
set location when creating the return and
prevent compute from editing the returns

opw-3517921
[1]: https://github.com/odoo/odoo/pull/118568

closes odoo/odoo#140154

X-original-commit: 68a7fe2cc15bb58402256b533c8e9b598b0838bf
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-27 23:44:53 +00:00
Lucas Perais d04ca8fa60 [FIX] base_automation: fix check and execute time based
Before this commit, the ir.cron "Automation Rules: check and execute" crashed
because the "_check" method used get_eval_context where it shouldn't

This is due to b846d1ebe9, which makes _get_eval_context a record's
method, not a model one.

closes odoo/odoo#140153

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-10-27 23:44:52 +00:00
yhu-odoo 431d40be34 [IMP] mrp,stock: UI changes
1. Rename 'Reserved' on MO components to 'Quantity'
2. Hide `picked` field on MO compoents by default
3. Add tooltip for `picked` field on sm.

closes odoo/odoo#140150

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 21:36:57 +00:00
Paweł Fertyk eedb2557c7 [FIX] stock: remove duplicated should_replenish field in scrap view
https://drive.google.com/file/d/1LRif1iOjiS6aLx6QdBOs3Kc7c15lyNrt/view

closes odoo/odoo#140149

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 21:36:55 +00:00
yhu-odoo abb2c6b54f [FIX] mrp: no coloring for manual consumption
Commit a97b352e761b421f6205b03a9b87c79358c128cd removed MrpProductionComponentsX2ManyField
to use MrpProductionComponentsListRenderer for coloring quantity cells
for manual consumption. Correctly extend StockMoveX2ManyField in this
commit.

closes odoo/odoo#140141

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 21:36:54 +00:00
Mathieu Duckerts-Antoine 0ff280ec6d [IMP] web: ExpressionEditor: better conversion of in/not in operators
When foo is not an x2many, a condition of the form
("foo", "in", [])
was transformed by the ExpressionEditor into
"set([foo]).intersection([])"
while it can be better expressed as
"foo in []"

In this commit, we improve the conversion of conditions of that kind and
similar other conditions.

Note that we also ideally want domains and their corresponding expressions
to be evaluated the same ways on records (at least on good examples).
For this we want for instance, the condition
("foo", "in", 1)
to be translated to
"foo in [1]"
and not
"foo in 1"
which is an invalid Python expression.

closes odoo/odoo#140140

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-10-27 21:36:53 +00:00
vlst 3c1d74181a [FIX] pos_restaurant,l10n_in_pos: fix receipt data
1. Install l10n_pos_in
2. Make an order
3. Observer traceback in receipt screen

Similar problem in restaurant ( in bill screen )

closes odoo/odoo#140123

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-27 21:36:52 +00:00
snd 7422b96b2e [FIX] stock: JS error when opening stock move menu
quantity_product_uom is a field on stock.move.line
For stock.move, we need to use product_uom_qty.

closes odoo/odoo#140121

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 21:36:51 +00:00
clesgow 3d434ea0d4 [FIX] stock: display forecast widget on deliveries
Steps to reproduce:
- Create a Delivery
- Put any product, some quantity and save

Issue:
The forecast icon disappears as soon as the picking leaves its 'draft'
state.

closes odoo/odoo#140114

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 21:36:50 +00:00
Xavier Luyckx (xlu) e24c655105 [FIX] web: stat button border-radius styling
This commit addresses issues related to the border-radius styling for
the `buttonbox` buttons. The main goal was to ensure that the first and
last buttons in the button box bar, whether directly inside the `buttonbox`
or wrapped within a `<div>`, consistently receive the desired border-radius.

Existing CSS rules were not consistently targeting the first and last
buttons, especially when they were wrapped inside `<div>` tags, like the
"Go to website" button or "more" dropdown button.

I also added a z-index-0 to the buttons inside `<div>` tags, so they can
receive the correct border-color on their active state.

This commit resolves this issue.

task-3563305

closes odoo/odoo#140106

X-original-commit: d5cf6c6ac7eb7674d6a9c18a23c37ec0861ba258
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Xavier Luyckx (xlu) <xlu@odoo.com>
2023-10-27 21:36:49 +00:00
Xavier Luyckx (xlu) 82de0d7dc4 [FIX] web: stat button active border
Previously in the button box, right borders of stats buttons in their
active state were hidden/not displayed correctly.

This commit addresses and resolves that issue.

task-3568551

closes odoo/odoo#140103

X-original-commit: 2ab61bc841f0281c59e6b87700215b06acf07545
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Xavier Luyckx (xlu) <xlu@odoo.com>
2023-10-27 21:36:48 +00:00
Arnold Moyaux d80f4e04c0 [FIX] stock: redirect move lines location dest
Changing the destination location on a picking will:
- Change the dest location of its stock.move
- Not change the dest location of stock.move.line

So it the picking has been reserved, everything will
be send to an incorrect location. On top of it, the
system prevent to select a destination location that
is not a child of the move dest location.

This commit, redirect the location dest on stock.move.line
when the dest location on stock.move change.

closes odoo/odoo#140101

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 21:36:47 +00:00
Antoine (anso) 5f7aa80c73 [IMP] sale_product_configurator: redesign of the modal
This commit
- Cleans and optimize the SCSS
- Improves the layout and the spacing of the existing modal
- Improves the input's style (`.o_input`, better pills)
- Sets a fixed height to the modal so it doesn't grow/shrink when
fields are shown/hidden

task-3289240

closes odoo/odoo#133056

closes odoo/odoo#140096

Related: odoo/enterprise#49636
Related: odoo/enterprise#49733
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-27 21:36:46 +00:00
clesgow bd187c35c2 [FIX] stock: update picking validation error
The forms are always in edit mode, so no need to refer to the "edit
mode" anymore.
Also the 'done quantities' no longer exists from the user pov, there's
only a 'quantity' field.

closes odoo/odoo#140094

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 21:36:44 +00:00
Chrysanthe (chgo) 25b4836cf4 [FIX] onboarding: dark variables not loaded
This commit fixes an issue about the `onboarding.variables.dark.scss`
file not being taken into account inside the manifest.

Since saas-16.4, there is an issue with the onboarding files.
If you turn on the dark mode, the `.variables.dark` overrides are not
taken into account, but instead display the light mode variables.

This causes readability issue about the text being too dark.

This seems to happen because the dark mode file is already loaded
with the light one.

task-3201038

closes odoo/odoo#140090

X-original-commit: 9e1e72bfff1a8f27513dbb2a2a2aae0213bc78ed
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
2023-10-27 21:36:42 +00:00
FrancoisGe 5696b5686e [FIX] web: select all records should trigger only one rendered
Purpose:
--------
From the new RelationalModel (odoo/odoo#114024), in the list view, when
all the records are selected, the ListController is rendered once per record.
This causes performance problems and can cause a flicker where each record
is selected one by one.

Why:
----
When selecting all records, we will call record.togggleSelection() on each
record but this function uses a mutex. So each record will be selected
asynchronously. As the state is not modified by the same tick,
a rendering will be triggered for each call to record.togggleSelection.

Solution:
---------
Add a togggleSelection function to the DynamicList which will select all
the records in the same mutex. The state will therefore be modified in
the same tick and there will be a single rendering.

closes odoo/odoo#139859

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-10-27 20:16:02 +00:00
JF Aubert 0c4d1aee26 [FIX] stock: do not reserve expired lots
The context is given on the stock.move currently. However the
stock.move will not propagate it during _get_reserve_quantity
because it uses the quants in arguement. In other to reach the
gather we just use pass it through the quants object itself

closes odoo/odoo#140060

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 18:47:16 +00:00
Arnold Moyaux b50a797390 [FIX] stock: missing synch between stock.move and sml
Currently when you fill quantity on the stock.move and directly click on the details operation button,
you will see move lines based on initial quantity.

It happens due to the inverse of quantity on stock.move that is only trigger on the save (expected).
But in our case, we want to do a save before opening the stock.move.line to have something according to the quantity.
We also only trigger the save when the quantity has been change and the stock.move is open.

+ Hide quantity in draft

closes odoo/odoo#140059

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 18:47:15 +00:00
Sébastien Theys 0cd23d4d29 [REF] mail: remove _channel_message_notifications
The method is used only once now, it can be removed.

closes odoo/odoo#140063

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-27 17:29:56 +00:00
clesgow 645c0db68f [FIX] maintenance: use company_id
Steps to reproduce:
- Create a new Maintenance Request
- Set an Equipment

Issue:
In the compute we use `company` instead of `company_id`.

closes odoo/odoo#140062

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 17:29:55 +00:00
Rodolpho Lima 8e75dfca3b [FIX] website: set URL when picking from drop-down menu
Steps:
- In website, click on a link to edit it
- Type "/" in the LinkTools URL input field
- Pick a URL among the suggested ones

The chosen URL was supposed to be applied to the link, but it is not.
The same applies for the LinkDialog (create a link with the "/link"
command).

Reason:
It might be a little confusing, but the `_onURLInput` method actually
means "update UI according to the URL" (more specifically, display/hide
the "Open In New Window" and "Autoconvert To Relative Link" buttons).
The `__onURLInput` (two underscores) method, on the other hand, is the
actual handler for input events in the URL field. In this case, picking
a URL from a drop-down menu needs the same treatment as inputting text,
that is, the `state.url` property must be set to the new value.

task-3552700

closes odoo/odoo#140061

Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-10-27 17:29:54 +00:00
Valentin Chevalier a3c6afb2a9 [IMP] payment(_*): make express checkout work again
Following 7e012dd, the express checkout flow stopped working.
This commit makes the express checkout flow works again.

task-3526289

closes odoo/odoo#139854

closes odoo/odoo#140085

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-27 16:09:41 +00:00
Valentin Chevalier 47b20dc6ad [IMP] payment: add the currency on the status page
Part-of: odoo/odoo#140085
2023-10-27 16:09:41 +00:00
Valeriya(vchu) fdb6f62742 [IMP] payment(_demo, _stripe), website_sale_picking: PM improvements
1) Add default filter to list view of payment methods.
2) Raise UserError when the user activates a PM linked to
   only disabled providers.
3) Activate default PMs with the activation of the provider.
4) Disable PMs linked to only disabled providers.
5) Add multi editing to list view of PMs.

task-3557315

closes odoo/odoo#139641

closes odoo/odoo#140084

Related: odoo/enterprise#49551
Related: odoo/enterprise#49729
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-27 16:09:39 +00:00
TSO c5237e1ac1 [FIX] discuss: use the right rtcSession property in activeCall check
Before this commit, since https://github.com/odoo/odoo/pull/137750,
the `RtcSession.channelId` property was removed, which prevented
the "LIVE" state in calls to be displayed (and hidden) in the right
conditions, a missing button in call invitations, and possibly other
bugs.

This was not caught by tests because there is no test for that.

closes odoo/odoo#140082

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-27 16:09:39 +00:00
Rodolpho Lima 2074c7e714 [FIX] web_editor: open powerbox in mass_mailing
Steps to reproduce:
- Edit a mailing (mass_mailing)
- Click the save icon
- Type to '/' to open the Powerbox (it does not...)

The `getPowerboxElement` function fails to return the correct node
because `this.options.document` is no longer the iframe document after
the Wysiwyg component is re-rendered. This happens because when the
Wysiwyg component has its props updated, its `options.document` is
overwritten by its default option (the top document).

This commit makes sure that, when the editor is mounted inside an
iframe, `options.document` evaluates to the iframe's document throughout
the entirety of the Wysiwyg component lifecycle.

task-3548120

closes odoo/odoo#140075

Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-10-27 16:09:38 +00:00
JF Aubert 848ada778b [FIX] stock: 2 buttons 'validate' in picking view
closes odoo/odoo#140073

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-10-27 16:09:37 +00:00
Mathias Mathy (MAMA) 4695ae8641 [FIX] repair: populate when create from return
Main changes :
    Force the default picking type when creating a Repair Order
    from a return
Before :
    When creating a Repair Order from a 'return' picking,
    recyled and removed parts location are not assigned,
    which lead to tracebacks and disallow the user to save
    the created repair.
After :
    When creating a Repair Order from a 'return' picking,
    set the repair operation type of the 'return'
    picking's warehouse by default.

closes odoo/odoo#140072

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 16:09:36 +00:00
Alexandre Kühn b3c231b1b2 [FIX] mail,*: markup chatbot livechat message
calendar, im_livechat

Before this commit, messages in chatbot conversation were not
properly markup. This comes from changes from [1] that added
trusted insert. Original code in `Record.insert()` makes a model
insertion of the data using the `html` flag. Patches must not
override `static insert()` as only the super call is affected by
the provided `html` flag. For patches to take account of it, they
must instead patch `_insert`, with `_` prefix, which is internally
called by original `Record.insert()`.

In addition:
- `static insert` allows array of data while `static _insert` works
  with data on single record. Patches were designed with data on
  single record, so some code were not working properly
- Signature of `static insert` has been overloaded with new option
  `html: true`, so patches must propagate it. They were only
  propagating `data` and omitting the 2nd paramater, which results
  in omitting provided `html` thus falling back to `html: false`,
  resulting to non-escaping message body

This commit fixes all model patches to override `static _insert`
instead of `static insert`.

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

closes odoo/odoo#140064

Related: odoo/enterprise#49718
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-27 16:09:34 +00:00
Aaron Bohy 01f03b1e19 [IMP] mail: do not wait for init_messaging at webclient startup
The messaging service starts synchronously and exposes a promise
isReady that is resolved when the call to init_messaging is done.
This is good as this call thus doesn't slow down the services
startup and thus the webclient mount.

Unfortunately, the ChatWindowContainer, which is a main component,
i.e. a child of the WebClient, waits for that promise in its
onWillStart. As a consequence, the webclient can't be mounted
until the rpc returns, which can take a while (in odoo.com, this
rpc lasts ~500ms).

The chat windows being "peripherical components", there's no reason
to block the whole application for them. Instead, the webclient
can be mounted, and when they are ready, the chat windows can be
rendered. This is what this commit does.

Back-port of https://github.com/odoo/odoo/pull/139750/

closes odoo/odoo#140056

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-27 14:22:14 +00:00
clesgow 1085afd637 [FIX] stock: compute locations for picking partners
Steps to reproduce:
- Enable multi-step reception
- Create a reception in WH/Input
- Open an internal picking further down the chain
- Change its contact

Issue:
The location_id and location_dest_id is getting reset to Operation
type's default locations, which will raise a warning because the
location/dest don't match the ones from the moves anymore.

It was decided to only allow the automatic compute of locations for
draft pickings. Which means :
- Compute will trigger normally when manually creating a picking
- Picking type is readonly outside of draft anyway, so don't change
anything for this change
- Changing locations of a non-draft picking is a risky operation, as
they won't match the moves. So better leave it as a manual change.

closes odoo/odoo#140055

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-10-27 14:22:13 +00:00
Hugo Carlier (Huca) 074a453611 [IMP] project: add tests for personal stages unlink
This commit adds tests for the new unlink method of project.task.type
model and in particular for the deletion of personal stages.

task-3345132

closes odoo/odoo#140050

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-27 14:22:12 +00:00
Hugo Carlier (Huca) 463f67c22f [IMP] project: adapt tests for project_task_type
After the refactoring of personal stages, some tests are adapted.

task-3345132

Part-of: odoo/odoo#140050
2023-10-27 14:22:12 +00:00
Hugo Carlier (Huca) 2236e5c97c [REF] project, project_todo: refactor personal stages
Personal stages of project.stage records are based on two main field:
- personal_stage_type_ids: the list of all personal stages linked to a
  task (M2M)
- personal_stage_type_id: a computed field (not stored) indicating the
  personal stage of a task for the current user.

When reading a set of project.task records grouped by personal stages,
two options are possible:
- Group the records by personal_stage_type_id (approach used in former
app Notes): in which case the read_group method has to ne rewritten as
it can be used on a non-stored field.
- Group the records by personal_stage_type_ids (approach used in app
Project) in which case, the kanban view has to be overriden to be able
to drag and drop a task between personal stages (which is not possible
by default, when grouping according to a M2M field).

The main evolution proposed by this refactor is to use an hybrid
approach that would:
1. Group the project.task records by personal_stage_type_id
2. Use the read_group with groupby set to 'personal_stage_type_ids' as
this should give the same result.

This would allow to:
- Avoid a complex and costly (performance wise) read_group override
- Avoid an override of the kanban view that is costly to maintain
- Simplify the implementation (and thus readability) of personal stage
management (among which, removal of the model
project.task.stage.personal).

task-3345132

Part-of: odoo/odoo#140050
2023-10-27 14:22:12 +00:00
Adrien Guilliams (adgu) c6bed1a843 [IMP] pos_self_order: display attributes with long text
In this commit, we change the display of product attributes with long
text. Now, if an attribute has a long text (>15 characters),
the attributes will be displayed in 1 column.
We also prevent the user from adding a product with attributes
to the cart if some attributes are not selected.

closes odoo/odoo#140045

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-27 14:22:11 +00:00
Adrien Guilliams (adgu) 9634fd87bb [FIX] point_of_sale, pos_online_payment: fix bug force close session
In this commit we resolve the bug that force close session when
deleting orders in a point_of_sale config. The problem was that we did
not take into account that orders can be canceled when closing
the session. This led to picking move and account move created for
canceled orders which is obviously not wanted.

Part-of: odoo/odoo#140045
2023-10-27 14:22:11 +00:00
Theo VINCENT (thvi) 455c3f8d5b [IMP] pos_self_order, *: receipt tracking number
*: point_of_sale

- Makes the tracking number displayed on frontend receipt (in small `Order: <tracking number>`, preserving the big `<tracking number>` title for kiosk self-order receipt).
- Fixes printing of kiosk self-order receipt after a successful Adyen payment.

closes odoo/odoo#139694

closes odoo/odoo#140044

Task-id: 3570253
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-27 14:22:10 +00:00