Commit Graph
165530 Commits
Author SHA1 Message Date
Sébastien Theys 89aaa2c9ef [FIX] mail: restore lost pending new message when thread is loading
Part-of: odoo/odoo#136698
2023-09-28 01:51:38 +00:00
alsh-odoo 8b1c10ae5a [FIX] hr_expense: raise exception if multiple company records selected
This traceback arises when the user selects multi
company records and click on the 'create report' button.

To reproduce this issue:

1) Install 'hr_expense'
2) Create a new company for example 'test'
3) Enable the 'test' company on the right corner
4) Now open 'employees' and change the company of the current user(Mitchel Admin)
   to the 'test'.
5) Open 'Expenses', create a new record, and change the company to 'test'.
6) Fill the required field values and save the record.
7) Now click 'My Expenses/My Expenses to report' and select all the records (Make sure
   'My Expenses' filter is applied)
8) Click on the 'Create Record' button

Error:- "ValueError: Expected singleton: res.company(2, 1)"

On the '_create_sheet_from_expenses' method, the value of 'company_id' is getting
through 'self.company_id.id'.
See:-
https://github.com/odoo/odoo/blob/f910987cb4af84c1e7afabf67f05d4eebc31e765/addons/hr_expense/models/hr_expense.py#L324-L335

But when user selects multi company recordsets
'self.company_id' has multi recordsets.

When 'company_id' is getting value through 'self.company_id.id', because of
'self.company_id' has multiple records, which leads
to the above traceback.

By applying this commit will resolve the issue by raising an exception,
when user selected multi company records to create report.

sentry-4465422743

closes odoo/odoo#136695

X-original-commit: 32cb39c9f533820b5558d739d993199a9541f779
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-09-28 01:51:37 +00:00
Andrea Grazioso (agr-odoo) 0ac4f54e4e [FIX] account,hr_expense: double base line amount
Create an expense sheet (report)
Add 2+ expenses with 10% included tax to the same employee
Approve expenses and post journal entries
Bill will be created
Go to the tax report
Group by "Tax > Account" or "Account > Tax"

Issue: Bill line will have the tax basis calculated incorrectly
This occurs because the bill will have 2 separate tax line and the query
 does not handle this case

opw-3510371

closes odoo/odoo#136694

X-original-commit: 2ed464bc6bf4fa35e1ad2704ed9db71789c39257
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-09-28 01:51:36 +00:00
Killian Frappart 66be8524f6 [REF] test_discuss_full: replace method by static property
Storing the _query_count value at the class level makes it trivial
to extend by dependant modules.

closes odoo/odoo#136669

Related: odoo/enterprise#47931
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-28 01:51:33 +00:00
Didier (did) 6eaf6f23b4 [FIX] mail: do not display recipients when using log note
In log note case, followers are not going to be notified of the message.
Therefore the recipients input should not be visible.

task-3504225

closes odoo/odoo#136661

X-original-commit: c60449a2efde457e8370928681f011c103ea1d60
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-09-28 01:51:29 +00:00
Sébastien Theys 635762db77 [REF] web, mail, snailmail: tests: merge containsMulti into contains
closes odoo/odoo#136658

Related: odoo/enterprise#47913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-28 01:51:27 +00:00
tsm-odoo 0e023aff21 [FIX] im_livechat: fix missing css class on embed livechat
This commit adds the `ui.scss` file in order to provide image
related css classes to the embed livechat (`o_object_fit_cover`)
was missing.

Steps to reproduce:
- Go to the website
- Open a livechat
- Paste a link in order to display a link preview
- The image is stretched since the `o_object_fit_cover`
class is not available in the shadow DOM.

closes odoo/odoo#136656

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-28 01:51:25 +00:00
FrancoisGe ba0205afbb [FIX] web: autocomplete inEdition
When a user is editing an Autocomplete, we don't want to delete its value
if the props value changes.

For example:
- In a form view with a many2one field and another field with an onchange
- Edit the second field
- Insert a value in the many2one input
- The onchange of the first field returns a value for the many2one

Before this commit:
    The value inserted in the many2one is lost. It is replaced by the
    onchange value

