Commit Graph
153553 Commits
Author SHA1 Message Date
Didier (did) bec6cefd0c [IMP] mail: differentiate message and notification in channel
This PR changes the way notification are displayed inside the a channel.
Currently, notification look exactly the same as a message send by the user.

task-2918956

closes odoo/odoo#98262

Related: odoo/enterprise#30732
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-30 23:40:24 +02:00
Didier (did) 5c861656b6 [IMP] mail: rename MessageListViewMessageViewItem in MessageListViewItem
part of task-2918956

Part-of: odoo/odoo#98262
2022-08-30 23:40:24 +02:00
Odoo's Mergebot 3d7688eab8 [FW][MERGE][FIX] mail: allow normal users to view mail template preview
**Template Access Issue**

Followup of odoo/odoo@1a3e713c99

Bug
===

If the user doesn't have the template editor, he cannot open the template
preview.

Technical
=========

The reason for that is because the web editor moves some CSS properties,
and so when the user tries to open the preview, an access error is raised.

1. Ideally, the template form view should not be editable if the access
rules do not allow it. But in `_postprocess_tag_field`, we only check
for access right because we don't have the record. So a user without
write access rules, but having write access right can edit the template
in the UI, and gets an error when saving.

2. Also, the web editor should not save the HTML value if no change are
made on the field (like all other text / char field).

To mitigate the issue in stable, we add a computed field that check the
access rules and make the body readonly if he can not edit the template.
So the web editor is not loaded, the CSS properties are not moved. Other
possible solutions are way to complex technically speaking (editor internals
to update in frontend, complex comparison of html blobs in backend, cache
usage making fields_view_get override not working in all cases, ... )

As the HTML body look weird in readonly mode, add the same border as the web
editor.

**Ir.Model Issue**

A user without administration right can not preview a mail template because
of the ACl on the <ir.model>.

Task-2845877

closes odoo/odoo#99256

Forward-port-of: odoo/odoo#99222
Forward-port-of: odoo/odoo#94418
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-30 21:25:56 +02:00
std-odoo 4e100d5e37 [FIX] mail: allow a normal user to view the mail template preview
Bug
===
A user without administration right can not preview a mail template because
of the ACl on the <ir.model>.

Task-2845877

X-original-commit: 087875594daefe487a5988a56c298af844d21dfb
Part-of: odoo/odoo#99256
2022-08-30 21:25:55 +02:00
std-odoo 93fc52c8e1 [FIX] mail: allow a normal user to view the template body
Followup of odoo/odoo@1a3e713

Bug
===
If the user doesn't have the template editor, he cannot open the template
preview.

Technical
=========
The reason for that is because the web editor moves some CSS properties,
and so when the user tries to open the preview, an access error is raised.

Ideally, the template form view should not be editable if the access
rules do not allow it. But in _postprocess_tag_field, we only check
for access right because we don't have the record. So a user without
write access rules, but having write access right can edit the template
in the UI, and gets an error when saving.

Also, the web editor should not save the HTML value if no change are
made on the field (like all other text / char field).

To mitigate the issue in stable, we add a computed field that check the
access rules and make the body readonly if he can not edit the template.
So the web editor is not loaded, the CSS properties are not moved. Other
possible solutions are way to complex technically speaking (editor internals
to update in frontend, complex comparison of html blobs in backend, cache
usage making fields_view_get override not working in all cases, ... )

As the HTML body look weird in readonly mode, add the same border as the web
editor.

Task-2845877

X-original-commit: dcf3ab5fb41aa9ef6e59b2155bfd192e551b6476
Part-of: odoo/odoo#99256
2022-08-30 21:25:55 +02:00
Julien Van Roy 82cebd0a6d [FIX] account_edi_ubl_cii: fix constraint
The constraint can crash if the zip is not defined.
Check that the zip exists to prevent the error.

closes odoo/odoo#99250

X-original-commit: bc9fb51b9b22419cda94d845ef51dbddd8878276
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-08-30 21:25:50 +02:00
Xavier BOL (xbo) 810d1020e2 [FIX] project: cannot change stage if stage contains rating email
Before this commit, when the portal user changes the stage of a task and
the new stage contains a rating template email, he got a traceback
saying he has no access to `mail.template` model.

