Commit Graph
153957 Commits
Author SHA1 Message Date
Géry Debongnie a42f554c23 [IMP] web: update owl from 2.0.0-beta-18 to 2.0.0-beta-19
Release notes:

https://github.com/odoo/owl/releases/tag/v2.0.0-beta-19

Details:

- fix: events: correctly call handlers in iframes

closes odoo/odoo#99807

X-original-commit: 78f1dc7709a312f8e3c8ead36a69b4c41f5a0e07
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-09-09 11:12:32 +02:00
Thibault Delavallée 24f2f03047 [PERF] mail: remove extra ACLs check in message_post
An explicit access check when posting a message has been added at odoo/odoo@9920f20e4c
when adding notably computation of display_name as sudo. However this is not
the role of ``message_post`` to check access for such an implementation
details.

Access is anyway already granted through the various browse and record access
done during the posting process. Moreover even message access (creation or
read) is protected notably through its related record ACLs.

Portal/Public access on message_post is anyway done through dedicated routes
using tokens or hash/pid that call message_post as sudo. We can therefore
remove the explicit access check added a bit wildly in the middle of the code.

Task-2710804 (Mail: Clean MailThread API)

closes odoo/odoo#99654

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-09 11:12:29 +02:00
Thibault Delavallée 17bf3d9134 [FIX] portal, account: explicitly check access on record for chatter_post
Currently using the ``chatter_post`` route to post a message implicitly checks
for access rights on related record. It is done manually in ``message_post``
that is called by the route. It is done because record name is accessed as
sudo and an explicit access has been added because of fear of information
leak.

However this is a bit out of scope for ``message_post`` to perform that check
at that point. As the underlying record is accessed numerous times, adding
an explicit check just adds queries.

In portal, users may have a token and/or a hash and a partner_id, in which
case they enter sudo mode if valid, and an error is raised otherwise. However
when not using a token and/or a hash and a PID access check is now done
directly in the controller helper. Moreover this allows to have the access
error directly instead of being possibly hidden by another error, which was
the case before this fix (was actually raising about missing email_from).

In this commit we add an explicit check on record access before entering
the post computation. That way access errors are directly raised.

A fix in accounting is necessary to ensure the right error is raised. Indeed
otherwise it currently raises due to non existing email_from, and should
raise due to ACL instead. Tests are now more inlined with classic flows.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#99654
2022-09-09 11:12:29 +02:00
Yoshi Tashiro (Quartile) 43f9e5f5e9 [CLA] update quartile's members
closes odoo/odoo#99607

X-original-commit: 9e86d160b45ba05936ad07f1253df15ebc5493f0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-09 11:12:25 +02:00
Guillaume (gdi) b63f7e333d [FIX] website: put the name of the "edit in backend" button in the state
Since the button must be rendered when its text changes, the variable
that holds its text must be stored in the component state. The button
already had the right text before a bit by chance because the new name
was computed before the component was rendered. Now we make sure that
the component will be rendered when the name is recomputed. The problem
is visible if we slow down the getUserModelName function and go to a
forum.post from a forum.forum.

task-2889929

closes odoo/odoo#99599

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 11:12:21 +02:00
Philippe Wauthy 65f6b2fb8e [FIX] hr_recruitment: fix employee department access
When hr_recruitment is installed and a user doesn't have any recruitment access, an access error is raised.

This commit fixes the access error, allowing the user to access the hr departments view when hr_recruitment is installed and the user has no hr_recruitment access.

task-2971553

closes odoo/odoo#99591

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-09 11:12:18 +02:00
Jérémy Hennecart (jeh) fac9302974 [IMP] portal: remove 0 lines display
We now display only the lines that have documents linked to them.
In case, we want to display a line even if there are no doc, we
can do so by updating the list of counter to keep with
"getCountersToKeep()".

In case, there are no lines, we display a small message.
For now we always display the quotations, sale orders and invoices.

task-2947778