After this commit:
    The value inserted in the many2one is unchanged.

closes odoo/odoo#136654

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-28 01:51:24 +00:00
std-odoo 24cf7bdc35 [FIX] mail_plugin: use the user language in context
Bug
===
When searching for projects from the Outlook / Gmail addins, the names
were not translated into the user's language.

Task-3486324

closes odoo/odoo#136645

X-original-commit: 7ebe04189c84381e133ad3d0d6f8b97832b28a14
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-28 01:51:23 +00:00
Andrew Gavgavian 3fecf305b7 [FIX] mrp: fix access rights on change.production.qty call
Steps to reproduce:
As Admin:
1. Create a Storable product with a Route of Manufacture
2. Create a re-ordering rule for this product.

3. As a user with no MRP access rights, create a sale order with this
   product and confirm the sale order.

This creates a new `mrp.production` record with `sudo()` on line
\#85: https://github.com/odoo/odoo/blob/fae59cee91969692c2375b3bd37e914ec0fb606e/addons/mrp/models/stock_rule.py#L85

4. Duplicate sale order and try to confirm again.

This produces an access right error because the first loop finds the
existing `mrp.production` record and tries to create a
`change.production.qty` record.

However, the user doesn't have access rights so they get an error.

Solution:
Add `sudo` to the create call.

opw-3508819

closes odoo/odoo#136640

X-original-commit: c5758e122db5396e23a57826a1b12ed7d9765f55
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Andrew Gavgavian (andg) <andg@odoo.com>
2023-09-28 00:30:53 +00:00
Dylan Kiss (dyki) 0b1b4c8d05 [REV] l10n_dk: force lock of sales and purchase entries
We don't want to force anything and make clear that we have 3 solutions
the user can choose: hash, lock date and audit trail.

This reverts commit 3a5fc92c34.

closes odoo/odoo#136625

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-27 21:24:19 +00:00
maad-odoo 3268b6c710 [FIX] web: traceback on cropping image
Before this commit:
when cropping a non-supported image in email marketing, it should trigger
a warning but instead throws a traceback error. This issue is due to
snippet.options.js being in legacy JavaScript, which doesn't include the
expected methods from the 'notification' service directly. Instead, it uses
methods from 'makeLegacyNotificationService' that lack the .add() method.

After this commit:
Added the add() methods in the 'makeLegacyNotificationService' which will
resolve the error.

task-3488181

closes odoo/odoo#136611

X-original-commit: 785e0d7ac12e51ce5db611e535f185a2345241ff
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-27 18:56:20 +00:00
Jorge Pinna Puissant b89f53095c [REF] base: remove unused test
Since [1] qweb library is not used anymore, rendering this test useless.

1 : 4b0a951af6

closes odoo/odoo#136610

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-27 18:56:19 +00:00
Géry Debongnie a54865632c [IMP] web: update owl from 2.2.5 to 2.2.6
Commits:
[IMP] devtools: add svg elements detection
[FIX] reactivity: do not notify for NOOPs on collections
[IMP] app: export apps set as static property
[IMP] runtime: do not check template equality outside dev mode
[FIX] runtime: properly support t-foreach on strings

More details: https://github.com/odoo/owl/releases/tag/v2.2.6

closes odoo/odoo#136591

X-original-commit: c92f9f8a7de6e10354ec0feea64bfc045a0edafb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-09-27 18:56:17 +00:00
prye-odoo 14bcc336e4 [FIX] hr_recruitment: handle key error in calendar.event object
When users try to apply for new job positions from the calendar view,
a traceback will occur.

Steps to reproduce:
- Install the "hr_recruitment" module.
- Go to the "Recruitment" icon; Kanban view will open;
choose any job position; and click on the "NEW APPLICATIONS" button.
- Then, select the "calendar" view and try to create a new record.
After that, a traceback error will occur.

Error:  KeyError: 'default_partner_ids'

When users try to apply for new job positions from the calendar view and
the 'default_partner_ids' key does not exist in the context dictionary,
a traceback occurs.
Code reference:
https://github.com/odoo/odoo/blob/16.0/addons/hr_recruitment/models/calendar.py#L18

sentry-4462451583

closes odoo/odoo#136585