This commit fixes the issue by sending the email in superuser when we
are sure the user can write on that task.

Steps to reproduce:
==================

1) Enable the rating feature in the settings of Project App
2) Create a Project A and edit it to enable the rating feature on that
project and select "Rating when changing stage" (if it is not already
the case)
3) Set a rating email template on a stage of the project
4) Create a new task and save
5) Change the stage of that task to the stage contained the rating email
template

Actual Behavior:
---------------
A traceback is occurred saying the user has no access to `mail.template`
model.

Expected Behavior:
-----------------
The stage of the task should be changed and the rating email should be
sent.

closes odoo/odoo#99248

X-original-commit: c5093988411e5697f49ca2a128e93203c2d6aac9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-08-30 21:25:46 +02:00
Denis Ledoux 88f6e81c1c [FIX] sale_management: uom_id not in the view without group_uom
The test `test_option_creation` makes sure the option uom is
well set once setting the product on the order.

But, the test doesn't add the group_uom to be able to see the uom
field within the view.
This is valid, the uom should nevertheless still be set correctly
automatically, but the assertion must be done on the saved record,
not in the form view itself, as the field is not displayed in
the form view in such a case.

closes odoo/odoo#99231

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-30 21:25:38 +02:00
Stefan-Calin Crainiciuc (stcc) 592f39eba4 [FIX] mrp: scraps have wrong destination location
Steps to reproduce:

- Manufacturing app > Operations > Manufacturing orders > Create
- Set product to [FURN_7800] Desk Combination > Save > Confirm
- Click on scrap, choose any product > Done
- Edit the manufacturing order > set the quantity to 1/1 > Save

An error pops up: You cannot change the UoM for a stock move that has
been set to 'Done'.

This happens because the scrapped product has its destination location
wrongly set to the production location of the manufacturing order.
Because of this, it is considered as a component of the manufacturing
order. The scrap is also confirmed right after creation, so its state
is set to 'done'. Finally, when confirming a manufacturing order, all
of its component moves are also confirmed, hence the error.

This commit prevents the override of the scrap's destination location,
so that it is not wrongly considered a component anymore.

The commit also adds tests for the override method, added in
commit 0b247ab17ccc5be0c2058ef92ccf3502c97e0bb3

opw-2945182

closes odoo/odoo#99218

X-original-commit: 81820d4df5f23d9b6b2701e513ada89b528a865a
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-08-30 21:25:25 +02:00
Antoine Guenet e639005a5f [FIX] web_editor: correct TablePicker positioning and events in iframe
The TablePicker didn't take into account the position of its parent
iframe when positioning itself, and failed to bind its events on the
document in which it was attached. This led to wrong positioning and
interaction failures.

closes odoo/odoo#99208

X-original-commit: 3bb0aaaa0833e3d72fbb07e47e42441e293babb7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-30 21:25:19 +02:00
Lucas Perais 11c1bbbdd0 [FIX] web: changing the priority of a new record in kanban
Have a grouped kanban which display a priority field widget.
Quick create a record.

Click on any priority widget to change the priority.

Before this commit, the model was still considered in edition, preventing any change
in other record. Hence, the priorities did not change (at least, there was no write operation)
when clicked on.

After this commit, this flow works as expected.

closes odoo/odoo#99199

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-30 21:25:15 +02:00
Xavier-Do fe5fbbebd9 [IMP] profiler: profile requests in httpCase
When profiling an HTTPCase the only result will be the starting of the
browser and the ready/ok code. All requests are in other thread
and are not profiled.

HTTPCase profiler will now patch the _get_profiler_context_manager
in order to enable profiler on all requests during this time

closes odoo/odoo#99119

X-original-commit: 77d110de242c8b8e9b0f09dcecad25c203f32535
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-08-30 20:23:25 +02:00
Aaron Bohy bedce02bb7 [REF] web,mail,account: orm service: move context in kwargs
This commit standardizes the API of orm service functions by adding
a "kwargs" parameter, s.t. one can always use those functions even
if the target model overrides the corresponding method to add the
support of a given kwargs. Furthermore, to simplify those function
API, and to close the gap between the js and python APIs, we moved
the "context" argument inside the kwargs.