closes odoo/odoo#99373

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-09 11:12:12 +02:00
Victor Feyens 921073819d [FIX] website: give website manager rights to all administrators
Partial revert of fba6ea5a47

If the designer group is not given automatically to all admins,
they are not able to go through the website onboarding automatically
launched after the website app installation.

Task ID - 2936569

closes odoo/odoo#98542

Related: odoo/enterprise#30626
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-09 11:12:09 +02:00
Victor Feyens 271d135d0a [FIX] *: give default app admin rights to admin user
When the admin installs an app, he should see it directly, without having
to give himself the app rights on his user form.

Finetuning of #91909

Task ID - 2936569

Part-of: odoo/odoo#98542
2022-09-09 11:12:09 +02:00
Dossogne Bertrand 148263cf90 [IMP] hr_holidays: make stress days department-specific
This commit adds the possibility to link a stress day
to specific departments. If the employee is in a
sub-department of the department subject to a stress
day, the stress day will also apply for that employee.

taskID 2946420

closes odoo/odoo#97888

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-09 11:12:02 +02:00
Rémy Voet (ryv) 37a9a2e166 [REM] sql_db.py: clean file and our Cursor class
- Remove `_default_log_exceptions` of our `Cursor` class (unused except
in one test)
- Deprecated `serialized` args of `__init__` (Cursor class) and
`cursor()` (of Connection class), our cursor is always serialized.
- Remove `sql_log` attribute of Cursor class and replace it with
appropriate code to do the same stuff dynamically.
- Simplify some code
- Update some docstring
- Clean import

task-2766494

closes odoo/odoo#85078

Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-09-09 11:11:59 +02:00
Rémy Voet (ryv) fae3c8d3a4 [REM] sql_db.py: remove/depreciated methods
- Remove depreciated `after` method of `Cursor`
- Remove `unbuffer`/`flush_env`/`clear_env` methods
- Remove specific code for psycopg version < 2.7 (psycopg version is
always >= 2.7 in our requirements)
- Depreciated autocommit

task-2766494

Part-of: odoo/odoo#85078
2022-09-09 11:11:58 +02:00
Rémy Voet (ryv) db76b065ee [FIX] sql_db.py: fix error type raised by closed cursor
Since e014cc88394fb9c8f6cff556ca73d5efafea030f, our proxy
`Cursor` object doesn't return a understandable error when we
try to use it when it is already closed
(`NoneType` or `Recursion` error).

Instead of reverting e014cc88394fb9c8f6cff556ca73d5efafea030f,
add a check in `__getitem__` raising a IterfaceError (like psycopg)
if we try to use psycopg cursor (`self._obj`)

task-2766494

Part-of: odoo/odoo#85078
2022-09-09 11:11:58 +02:00
alt-odoo 16d55910c1 [FIX] iap: allow regular users to delete accounts without token
Small fixup of recent commit [1].

A regular user do not have delete right on iap.account model, hence
creating an access right error. We should allow him to delete accounts
without token so they will be re-created afterwards.

[1]:https://github.com/odoo/odoo/commit/974caef934b7a116b7375f05e047aea15ea960aa

closes odoo/odoo#99877

X-original-commit: 53b05e7f7a7b562154a6523547678d46a8014aae
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-09-09 03:38:25 +02:00
Alexandre de Pape (alpa) 080c8edc03 [FIX] Traceback when adding a picture inside T&C
This commits fixes the fact that we were having a traceback when puting an image inside a div that was in the div with id #product_detail and clicking on the remove button in the editor. In reality this butotn should not have been available because the image is not in the carousel.

We now check that the image is in the
o_wsale_product_images div (which is the carousel) to display the remove button.

To remove an image outside of this carousel, simply click on the remove block button.

task_id=2973363

closes odoo/odoo#99757

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-09 02:41:51 +02:00
Alexandre Kühn d41f6e7687 [IMP] mail: emoji picker view no search content screen
Task-2976156