X-original-commit: 851c9fde8e73f30a164c81153e43160f95af6b0a
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-27 17:41:05 +00:00
Yolann Sabaux e4fc2ec5e3 [FIX] analytic: prevent closing the analytic editor
steps to reproduce:
- enable analytic
- open journal items in list view
- select one item, set an analytic account
- select the same item, click on the analytic account, click on the save button (floppy disk)
- pop up opens
- close it

Issue:
Traceback

Cause:
In multiEdit mode, the main element cannot be focused in

opw-3463911

closes odoo/odoo#136576

X-original-commit: 93e553c211e1b74c0e712e387290db6455cf0e3d
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-09-27 17:41:04 +00:00
Julien Castiaux 2ba215729b [FIX] mass_mailing: add test for emoji widget
Go to the form view of mailing.mailing, write "hello " as the subject,
insert an emoji, you end up with "hello:)" instead of "hello :)". The
problem is that when the input loose the focus, it is automatically
trim.

Reconfigure the `char_emojis` widget so that is doesn't trim.

task-id-3493168

closes odoo/odoo#136530

X-original-commit: 2adda1eb2760ccf970761f424105e245afc3de3f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-09-27 17:41:03 +00:00
Thomas Lefebvre (thle) bbb452dd39 [FIX] project: avoid modify display_in_project during duplication
Version:
--------
- saas-16.4 only

Issue:
------
When a project is duplicated, all tasks and sub-tasks
are visible in the new project's kanban view.

Cause:
------
When writing `project.write({'tasks': [Command.set(new_tasks.ids)]})`,
we trigger an inverse which writes the `project_id` field to the tasks.
This will set the value of `display_in_project` to `True`.

Solution:
---------
Rewrite the `display_in_project` field if necessary.

opw-3479714

closes odoo/odoo#136527

X-original-commit: 6f62d156b65b331a0a15406a90b174c265100491
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 17:41:02 +00:00
Yan Victor 7032917771 [IMP] account: Avatax module installation
Auto install AvaTax module for countries that use AvaTax ('US','BR').
Add a checkbox in settings to easily install the module if needed

task ID: 3398637

closes odoo/odoo#136490

Related: odoo/enterprise#47979
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-27 17:41:00 +00:00
Arnold Moyaux 9b3fbd1b4b [FIX] mrp_account: optional production account
commit [1] addeed production cost account. However this account is
mandatory with real time valuation. It could be an issue during
production because we don't have an automatic way to create a new
valid account. On top of it this behavior is optional and people
could still use the classical input and output account for production.

This commit make the cost of production account optional and fallback
on previous behavior with input/output accounts

[1] commit 1eb2e7c814

closes odoo/odoo#136463

X-original-commit: ea647812e76931f9193ae841f428b312b861739b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-09-27 17:40:59 +00:00
Thibault Delavallée 617a4aef2c [FIX] various: fix ot !
Fix ot that should nto be.

closes odoo/odoo#128232

Related: odoo/enterprise#43995
Related: odoo/upgrade#4929
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-27 17:40:55 +00:00
Thibault DelavalléeandJeremy Hennecart 643df62f12 [REF] event: merge phone and mobile fields on registration
RATIONALE

Merge two phone-related field on registration as they overlap. Having only
one is sufficient for contact-oriented model like registration.

SPECIFICATIONS

Registration model currently holds two phone field, phone and mobile. This
leads to having records with sometimes phone, sometimes mobile being filled.
This makes phone flows not easy: we have to define fallbacks (use phone or
mobile), data is not always synchronized, ... in the end what event users
need is one phone field to be able to communicate with attendees. Having
only one field is sufficient and simplifies the model.

Keep only one phone field, instead of two. Merge phone and mobile into a single
one, keeping phone as first value when having both available e.g. when
synchronizing with the partner.

Task-3366899

Part-of: odoo/odoo#128232
Co-authored-by: "Jeremy Hennecart" <jeh@odoo.com>
2023-09-27 17:40:55 +00:00
David Monnom (moda) 69e2d08d4e [IMP] point_of_sale: multi-attribute support
Prior to this PR, `product_configurator_popup.js` did not support
attribute selection of type `multi`. In addition, the
`pos_preparation_display` did not display any attributes.