closes odoo/odoo#99018

Related: odoo/enterprise#30830
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-08-30 20:23:17 +02:00
Aaron Bohy 002a76eaaa [IMP] web,account: orm service: allow to create in batch
This commit changes the API of the "create" function of the orm
service to better reflect the API of the corresponding method in
models.py, which takes a list of record values in argument.
Before this commit, a call to "create" only allowed to create a
single record.

Part-of: odoo/odoo#99018
2022-08-30 20:23:17 +02:00
Aaron Bohy 23101ed69a [FIX] web,mail: orm service: can pass kwargs to read
Before this commit, the "read" function of the ORM service didn't
allow to pass any kwargs. As a consequence, it wasn't possible to
call the "read" method of a model with "load" kwargs specified.
This commit fixes the issue, and adapts existing calls accordingly.

Part-of: odoo/odoo#99018
2022-08-30 20:23:16 +02:00
Aaron Bohy a4ac19f8c0 [IMP] web: orm service: stop whitelisting kwargs
Before this commit, most functions of the orm service whitelisted
the kwargs to pass to the call of the python method. This would
make the service unusable on models that override those methods to
add the support of new kwargs. This commit removes the whitelisting
s.t. the service simply propagates all given kwargs.

Part-of: odoo/odoo#99018
2022-08-30 20:23:16 +02:00
Julien Mougenot 8f8f6a52ac [FIX] web: Dropping record in folded kanban column loads it
Before this commit, when dropping a record on a folded column in a
kanban view, the column would not load its records and display a "load
more" button instead.

Now, dropping a record on a folded column loads it entirely before
unfolding it, displaying its records normally (including the newly
dropped one).

closes odoo/odoo#98922

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-08-30 20:22:58 +02:00
Alexandre Kühn b3b672a66b [MOV] mail, *: use PopoverView for Message/notificationIcon popover
closes odoo/odoo#98497

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-30 20:22:53 +02:00
Alexandre Kühn 4e697ff6d0 [IMP] mail, *: use PopoverView for Message/notificationIcon popover
*: sms, snailmail

Task-2864563

Part-of: odoo/odoo#98497
2022-08-30 20:22:52 +02:00
Tommy (tong)andAntoine Vandevenne 2f5da9729a [ADD] payment_asiapay: add an integration to AsiaPay
task-2845428

closes odoo/odoo#98441

Related: odoo/documentation#2628
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-30 20:22:44 +02:00
Xavier BOL (xbo) 91678b3cf3 [IMP] web,hr_timesheet: convert timesheet_uom service and components in OWL
Before this commit, a service called `timesheet_uom` is created to add
in the legacy registry, the right component to use when `timesheet_uom`
is searched in the registry because it depends on the UoM set on the
current company.

This commit converts all the widgets in which be used in the
`timesheet_uom` registry and also adapt the service to use the session
instead of the legacy one.

task-2944742

closes odoo/odoo#98380

Related: odoo/upgrade#3787
Related: odoo/enterprise#30565
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-30 20:22:34 +02:00
Xavier BOL (xbo) b8ef0cc4f2 [REF] project,*: convert kanban, list and form views in OWL
Before this commit, all the custom code for the widgets, form, list and
kanban views are always in OWL and have to be migrate to the new JS
framework.

This commit converts all the widgets, list, kanban and form views used
in the project app in OWL. Some JS tours has been adapted according to
the OWL views, the project right side panel has been reviewed since it
was LegacyComponent (in old component in OWL)

task-2944742

Part-of: odoo/odoo#98380
2022-08-30 20:22:34 +02:00
Xavier BOL (xbo) 15f2d75bdb [IMP] web: add className getter in list view
Before this commit, the kanban view has a `className` getter to easily
add a class if needed. The list view only uses the className given in
the props and so className is added in the view.

This commit adds a className getter to be consistent with kanban view
and to allow to easily add a className to a specific case (that is for
an eventual customization).

task-2713538