closes odoo/odoo#99700

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-09-09 02:41:48 +02:00
Romain Derie 9c733d8c22 [IMP] website: allow controller as homepage
Before this commit, only a website.page could be used as a custom
homepage ('custom' meaning other than '/').

But it is a real use case and requirement for our users to be able to
select a controller as homepage.
For instance, an ecommerce would want its homepage to be the shop and
not a regular page from where you then have to navigate to the shop.

Right now, this can (almost) be achieved by doing some technical
advanced operations:
- Move the 'Shop' menu first in the menu navbar of the website
- Delete the specific '/' website.page for the website
- Delete the generic '/' website.page (no website_id)

That way, the system will redirect `/` to `/shop`, which is not ideal as
it should remain `/` in the URL.

That's because, until now, the homepage (`/` controller) serve order
was:
- Serve the website.page set as homepage (`website.homepage_id`),
  happens when one did select another page as homepage through the page
  properties dialog
- Serve the website.page having `/` as URL (default)
- Serve the first accessible menu if there no `/` page or other page set
  as homepage, it acts as a last resort attempt to not serve a 404 and
  to try serving relevant content (the first menu of a website is most
  likely always better than a 404)
- Serve 404

This commit allows to introduce an URL as homepage, instead of only a
website.page. It can be done through the website settings in the
backend.

There is 2 main points to keep in mind about serving the homepage:
- make sure we don't serve a 404 as the website homepage. This is the
  website entry point, serving a 404 is terrible. That's why we have
  some fallback mechanism like serving the first menu.
- We need to serve / before fallbacking to the first menu, as a lot of
  site just remove the 'Home' first menu since it is a duplicate of the
  logo, which also redirect to the homepage. In such cases, it doesn't
  mean that the user want his first menu to be the homepage. We
  shouldn't rely on such a behavior, it should just be used as a last
  resort.

With this commit, the homepage serve order is now:
- If homepage URL is set (empty by default), serve the website.page
  matching it
- If homepage URL is set (empty by default), serve the controller
  matching it
- If homepage URL is not set, serve the `/` website.page
- Serve the first accessible menu as last resort. It should be relevant
  content, at least better than a 404
- Serve 404

Most DBs will just have a website.page with '/' as URL and keep the
homepage_url setting empty.

task-2969683

closes odoo/odoo#99100

Related: odoo/upgrade#3876
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 00:56:54 +02:00
Ahmed Khalaf (ahkh) 64f2b8aebb [IMP] mrp_subcontracting_dropshipping: subcontract dropship address
This commit shows the user Dropship address field in the PO when subcontractor resupply is
done with dropshipping mechanism.

closes odoo/odoo#95770

Related: odoo/upgrade#3852
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-09-09 00:02:17 +02:00
Ahmed Khalaf (ahkh) a99f75b043 [IMP] mrp_subcontracting{_dropshipping}: archive/unarchive subcontract rules
This commit allows the user to archive/unarchive subcontracting rules by
toggling warehouse settings `Dropship Subcontractors` and `Resupply Subcontractors`.

Additionally, if there is no warehouse with a setting enabled, the corresponding global
routes are archived as well.

Part-of: odoo/odoo#95770
2022-09-09 00:02:17 +02:00
Ahmed Khalaf (ahkh) 3f389b4769 [IMP] mrp_subcontracting_dropshipping: new dropship subcontractor pick type
This commit introduces a new pick type used when dropshipping subcontractors,
specifically when the PO resupply relies on the dropship mechanism
this is done by using it for the rules of the `Dropship subcontractor on order` route

Part-of: odoo/odoo#95770
2022-09-09 00:02:17 +02:00
Ahmed Khalaf (ahkh) 0ff3ab2f21 [IMP] purchase_stock: remove onchange order pick type
This commit removes onchange on picktype in PO replacing it with compute

Part-of: odoo/odoo#95770
2022-09-09 00:02:17 +02:00
Ahmed Khalaf (ahkh) 16445b7008 [IMP] mrp_subcontracting: location subcontractors one2many
Before this commit, to access the location subcontractors, you needed to search
everytime, the one2many will provide this as well as cache the result for future use.