Now it's possible to select attributes of type `multi` in the Point of
Sale, and the preparation display shows all available attributes.

closes odoo/odoo#136441

Taskid: 3497560
Related: odoo/enterprise#47834
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-09-27 14:57:15 +00:00
Nicolas Bayet 1d70293093 [REF] web_editor: move handle_history_divergence in tools.py
As `handle_history_divergence` is not used in the controllers, it makes
no sense to have it in `controllers/main.py`.

task-3217965

closes odoo/odoo#136277

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-27 14:57:13 +00:00
Nicolas Bayet 1eb32c94b4 [REM] web_editor: remove route /web_editor/ensure_common_history
As the route is not used anymore, remove it.

task-3217965

Part-of: odoo/odoo#136277
2023-09-27 14:57:13 +00:00
Nicolas Bayet 2d05f703d7 [FIX] web_editor: strengthen collab stale detection & recovery
Before this commit, the stale document detection was imprecise and
incomplete.

The stale document could happen in different scenario:
1)  Client B save when client A is disconnected (therefore client A
    should be notified that the document is stale upon reconnection):

    - For that scenario, the code had a heuristic to detect if the
    internet connection disconnected and reconnected but was imprecise
    as the browser api is not 100% reliable on all browser and
    platforms. That made the code under-checking or over-checking with
    the server.

2)  The user has not yet focused on the element and before this
    commit, the stale document was not detected.

3) If there is a partition in the peer to peer network and a member of
   another partition that save, all other partition will not be aware
   that they are working on a stale document.

4) The stale document happen before 2 peers could be fully connected.

For any of those scenarios, if a stale document was not detected and
the user tried to save changes, only then, a popup would inform that
the version was stale. And if the user closed the tab thinking the
document would automatically save, the change would not be saved
(without warning).

This commit:
1) improve detection of stale document
To detect the document this commit add a message in the odoo bus.bus
for the channel of the record for each write. That will ensure the
message to be received as soon as a user is connected to odoo.

2) improve recovery from stale document
Before this commit, the recovery was only made from the server.

As a detection is now direct (rather than delayed by the previous
heuristic), a document could be detected stale before receiving a step
that would not make it stale. Therefore, we cannot just reset from the
server as a recovery mechanism.

To recover, this commit first tries to reset from missing steps from
all peers. If unsuccessful, it will tries to reset from a snapshot. If
unsuccessful, it will reset from the server.

3) add a mechanism for aborting requests
To prevent unexpected concurrency behavior, this commit add a mechanism
to abort requests.

4) a framework for testing the collaboration of the wysiwyg
As it could be quite tedious and error prone to manually tests
concurrency issues related to the wysiwyg, this commit add a framework
for testing the collaboration of the wysiwyg and test the detection
and recovery of stale document.

task-3217965

Part-of: odoo/odoo#136277
2023-09-27 14:57:13 +00:00
Nicolas Bayet 804b824f8a [FIX] web_editor: move _getNewPtp out of a closure
In a subsequent commit, we need to change the content of the method
`_getNewPtp` and to patch it in tests.

To make that commit more readable by understanding which lines
changed, this commit moves the creation _getNewPtp to the Wysiwyg
prototype rather in a closure.

task-3217965

Part-of: odoo/odoo#136277
2023-09-27 14:57:13 +00:00
Loukas Wets (lowe) 89a06b3ea5 [IMP] pos_restaurant_appointment: floor plan improvement
Prior to this commit the name of the reservation was not displayed under
the booked table. In addition to fixing this issue, this commit adds
the number of people expected on the table.

closes odoo/odoo#136140

Related: odoo/enterprise#47715
Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-09-27 14:57:10 +00:00
vlst 40403e1966 [ADD] pos_order_customer_screen
We introduce a new module that enables restaurants to show
their customers a display with all the current orders, filtered by
their preparation state.

In order to know the preparation state of the orders, we rely on the
information provided by the pos_preparation_display module.

In this commit we create a new function on the `pos.order` model
that returns a tracking number for a certain order.
This tracking number will be used by the `pos_order_status_customer_screen`.