Part-of: odoo/odoo#98380
2022-08-30 20:22:34 +02:00
Louis Wicket (wil) 6a6e737f61 [IMP] mail, *: move channel concerns in Thread from Thread to Channel
This commit is the continuation of task-2948676 which consists of
lightening the Thread model by moving the channel-specific behaviours to
the Channel model.

The changes revolve around the DiscussSidebarCategoryItem model. The
goal is to use channel instead of thread as identifying field for
DiscussSidebarCategoryItem, and to move channel-specific fields involved
in the computes of this model from Thread to Channel.

Changes in this commit include:
+ move `avatarCacheKey` from Thread to Channel
+ move `correspondent`
+ move `correspondentOfDmChat`
+ move `custom_channel_name`
+ move `localMessageUnreadCounter`
+ move `serverMessageUnreadCounter`
+ introduce `Channel/displayName`
+ use channel instead of thread as identifying field for
DiscussSidebarCategoryItem

Part of task-2948676.

closes odoo/odoo#98149

Related: odoo/enterprise#30457
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-30 20:22:14 +02:00
Morgane (morm) 24d9019f99 [IMP] Lunch: scss revamp
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2920029

closes odoo/odoo#96027

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-30 20:22:04 +02:00
Louis Wicket (wil) 427b984578 [IMP] mail: show more fields in mail.channel.member form view
closes odoo/odoo#92053

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-30 20:22:00 +02:00
Rahul Prajapati fd9db95d61 [IMP] im_livechat: unpin read livechat sessions after one day
Purpose:

Make sure livechat operators are not buried under a huge pile of old sessions.

Specification:

Unpin read livechat sessions, 24 hours after the last message has been read by
the operator.

Task-2446972

Part-of: odoo/odoo#92053
2022-08-30 20:22:00 +02:00
Antoine Vandevenne (anv) a38d1ac3b6 [FIX] payment_(aps,flutterwave): add missing loggers
closes odoo/odoo#83957

Related: odoo/documentation#2242
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-30 20:21:54 +02:00
Horacio TellezandAntoine Vandevenne 15058b6739 [ADD] payment_mercado_pago: integrate with Mercado Pago
Mercado Pago is the largest online payment platform in Latin America,
supports more countries, currencies and payment methods in the region
than other PSPs, and is more accessible to small businesses.

This commit integrates Odoo with a combination of the Checkout Pro and
Checkout API solutions of Mercado Pago to implement payments with
redirection to the provider's payment page.

Task - 2704764

Part-of: odoo/odoo#83957
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-30 20:21:54 +02:00
Horacio Tellez d5b4534bf9 [IMP] sale: Only record down payments when confirmed
Until now, there was no way on a given sales order to distinguish
draft, cancelled and posted down payments.

This commit makes sure the down payments state is clearly
shown as draft or cancelled when the linked invoice is
in the corresponding states.

Also remove those draft and cancelled down payments from the sale
portal & report as it can be confusing for customers to see line(s)
of down payments they never heard of.

Lastly, follow the existing behavior of invoices, where the down
payments were shown in a separate section.  Now a dedicated section
will be added to the sales order and propagated to the invoice,
if there are down payments to deduct.

Task - 2702407

closes odoo/odoo#82376

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-08-30 20:21:47 +02:00
Jigar Vaghela dc53124a09 [IMP] l10n_in*: remove l10n_in_shipping_gstin
Companies only get a tax credit on the bill to GST number(vat), not on the shipping GST number.

task - 2723111

closes odoo/odoo#81977

Related: odoo/upgrade#3493
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-30 20:21:41 +02:00
Yannick Tivisse effb0ffc8e [IMP] survey: Migrate tree/kanban views to owl
closes odoo/odoo#98865

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-30 19:18:47 +02:00
Pratik Raval ebe1ef4d3c [IMP] website_event_track: add location ordering in event agenda
This commit adds a `sequence` field in `event.track.location`, allowing event
managers to organize their event location as they want in the "Agenda" page.
To allow re-arrangement of the locations a bit more visible and easy, this
commit adds handle widget on track locations tree view, and removes the debug
group from the menu "Events > Configuration > Track Locations".