Taskid: 2848013
Part-of: odoo/odoo#95770
2022-09-09 00:02:16 +02:00
Alexandre Kühn b63a7deb0e [FIX] mail: dialog properly manage overflow for long content
Before this commit, when content of dialog was long, content
overflow but was not scrollable, which makes bottom unreachable,
which is especially a problem when buttons are at the bottom.

This problem solves the issue by adding classname `modal` to
dialog. This classname puts proper handling of overflow of
dialog and its content.

Also remove `align-items-center` so that top doesn't overflow
in isolation from the rest of content, which made top unreachable.

Task-2973866

closes odoo/odoo#99865

X-original-commit: 9f4495aa065da5e94d6ccd007c9f26b7d755f140
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-08 21:43:21 +02:00
William Braeckman 3bfd3581f9 [FIX] website_payment: fix provider button styling
Since a field is put inside of the button, the space used by the button
is a bit overblown compared to the text inside, by adding oe_inline we
make it use less space.

closes odoo/odoo#99830

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-08 21:43:18 +02:00
Adrien Dieudonné 4202009086 [REF] account: remove unused views and model
This commit deletes all unsused views from the following models:
- `account.chart.template`
- `account.account.template`
- `account.common.report`

We also take the oppoturnity to remove ´account.common.report´.
This model is unused since https://github.com/odoo/odoo/commit/b7232b14b7f2423241b24b4eef1300f1a1b425cf#diff-61c2936e0566472acce71f3bb90f47ca5a709680322621dbcb735e3e2bd92f7eL11

This is a preliminary work in order to convert form views into grid.

Related commit:
https://github.com/odoo/odoo/commit/c04065abd8f62c9a211c8fa824f5eecf68e61b73#diff-f292b09f5efe026c65c27c5f0175b719a5d66999cbb15832c211796617ac082dL1976

closes odoo/odoo#99810

Related: odoo/upgrade#3875
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-08 21:43:12 +02:00
Alexandre Kühn c1051a154b [FIX] mail: emoji picker properly show last row in search
Before this commit, when searching an emoji in emoji picker,
the last row was frequently now showing. This is especially
a problem with very specific search, whose results are not
showing any result, like "bomb" for 💣

This commit fixes the issue by properly showing the last row.

Task-2976677

closes odoo/odoo#99766

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-08 21:43:06 +02:00
luvi 6217126c5e [FIX] web: fix size option for image field
This commit fixes the size of an image being set with
a 0 when it was given using the 'size' option.
In legacy, when 0 was given to one of the parameters,
it was simply ignored and not set on the image. Since
the fields has been converted, it was set and the image
was not visible, because of an height/width equal to 0.
A test has been added to assert this behavior.

closes odoo/odoo#99613

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-08 18:31:20 +02:00
Xavier Morel b3b85cae9b [IMP] *: owlify password meter and convert change password to real wizard
The changes in `auth_password_policy` are largely the owlification of
the password meter widget:

- modernize the password policy module and convert it to an
  odoo-module (note: now exports a pseudo-abstract class which is
  really a policy, for the sake of somewhat sensibly typing
  `recommendations`)
- replace the implementation of the Meter and PasswordField widgets by
  owl versions

The changes to web and base stem from taking a look at converting the
ChangePassword wizard, and finding that it would be a pain in the ass
but also... unnecessary? It seems to have been done as a wizard
completely in javascript despite being backend-only for legacy
reasons: apparently one of the very old web clients (v5 or v6
probably) implemented it as a "native action" which was directly part
of the client's UI, and so it had to be implemented entirely in the
client.

Over time it was moved back into the regular UI (and moved around
quite a bit), hooked as a client action to maintain access to the
existing UI / dialog.

But since it's been an action opened via a button for years it can
just... be a normal wizard, with password fields, which
auth_password_policy can then set the widget of.

So did that:

- removed the old unnecessary JS, and its dedicated endpoint (which is
  *not* used by portal, portal has its own endpoint)
- used check_identity for the "old password check"
- split out `change_password` with an internal bit so we can have a
  safer (and logged) "set user password" without needing to provide
  the old password, which is now used for the bulk password change
  wizard as well
- added a small wizard which just takes a new password (and
  confirmation), for safety a given change password wizard is only
  accessible to their creator (also the wizard is restricted to
  employees though technically it would probably be fine for portal
  users as well)

Rather than extensive messy rewrite / monkeypatching (the original
wizard was 57 LOC, though also 22 LOC of template, the auth_policy
hooking / patching was 33, plus 8 lines of CSS),
`auth_password_policy` just sets the widget of the `new_password`
field in the new wizard, much as it did the bulk wizard.

Also improve the "hide meter if field is empty" feature by leveraging
`:placeholder-shown`. This requires setting a placeholder, and while
empty works fine in firefox, it doesn't work in chrome. So the
placeholder needs to be a single space. Still, seems better than
updating a fake attribute or manipulating a class for the sake of
trivial styling.

Notes on unlink + transient vacuum

Although the wizard object is only created when actually calling
`change_password`, and is deleted on success, it is possible for the
user to get an error and fail to continue (it should be unlikely
without overrides since the passwords are checked while creating /
saving but...).

While in that case the `new_password` in the database is not the
user's own, it could be their *future* password, or give evidence as
to their password-creation scheme, or some other signal useful to
attack that front of the user's life and behavior. As such, quickly
removing leftovers from the database (by setting a very low transient
lifetime) seems like a good idea.

This is compounded by the `check_identity` having a grace period of 10
minutes. 0.1 is 6 minutes, but because the cron runs every 10 the user
effectively has 6~10 minutes between the moment they create an
incorrect / incomplete version of the wizard and the moment where it
is destroyed if they just leave it.

closes odoo/odoo#99458

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-09-08 18:31:18 +02:00
hiroh-odoo bffc5dc658 [IMP] project,sale(_purchase,_timesheet): improve generic UX for project
Purpose of this PR to improve generic usage of project app.

So in this commit done the following changes:
 - move the the filter 'tasks_due_today' and 'late_milestone' above the
  'late' filter.
 - change label for 'remaining_hours_on_so' according to timesheet uom.
 - add placeholder in milestone wizard
 - make remaining_hour field colour red when it's value < 0.
 - added filter in project_sharing_view search view 'overtime',
   'remaining_hours_percentage','tasks_due_today','late_milestone',
   'open_tasks','closed_tasks','closed_last_7_days','closed_last_30_days'.
 - added optional field in project_sharing_view sub-task list view
   'subtask_effective_hours', 'total_hours_spent','priority','remaining_hours_so'.
 - added optional field in portal tree view 'timesheet_uom','progress','priority',
   'portal_user_names','remaining_hours_so'.
 - re-arrange quick search options in search view options in portal view.
 - make the 'subcontract service' field company dependent and add
   fa-building icon on form view.

task-2889829

closes odoo/odoo#96149

Related: odoo/enterprise#29563
Related: odoo/upgrade#3712
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-08 17:31:45 +02:00
William Braeckman dc02b1cdba [FIX] website_sale_loyalty: fix possible crash during tests
This commit attempts to fix an undeterministic error, calling an
ensure_one method on an empty recordset.

closes odoo/odoo#99808

X-original-commit: 8e079bc0509f13794c61efeb1080c59baad65590
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-08 14:53:21 +02:00
Achraf (abz) 7b7aa99fc9 [FIX] web: Correct modals design
Since https://github.com/odoo/odoo/pull/99503, o_xxl_form_view is
removed from the modal but there was still an useless overflow present.

Also we removed the `flex-flow: row nowrap;`,
as the flex direction is handle by the `form_compiler`

Note:
for a display: flex the default value for direction and wrap are:
```css
flex-direction: row;
flex-wrap: nowrap;
```