Task: 3514516

We also create a generic OdooLogo component that
renders the odoo logo in svg format.
This component has the prop `monochrome` that dictates which
type of odoo logo will be rendered.

closes odoo/odoo#136065

Task: 3520164
Related: odoo/enterprise#47668
Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-09-27 14:57:09 +00:00
Audric Onockx (auon) b7491b5b94 [FIX] sale(_timesheet): take super's domain into account for aal.so_line
The model `account.analytic.line` has a field `so_line`.
In module `sale`, this field has a domain, which is defined in
`_default_sale_line_domain()`.

In module `sale_timesheet`, we override the method to add another
condition to super's.

The issue is that we also add the arg `dommain=...`, in the field
definition, which totally overrides both methods.

Moreover, it is impossible to just move that domain in the method,
because it has to depend on `self.commercial_partner_id`,
but the method is static.

The solution is to:
- Keep `_default_sale_line_domain()` in both modules,
but not call it directly from the field.
- Create a new compute field (`allowed_so_line_ids`),
to determine all allowed so_lines,
following the domain that is returned by those methods.
The compute method will call the domain method on instances, which
allows us to get their `commercial_partner_id`
- Replace the domain arg of `so_line` by `[('id', 'in', allowed_so_line_ids)]`.

task-3507195

closes odoo/odoo#135528

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 14:57:06 +00:00
Bastien (bvdn) 52d1bc9ca6 [IMP] project_todo: write test for the create_todo_activity command
We check that both an activity and a task has been created by the create_todo_activity call
We check that the task has the same description as the activity.todo.create note

We check that the activity and the task have the same:
- name
- user
- deadline

Task-3492155

closes odoo/odoo#135134

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 14:57:05 +00:00
luvi b91f4034ab [IMP] *: improve documentation of options in fields metadata
*: analytic,  base_automation, loyalty, mass_mailing, project, web, web_editor, website

This commit adds many new documentation of options and their usage for
fields. This makes them more usable and customizable in Studio, and adds
documentation for developers to know the type of expected option.

Some options that might lead to issues or that are too technical have
been removed, as they are not relevant and not required in most use cases.

task-3469741

closes odoo/odoo#134858

Related: odoo/enterprise#47148
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-09-27 14:57:03 +00:00
Yannick Tivisse 9de40b92ee [IMP] hr_holidays: Add hourly frequency on accruals
closes odoo/odoo#133441

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-27 14:57:01 +00:00
Yannick Tivisse 60c596fe0a [FIX] hr_holidays: Fix label visibily on accrual levels
Part-of: odoo/odoo#133441
2023-09-27 14:57:01 +00:00
Lucas Lefèvre (lul) a8c6f26912 [IMP] spreadsheet: remove unused public method
The method is no longer used by the web client:
=> it should be private

See enterprise commit

closes odoo/odoo#133500

Task: 3483938
Related: odoo/enterprise#46460
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-09-27 14:57:00 +00:00
Noe Antoine 1da6cbc4c8 [IMP] event: redesign badges with multiple formats
Before, event badges were an a4 page divided in 4
quarters, meant to be foldable into a single badge.
It contained folding instructions, event instructions
and was white mostly everywhere.

We want to introduce some customization to allow
different colors between ticket types and a background
image.

Therefore, we introduce 3 different formats to print badges
(also sent to attendees through event communication)
- a4 foldable (french fold) (~ previous one but redesigned)
- a6
- a4 4 per page

The templates are intensively redesigned to a new style.
New templates are introduced to match new formats.
Example tickets are still managed, printing an appropriate
example ticket according to the event format.
Printing several event example tickets will still use each
event format appropriately

Models:

- event.event receives a selection field badge_format
and an image field badge_image. This will be printed
on the background of badge cards.

- event.event.ticket receives a color char field. It
can be picked from the event form view with a color picker,
and will be the backgroud of a band on the bottom of badge cards.

Renaming:

Scss file, records and templates are renamed from "_foldable_badge"
to "_badge", as now badges are not always foldable. Namespaces
of selectors follow the same logic. We still have specific
styling for the foldable version so there are still selectors
using a 'foldable' name.