To match the order on agenda page and on the back-end, the same ordering
is applied at model level as well.

taskID-2942634

closes odoo/odoo#97763

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-30 18:16:06 +02:00
Odoo's Mergebot 056fb85e33 [MERGE][IMP] web, *: Kanban view, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

revamped apps/views :
- Kanban
- [hr]
- [maintenance]
- [utm]

Requires:
- https://github.com/odoo/enterprise/pull/29842

task-2892062

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

closes odoo/odoo#96195

Related: odoo/enterprise#29842
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-30 17:10:15 +02:00
Brieuc-brd 0187b41ea4 [REF] utm: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:14 +02:00
Brieuc-brd 2d627b71f2 [REF] maintenance: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:14 +02:00
Brieuc-brd bfe9792d45 [REF] hr: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:14 +02:00
Brieuc-brd fbfc0dc63c [IMP] web: KanbanView, introduce css variables
This commit introduces css variables to facilitate the customization of
the view.

Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:14 +02:00
Brieuc-brd ee46a9fda9 [FIX] web: KanbanView, layout issues
Prior to this commit there were some layout issues in KanbanView:

1. The `o_kanban_header` z-index was not high enough and some icons in
the record element could hide it partially.

2. The `o_ghost_avatar` was not visible (white on white).

3. `.container` elements placed inside a record had their width
   constrained by the grid system. This commit "fix the issue" setting
   their max-width to 'none'. 

Note on point 3:
To have '.container' max-width limited by the current resolution is not
a bug but the default grid-system behavior. This commit provides a
temporary workaround since 'container-fluid' classes should have been
used instead.

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:13 +02:00
Brieuc-brd 7cfe50749f [REF] web: KanbanView, review and simplify scss
Review, simplify SCSS and adapt legacy code.
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:13 +02:00
Brieuc-brd dba33909aa [MOV] web: move KanbanView variables into the component folder
This commit moves the kanban variables from primary_variables.scss to
the KanbanView folder.

Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2892062

Part-of: odoo/odoo#96195
2022-08-30 17:10:13 +02:00
Odoo's Mergebot f957cb2bc0 [MERGE][IMP] portal: avoid error modal on wizard modal superposition
BEFORE THIS COMMIT :

When using the action "grant portal access" on contact, it opens a wizard.
When trying to granting access, an error is raised if email is not properly
formatted or already used by another user, in a modal. The modal of error
message is superimposed on the one of the wizard. This looks very unpleasant
and not very readable.

AFTER THIS COMMIT :

Therefore, the error messages due to an invalid email (bad format or already
used) are simplified and displayed inline in portal wizard user tree view
instead, not displaying the different action buttons for those users as long
as the error remains.

TESTS :

Tests are updated accordingly. The last assert of test_portal_wizard_error
is repaired. The previous one raised an error as expected but not the good
one. As the email had a wrong format, it was detected and error was raised,
and not because the user was internal, as supposed to. The portal user is
updated as it should be.

--- LINKS ---
Task Id - 2613780
COM PR - #74911

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-30 15:50:56 +02:00
Noe Antoine c28e7856e4 [IMP] portal: prevent duplicate views of portal wizard
The portal's granting access / revoking access / reinvite actions
return the wizard modal opening action in order to keep it open
and allow the user to keep browsing and managing portal access.

However, this can return the modal opening several times and execute
them all, generating several (unsynchronized) modal view instances
that the user sees and has to close one at a time.

Therefore the user field in the portal wizard receives a small widget,
that only allows one of these actions at a time. Clicking on other
buttons in the list while an action is ongoing will not do anything
since buttons are disabled for the time the action is being done.

Buttons showing the email_state will not do actions when clicked.

A short scss file is also added to the widget in order to make the elements
of the user_ids tree view as close to each other as possible. This prevents
in most cases the loss of buttons going off the list's width view and
generating a scroll bar, a situation to avoid since it does not show the
user the (dyamically appeared) action buttons. (e.g. when hiding buttons
if no valid email, then editing to a valid email, button reappearing out
of visible range)

Task-2613780

Part-of: odoo/odoo#74911
2022-08-30 15:50:55 +02:00
Noe Antoine d6cc18cfdf [IMP] portal: avoid error modal on wizard modal superposition
BEFORE THIS COMMIT :