To reproduce:
- Add a bank account on accounting app
- Choose "create it" at the bottom of the modal
- The modal is broken

closes odoo/odoo#99677

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-08 14:53:18 +02:00
Aaron Bohy de6cd189a4 [FIX] web: tests: fix non deterministically failing tests
Before this commit, these tests sometimes failed because the
autocomplete dropdown updated itself after a delay. These tests
patch it s.t. there's no delay in the tests. Something similar is
done in the Many2oneField test suite.

Example of impacted staging and nightly builds:
 https://runbot.odoo.com/runbot/build/19121210
 https://runbot.odoo.com/runbot/build/18976006

This commit also removes unnecessary patches that set the delay of
the Autocomplete component to 0, but this has no impact as this
property doesn't exist (this was done in addition to a patch of
setTimeout which is enough anyway).

Closes #99781

closes odoo/odoo#99788

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-09-08 13:50:51 +02:00
luvi bd80c4138e [FIX] web: fix BooleanField in editable list
This commit fixes the BooleanField which didn't
turned the row in edition when clicked on it since
the event was stopped by the Checkbox component.
The disabled input should not stop the event, since
the component do not need to handle a click being
done on it.

The test in editable list has been adapted to add
this assertion.

closes odoo/odoo#99759

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-08 13:50:48 +02:00
Denis Ledoux d5b7f7001c [IMP] base: restrict fields_get attributes for web client
Instead of fetching all field attributes sent with the field list
to the web client,
restrict the attributes to the ones actually required by the web client

This allows, for instance,
to gain 44,75KB on each call on `get_views` for `account.move`,
from 208.78KB to 164.03KB,
with only `account_accountant` installed.

closes odoo/odoo#99660

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-09-08 13:50:45 +02:00
Philippe Wauthy de47062e7c [FIX] hr_holidays: fix timezone issue
To reproduce the issue, set the local timezone of the computer and the user to Pacific/Auckland.
Create a new time off from the dashboard.
The date_from and date_to are one day apart.

task-2885980

closes odoo/odoo#99072

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-08 13:50:42 +02:00
Fabien Pinckaers 9b4e6331c4 [IMP] sale: index to speed up constraint checks & open list view
closes odoo/odoo#99795

Related: odoo/enterprise#31148
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-09-08 12:46:50 +02:00
Fabien Pinckaers 1569100baa [IMP] account: index on account.move.line to open journal items
Opening journal items does a query similar to
```sql
  SELECT
       "account_move_line".id
       FROM "account_move_line"
       LEFT JOIN "account_move" AS "account_move_linemove_id" ON ("account_move_line"."move_id" = "account_move_linemove_id"."id")
  WHERE
       ORDER BY "account_move_line"."date" DESC,"account_move_line"."move_name" DESC,"account_move_line"."id" ,"account_move_line"."id" LIMIT 80
```

Indexes on `date` weren't used in such queries. Building a compound index that includes
`id` changes the index cost computation, and allows a Index Only Scal. So, it does not
have to jump on data pages anymore to retrieve the ID of rows.

Without that, postgresql will use a Seq Scan.  It went from 10s to 5ms in our production
database, to open the list of journal items.

Part-of: odoo/odoo#99795
2022-09-08 12:46:50 +02:00
Fabien Pinckaers 781a771295 [IMP] remove duplicated index
The following indexes were in double:
- ir_module_module_name_index, ir_module_module_name_uniq
- ir_model_obj_name_uniq, ir_model_model_index
- ir_config_parameter_key_index, ir_config_parameter_key_uniq
- decimal_precision_name_index, decimal_precision_name_uniq
- account_edi_proxy_client_user_id_client_index, account_edi_proxy_client_user_unique_id_client
- mail_channel_rtc_session_channel_member_id_index, mail_channel_rtc_session_channel_member_unique
- loyalty_card_code_index, loyalty_card_card_code_unique