Task-3473293

ENT PR: odoo/enterprise#46163
UPG PR: odoo/upgrade#5126

closes odoo/odoo#132855

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-27 14:56:56 +00:00
Theo VINCENT (thvi) 24ee5de588 [IMP] pos_restaurant, *: share payment methods
*: point_of_sale

 - Makes the default shop and restaurant use the same default payment methods except cash payment methods that are individual.
 - Adds a default cash payment method to the default restaurant.

closes odoo/odoo#126953

Task-id: 3378032
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-27 14:56:53 +00:00
Claire Bretton (clbr) b198e1ce19 [FIX] account: Report Customization
Ease the way invoice report is selected for rendering.
We now only rely on `_get_name_invoice_report()` to decide
the report, and it is automatically selected in the report template
`report_invoice` that is extended by localizations.

Task-id:3492033

closes odoo/odoo#136389

Related: odoo/enterprise#47812
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-27 13:12:00 +00:00
Alexandre Kühn 98491e3b43 [REF] mail: store all discuss models in Record.records as object
In preparation to improve insert in relational field with data, so
that there's less risk for cyclic code execution (hint: there'll be
a preinsert).

closes odoo/odoo#136308

Related: odoo/enterprise#47777
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-27 13:11:58 +00:00
Alexandre Kühn bef4069195 [IMP] mail: introduce RecordList.add() in discuss model relations
This method pushes the provided record if it's not in the record
list, otherwise it does nothing. This works a bit like `add()` on
Sets.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 22ed4ec268 [REF] mail: rename commands in discuss model data
Relational data in server formatter are:
- for one relation: None/false or object
- for many relations: list of objects or list of commands

The commands were:
- 'insert': to add a new item in a relational field
- 'unlink': to remove an item from a relational field
- 'insert-and-unlink': to remove an item from a relational field
- 'clear': to remove all items from relational field

There was a slight nuance between 'unlink' and 'insert-and-unlink'
at some point, but it becomes irrelevant with current code of model.
The name of the commands were hard to grasp what they actually mean
for the many relations.

This commit improves it by renaming 'insert' by 'ADD' and the 2
'unlink' commands by 'DELETE'. This makes it more apparent that
the data in 'ADD' refers to data of record to add in the relation,
while 'DELETE' refers to data of record to delete from the relation.
The 'clear' has been replaced by `False` value instead of a command.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 8d78065886 [REF] mail: turn Thread.transientMessages into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 87f605aa90 [REF] mail: turn 'store.ringingThreads' into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 08c751a9e3 [REF] mail: turn Thread.rtcSessions into relational field
Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 1af1b3e96a [REF] mail: remove unnecessary getters in thread
Also turn `invitedMembers` into relational field

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn d97ffb0dde [REF] mail, *: turn store.discuss into a model
This allows to define categories as also models, which allow
to register list of threads as relational fields, which in turn
simplify code readability and maintainability of these relational
data.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Alexandre Kühn 603cd70ecc [REF] mail: move service.update() to discuss models
These `update()` functions are specific to a discuss record,
so it's best to be defined in the model rather than another
service.

Part-of: odoo/odoo#136308
2023-09-27 13:11:58 +00:00
Michael (mcm) 7422eb643c [IMP] *: remove legacy rpc
This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.

closes odoo/odoo#136271

Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-27 11:33:01 +00:00
Florian Charlier 6ff40c0f9f [FIX] onboarding, web: restore validating steps
Reproduce:
1. Open "Sales" app.
2. Open the fist step about company data
3. Hit "Save"
4. The step should have been marked as complete

onboarding: Since the relational model refactoring,
saving a record that is not changed will not result in
calling the onRecordSaved callback, while saved will be `true`
in `saveButtonClicked`.

web: Be more explicit about this fact in the onRecordSaved doc.

Task-3516270

closes odoo/odoo#136143

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-27 11:33:00 +00:00
William Henrotin 513a65cf3e [FIX] stock: rename stock move title
Opening the stock move form view in a picking will display the
technical name of `move_ids_without_package`. This commit change it to
be more accurate.

closes odoo/odoo#136067

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-27 09:11:48 +00:00