When using the action "grant portal access" on contact, it opens a wizard.
When trying to granting access, an error is raised if email is not properly
formatted or already used by another user, in a modal. The modal of error
message is superimposed on the one of the wizard. This looks very unpleasant
and not very readable.

AFTER THIS COMMIT :

Therefore, the error messages due to an invalid email (bad format or already
used) are simplified and displayed inline in portal wizard user tree view
instead in the form of colored fa-icons buttons, with details as title.
In order to have the tooltip service detect mouse events, we make them
non-disabled: if clicked, the modal will simply be refreshed. Also, there
will be no display of reinvite / grant access buttons as long as an error
on email remains.

To do so, a new selection field sets the email validity status for each
portal_wizard_user : 'ok' / 'ko' / 'exist'. Errors are still thrown if method
is called directly, except for the revoke access method. Indeed, we want to
be able to revoke access, independantly of the email status. However, the
partner's email is only updated if the email is valid.

TESTS :

Tests are updated accordingly. The last assert of test_portal_wizard_error
is repaired. The previous one raised an error as expected but not the good
one. As the email had a wrong format, it was detected and error was raised,
and not because the user was internal, as supposed to. The portal user is
updated as it should be.

--- LINKS ---
Task Id - 2613780
COM PR - odoo/odoo#74911
2022-08-30 15:50:55 +02:00
Matthieu Stockbauer 9c85261597 [FIX] bus: fix test user logout outgoing message
The test_user_logout_outgoing_message is undeterministic because
it speculate on the fact that the channel subscription was made
when we try to dispatch notifications. Sometimes it is not and
the websocket to channel map is empty resulting in a StopIteration
exception being raised. Let's wait for the subscribe to occur to
ensure the websocket will be registered before trying to dispatch
the message.

closes odoo/odoo#99204

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-30 12:44:40 +02:00
FrancoisGe 4926dba1c8 [FIX] web: empty a many2one field
Before this commit, it was impossible to empty a many2one in a list view.

How to reproduce:
- go into a list view with a many2one
- empty a many2one containing a value
- click outside the line

Before this commit:
The record goes into readonly mode and its many2one returns to
its original value.

After this commit:
The record is saved and its many2one is empty.

closes odoo/odoo#99201

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-30 12:44:36 +02:00
Yannick Tivisse 20adbf2034 [IMP] mass_mailing: Migrate mailing contact list/kanban to owl
closes odoo/odoo#99153

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-08-30 12:44:33 +02:00
mafo-odoo 5f7e6b4183 [FIX] web : drag and drop for kanban does not open record
Steps to reproduce:
-Install Project
-Activate kanban view for projects in the settings
-On firefix do a drag and drop of a project between two stages

Current behavior:
You are redirect to the project record

Expected behavior:
The project changed stage but there is no redirection

Solution:
The check for the drag&drop case only happen inside the openRecord
function but the record should not be open in this situation and
hence the check should happen before the function is called in
onGlobalClick.

opw-2952389

closes odoo/odoo#99120

X-original-commit: 977ef91693f22a5fab2b71d4dadf99046853ca9d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-08-30 12:44:30 +02:00
Xavier-Do bfa8da6b35 [FIX] tests: bump url_open timeout
Some tests are randomly failling because /web takes more than 10 seconds
to load. A future pr will speedup /web but waiting for that a small
bump of the timeout should help.

closes odoo/odoo#99198

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-08-30 09:23:16 +02:00
Simon Genin (ges) 5e754ffd4d [FIX] web: fix field update
When a field in readonly view can be modified, it should write to the
backend immediately. (No changes are stored to be comited later)

For some reason, a bit of code was preventing this if the field was
required and had a falsy value. Furthermore, the code seemed incorrect
or at least misplaced. Removing these lines didn't affect the test.

The fix simply remove this extra check.

There was a condition in the update code for required field in readonly
views that prevented the correct flow to be executed. Since no test are
broken removing this check but it fixes the problem, it is removed.

closes odoo/odoo#98978

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-30 09:23:13 +02:00