Part-of: odoo/odoo#99795
2022-09-08 12:46:50 +02:00
Jérémy Hennecart (jeh) f13b8897fd [FIX] web: fix can create option m2m
Since the "canCreate" option was not propagated this was leading
to a traceback with the autocomplete.
Indeed the option "No records" was never added because it was always
in a loading state.

closes odoo/odoo#99689

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-08 12:46:44 +02:00
tsm-odoo c01b9e7bdd [FIX] mail: model manager is debug during tests
Since the PR introducing the wowl environment in the discuss app, the
model manager is not set in debug mode during tests. The debug mode
is usefull since it adds integrity checks and more verbose error
messages. This commit restores it.

closes odoo/odoo#99556

Related: odoo/enterprise#31086
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-08 12:46:37 +02:00
Alexandre Kühn d8ba2ce234 [IMP] mail: introduce Messaging/executeGracefully
- Made executeGracefully in messaging so it can have specific
behaviour in qunit tests (no timeout)
- guard all usages of `executeGracefully` in case current record
is deleted (e.g. during test teardown).

Task-2976295

Part-of: odoo/odoo#99556
2022-09-08 12:46:37 +02:00
Alexandre Kühn c4e84115c2 [FIX] mail: remove manual .update() in onScrollActiveCategory
This computed field was manually updating a field, which is
not correct. Instead, this field should have been an `onChange`,
which is what this commit does as a fix.

Task-2976940

Part-of: odoo/odoo#99556
2022-09-08 12:46:37 +02:00
William Braeckman f36045625a [FIX] hr_recruitment: fix crash outside of multi company
Since recently fields are not present in the views if the user does not
match the groups attribute on that field, this means that the field is
not loaded an may not be used in domains in `attrs` for example.
Most fields were properly checked but some remained broken.

closes odoo/odoo#99751

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-08 11:45:21 +02:00
Didier (did) a06161ec1c [IMP] mail: introduce _generateMessageBody
Avoid code duplication by introducing `_generateMessageBody` function.

closes odoo/odoo#99745

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-08 11:45:18 +02:00
FrancoisGe 1b3630fcf2 [REF] web: convert many2manyattendee to owl
closes odoo/odoo#99676

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-08 11:45:15 +02:00
tsm-odoo 26444fcaef [FIX] bus: keep last notification id during refresh
Before the websocket were introduced, the last notification id was
persisted in the local storage in order to use it even after a page
reload.

The last notification id is now stored on the `SharedWorker` which
means this information is lost if the last opened tab is reloaded.

This commit fixes this issue by storing this information by the mean of
the localStorage. Since the localStorage is not accessible from the
worker global scope, the bus service will store this information and
relay it to the worker when starting. The worker will now wait to
receive the last notification id before subscribing.

closes odoo/odoo#99621

Related: odoo/enterprise#31124
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-08 11:45:06 +02:00
Sébastien Geelen (sge) c189fc1b31 [IMP] web_editor: better tabs
Refactor the tabs to be :
* Automatically aligned on a 40px grid.
* A tab only need one delete to remove.
* Arrow navigation around tabs is working as intended.

task-2871848

closes odoo/odoo#99460

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-08 11:44:57 +02:00
Sébastien Geelen (sge) 3f9eb21571 [FIX] web_editor: ensure correct set selection
Ensure the selection is never put inside a contenteditable=false
element when correcting the selection due to navigating around ZWS.

Part-of: odoo/odoo#99460
2022-09-08 11:44:57 +02:00
Sébastien Geelen (sge) 02ad6d5316 [REF] web_editor: improve delete commands
Part-of: odoo/odoo#99460
2022-09-08 11:44:57 +02:00
Sébastien Geelen (sge) f4ec5ad9e9 [IMP] web_editor: improve unit tests
* Add test for the new Odoo Editor Tabs.
* Refactor test utils to simplify and
  remove deprecated or unused features.

task-2871848

Part-of: odoo/odoo#99460
2022-09-08 11:44:56 +02:00