Commit Graph
164837 Commits
Author SHA1 Message Date
Pierre Rousseau d946affe22 [FIX] web: correctly restore focus with ConfirmationDialog
When a dialog is closed, the focus is meant to be restored to the
previous focused element.

Before this commit, it did not work for the ConfirmationDialog when the
confirm button was clicked. This was because the focus was lost **before**
the dialog was closed (because the confirm button is disabled when
clicked), and thus the previous focused element was not in the el of the
dialog anymore, and thus the focus was not restored.

closes odoo/odoo#134456

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-06 13:25:37 +00:00
Maitri Patel b0bc3d0814 [FIX] calendar: handle singleton exception for sync calendar event
This error occurs when recurrence_id has no records when the user tries to
delete the sync calendar which has recurrent events.

Error: 'Expected singleton: calendar.recurrence()'

See-
https://github.com/odoo/odoo/blob/15.0/addons/calendar/models/calendar_event.py#L715

sentry-4367276387

closes odoo/odoo#134438

X-original-commit: 6ba4a671c4b37120146f137f88363dd5b170562f
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-06 13:25:36 +00:00
Brieuc-brd b132c7c6e0 [FIX] web: remove padding in o_list_selection_box
Commit 80f8281 introduced an unwanted padding on the right in
`o_list_selection_box` on large screen.
This commit adapts the spacing of this element to maintain the same
rendering whatever the screen size.

task-3454841

closes odoo/odoo#134384

X-original-commit: ed29d31ab7bb8d697c6515f3383a8b687f486e8e
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-06 13:25:33 +00:00
Arnaud Joset 5f16ea36d6 [FIX] base_geolocalize: allow to override user agent with system parameter
Before this commit, the useragent was harcoded as an Odoo one and if it was
blacklisted by the osmfoundation policy https://operations.osmfoundation.org/policies/nominatim/
all Odoo instances were forbidden to access the service.

This parameter allows to override the user agent with a system parameter.

closes odoo/odoo#134376

X-original-commit: 160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-06 13:25:29 +00:00
Rémy Voet (ryv) 35f739f558 [FIX] sale: avoid displaying address
Since https://github.com/odoo/odoo/pull/122085, on the sale
order form (with website_sale installed), changing the "Customer"
changes the "Invoice Address" & "Delivery Address". But the latter
are displayed with the partner name, but also with the full
partner address. This last information makes the form uglier than
before and are useless.

The old `display_name` of `res.partner` was stored in the DB and
did not depend on the context. Also, onchange calls add the
context of the source field (the one being changed). In this case,
`'show_address': 1` is added, and then `display_name` of
`partner_invoice_id`/`partner_shipping_id` is also read with this
context.

We cannot easily fix this in saas16-4 because it was not possible
to change the read context of a particular field. With the new
specification of onchange, we can override the read context on a
particular field.

closes odoo/odoo#134304

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-06 13:25:28 +00:00
Jitendra Prajapat 4c8fddd570 [FIX] point_of_sale: modified flow of order date
Before this commit:
===================
In the back-end, there is only one field "date_order" is used, while on the
frontend side, there are two separate fields: "creation_date" and
"validation_date," which causes confusion in the code flow and leads to
redundancies.

After this commit:
==================
Revised the order date flow by eliminating the confusion stemming from the
separate "creation_date" and "validation_date" fields. Both have been
consolidated into the "date_order" field, offering clarity to the order date
process.

task - 3482072

closes odoo/odoo#133293

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-06 13:25:27 +00:00
Guillaume (guva) 91aceecc63 [FIX] l10n_es_edi_sii: add registration date field
When sending an bill to sii services, the registration
date is set as today, instead of the accounting date.
This is because the registration date is automatically
set to today when sending the bill.

With this commit, we add registration_date field
to teh account_move view in other infos tab, to allow
the user to manually set it.

Steps:

- Install l10n_es_edi_sii
- Set a tax agency in Accounting > Configuration > Settings
- Create a bill, with date and accounting date in the past
- Confirm and send to sii services
-> In the file, 'FechaRegContable' is set to today

opw-3478079

closes odoo/odoo#134370

X-original-commit: 325857efcfc8060666b3860ae61c5321baab5462
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-09-06 11:51:02 +00:00
Josse Colpaert 68f71e1ec1 [FIX] l10n_eu_oss: only take the tax payable/receivable account from one tax group
closes odoo/odoo#134348

X-original-commit: 4322119fafcb8f2833bdb782d893333228807bd0
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) a53fae8084 [IMP] l10n_it_edi: Translations
Updated the translations for 16.0

X-original-commit: 19785efbc201d8329e3f2eb77b6040f00f347531
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) 2dc1612ddc [IMP] l10n_it_edi_pa: Split Payment
New module is created (`l10n_it_edi_pa`) to add fields that are required to handle Split Payment, and it will be merged in master.

- `l10n_it_origin_document_type`
- `l10n_it_origin_document_date`
- `l10n_it_origin_document_name`
- `l10n_it_cup`
- `l10n_it_cig`

These fields are required to track money used that comes from funding to the Public Administration business for purchases, be it ordinary or project based spending.
They also need to be exported in XML during the EDI phase, in different
XML nodes depending on the `l10n_it_origin_document_type` field

ref: https://fex-app.com/FatturaElettronica/FatturaElettronicaBody/DatiGenerali/DatiOrdineAcquisto
Task link: https://www.odoo.com/web#id=2823645&model=project.task
task-2823645

X-original-commit: e07fb2503f28af1f23ef74efec6741f9623ce401
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Paolo Gatti (pgi) 733abedc18 [IMP] l10n_it*: Split Payment
When an Italian company bills a PA business (for example they're selling cleaning services for a public building) the PA business will send the VAT to the Tax Agency themselves, while generally the VAT is collected and sent to the Tax Agency by the buyer (the PA business). This is done to avoid VAT fraud as the PA doesn't trust the business will actually pay the VAT. That's very common in Italy.
A new module will be created (`l10n_it_edi_pa`) in the next commit to add fields that are required to handle Split Payment, and it will be merged in master.

- New Split Payment related accounts are created: 2607, 2608
- New tax report data to target the VE tax chart grid
- Split Payment account.taxes are Groups of Taxes whose children target VE38 tax grid
- account_tax's l10n_it_vat_due_date is no more, we base ourselves on the VE38 tax grid
- The Group of Taxes includes normal VAT and a reversed VAT entry (for sale)
- Tax checks on the invoice now also check group of taxes with flatten_taxes_hierarchy()
- New Split Payment tax group has been added to build the correct totals in the move form view
- account.taxes and account.fiscal.position has been added to change from VAT to VAT Split Payment automatically when you select a res.partner that features the fiscal position.
- The Fiscal Position also has the law-required note that has to be featured on invoices that use Split Payment
- A PA business demo partner is added to showcase the new fiscal position
- `l10n_it_stock_ddt` tests are minimally modified because the Form component didn't let you use 'like' in the move form view

Task link: https://www.odoo.com/web#id=2823645&model=project.task
task-2823645

X-original-commit: 90d9250c66d59184a795041b8f1b7849c3b6db5f
Part-of: odoo/odoo#134348
2023-09-06 11:51:00 +00:00
Goffin Simon d7a387a07a [FIX] project_todo: Impossible to install project_todo
Typo error

opw:3478943

closes odoo/odoo#134346

X-original-commit: 0db170b851c994a1102d894172cc59af37936873
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@odoo.com>
2023-09-06 11:50:59 +00:00
Goffin Simon 0be605d22a [FIX] project_todo: Impossible to chose a project with no company
Steps to reproduce the issue:

- Go to the To-do app
- Open a task and try to convert it to a task
- Look for P

Bug:

P was not suggested

opw:3478943

X-original-commit: e0e3d35c7f53b9a87de366bf2cca96c1ca3be960
Part-of: odoo/odoo#134346
2023-09-06 11:50:59 +00:00
Guillaume (gdi) b16ab7b997 [FIX] website: allow to re-edit social media title
This commit allows you to change the title of the social media block
after the first save. If an element is in a parent that has the class
`o_not_editable` then it is only editable if it has the contenteditable
attribute set to true. We rightfully remove this attribute at saving but
without putting it back when we return to edit mode. This commit allows
to fix this case. Note that we have to improve this system in the future
(so we can get rid of this patch).

This part of the fix is very similar to [this other fix] for the team
block.

[this other fix]: https://github.com/odoo/odoo/commit/b7d53d2fcb20a447fd3098adf94ffb33bc49dda9

task-3073171

closes odoo/odoo#134281

Part-of: odoo/odoo#105964
X-original-commit: 44b0bcbdd67721e3b45567d26da00e4a3910f541
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-09-06 11:50:58 +00:00
Guillaume (gdi) 620cf19574 [FIX] website, web_editor: allow to re-edit social media icons
This commit allows you to change the icons of custom links of the social
media block after the first save. Thanks to [this other commit], there
is now a class that permits to inform the editor that a media is
editable even if it is a non-editable parent. This commit permits to use
the new class to fix the issue.

Steps to reproduce the bug:
- Drop a social media block on a page
- Add a custom social media
- Save
- Edit
- Try to change the icon of the custom social media with a double-click

=> The icon cannot be changed.

Note that [another commit] had already been made and fixed the problem
halfway (the icon change didn't work on double-click). This commit
reverts it and fixes the problem correctly with the new system.

[this other commit]: https://github.com/odoo/odoo/commit/6ead397f33512c918f51feb2b32fb3e15ffedf34
[another commit]: https://github.com/odoo/odoo/commit/bb291b35e46e42ca098aa3e04ac0b473f72be423

Fixes https://github.com/odoo/odoo/issues/104048
task-3073171

X-original-commit: b844351b9814ff2167d2183ab3216e2d1ec1d216
Part-of: odoo/odoo#134281
2023-09-06 11:50:58 +00:00
Dossogne Bertrand 5f976e0ef4 [FIX] hr_holidays: fix accrual allocation lastcall
Before this commit, creating a new allocation based on accruals
and setting a start date prior to the creation date would compute
the amount of days that should already have been accrued during that time.
However, the lastcall field is not updated and running the accrual cron
leads to a wrong duration.

How to recreate the issue:
- create an accrual plan
- create an allocation set on that accrual
- set a start date in the past for that allocation
- the duration should be automatically set to a value above 0
- save and validate
- run the accrual cron
- the allocation now has its duration doubled

After this commit, the lastcall should be set to the allocation creation
date. This way, running the cron will correctly keep the value of the amount
of days.

closes odoo/odoo#134251

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-06 11:50:57 +00:00
Alexandre Kühn eb673674b6 [FIX] im_livechat:tests: less TestImLivechatSupportPage crashes
Before this commit, sometimes this test crash with the following log
on runbot:

```
Trying to set result to failed (None) but found the future settled (<Future at 0x7fdd859df910 state=finished returned bool>)
```

This problem usually happens when some RPCs are triggered after the
end of the test. This test on livechat support page is small and just
checks that there are no issues in loading JS modules. We do not care
on RPCs triggered from auto-opening of livechat that may result to
this error on runbot.

This commit disables console logging after the test, so that it won't
fail if it passes the check on loading JS files.

closes odoo/odoo#134234

Related: odoo/enterprise#46849
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 11:50:55 +00:00
Rahul Prajapati 2319d9d339 [FIX] mail: rendering of emails in chatter
odoo/enterprise#46143

Before this commit, messages of type email were not rendered properly in the chatter. For example, the email may display text with dark color even when in dark theme or the layout of bootstrap elements like btn might not look correct.

These style issues are caused by combining the style in content of the email (e.g. inline styles) with the style of the webclient, giving the impression that the original visual of the email is buggy.

This commit fixes the issue by showing a slightly transformed style of email messages in chatter that is readable and looks nice with the Odoo theme at hand. In particular with dark theme, the background color matches the bubble color and the text is white.

Sometimes the exact visual of the original email is desired. A button "Show Original Email" in the top-right corner of the message bubble allows seeing the visual of email in its original intention.

Task-3437069

Forward-port-of: #133545
Forward-port-of: #131202
Part-of: odoo/odoo#134234
2023-09-06 11:50:55 +00:00
vlst f5307d810d [IMP] pos_self_order: introduce combos
Using the POS app, one can buy a combo consisting of multiple products.

In this PR we implement this functionality in the `pos_self_order`.
A user can now navigate to a combo product, select each combo choice
and order the desired combo directly from the `pos_self_order` app.

In this commit we also change the values displayed in the orderlines
of the `pos_self_order`, such that they better reflect the values
that would be shown by the POS for the same respective orderlines.

Ex: when buying 5 units of an item that has unit price 138.58, the
POS ( and also the invoicing app, etc ) would display a total price
of 692.88. The self order now does the same, but before it was showing
692.90 for the same situation.

closes odoo/odoo#134169

Task: 3437447
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-06 11:50:54 +00:00
Pierre Paridans 3e444d9dd0 [IMP] web: remove PublicWidget fix for deprecated old apple devices
Introduced in odoo/odoo@f242721eb0,
this Bootstrap's Collapse fix was targetting very old Apple devices.

task-3439226

closes odoo/odoo#134020

Related: odoo/design-themes#694
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-06 11:50:53 +00:00
Nicolas Bayet 0d4d0409ec [FIX] web_editor: ensure the bus is available
In the frontend of project, the bus service is not available.
Since #129785, the test `portal_project_sharing_tour` crash
because `this.busService` is `undefined` when we try to access
it in `Wysiwyg.setupCollaboration`.

task-3434068

closes odoo/odoo#133477

Related: odoo/enterprise#46479
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-06 11:50:50 +00:00
Nicolas Bayet 6333ac0b69 [FIX] website_form_project: add website utils.js in project.webclient
In website, there is a patch of the LinkDialog (see
website/static/src/js/editor/editor.js) that require the utils.js.
Thus, when website is installed, this bundle need to have the utils.js
in its assets otherwise there will be an unmet dependency.

task-3434068

X-original-commit: 9bbb43c6be24ce8cd46e78b292779d3915cffd3e
Part-of: odoo/odoo#133477
2023-09-06 11:50:50 +00:00
Nicolas Bayet 93f02cf453 [FIX] project: include web_editor.assets_wysiwyg in project.webclient
Since #118966, the `web_editor.assets_wysiwyg` assets are not lazy
loaded anymore and therefore need to be included in
`project.webclient`.

task-3434068

X-original-commit: 10d50d6b02b3c9ad43cf54c9580b901f7e92dfa8
Part-of: odoo/odoo#133477
2023-09-06 11:50:50 +00:00
Julien Carion (juca) 8203f71a6d [IMP] web: scroll to 6am in calendar
This commit ensures that when the user opens a calendar view in day or
week mode the view will be scrolled so that 6am is at the top of the view.

task-3460517

closes odoo/odoo#132288

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-09-06 11:50:48 +00:00
Florian Damhaut baaecf2b2f [IMP] sale: improve sale calendar view
The goal of this task is to help user manage their sale_order
by having a summary view of all their next activities.

Sale calendar view is now based on the next activity for each
sale_order.

closes odoo/odoo#132287

Task-id: 3463325
Related: odoo/enterprise#45945
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-09-06 11:50:46 +00:00
pash-odoo 133f4da844 [FIX] hr_skills: fix resume end date wrong selection
before this commit, in resume we are able to put end date less than start date
which is not possible in real life.
inside form view add daterange widget to start date field so user not able to
select end date less than start date. switch the position of Display Type and
Certification or Course field to show the additional field below the Display
type when Display type is selected.

task-3397726

closes odoo/odoo#128269

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-06 11:50:43 +00:00
Guillaume (guva) 3a4bd36f1b [FIX] account: display payment term partial invoice
When having a payment terms with several lines,
the payment term lines are not displayed when
printing the invoice if this one has been
partially paid.

opw-3482256

closes odoo/odoo#134343

X-original-commit: 26a63a94fe167944fc24de2191c9abb2f502219a
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-09-06 10:26:02 +00:00
Guillaume (guva) 9505abe97b [FIX] l10n_ch: qr bill report with attachment
When having an attachment to the qr-bill report,
an error is raised when printing the report:
"the report's template does not contains the
 attributes 'data-oe-model' and 'data-oe-id' on
the div with 'article' classname."

Steps:

- With a Swiss company
- Activate QR code on customer invoices
- Go to Settings>Technical>Reports and select QR-bill
- In Advanced Properties tab, set an attachment
- Create an invoice for a swiss customer, confirm
  and print the QR-bill
-> Error

We this commit, we simply add oe-data-model and
oe-data-id to the div with the article class
in the template, as indicated in the error message.

opw-3480179

closes odoo/odoo#134337

X-original-commit: 55aea3e851c61e1ad138937c1d40372f7ba7cf26
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-09-06 10:26:01 +00:00
Jorge Pinna Puissant 52e20a3dd3 [REF] web, *: change name noReload to reload
This commit change the name of the option noReload to reload, this is to
avoid having negative variables names for boolean. This is a general
known best practice, and in this case it's important to have a better
readability of the code (specially when a negation of a negative
variable occurs).

closes odoo/odoo#134317

Related: odoo/enterprise#46913
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-06 10:25:59 +00:00
Yolann Sabaux f35db5c31f [FIX] account: display banner tax lock before creation
Steps to reproduce:
- set a tax lock date
- create a new move
- set the accounting date prior to the tax lock date
- set an invoice_line with a tax

Issue:
The banner teeling you information about the tax lock date won't appear unless the move is created.

opw-3370727

closes odoo/odoo#134388

X-original-commit: d67aa6a798d9f7359549bbf56ec6fa2913f930ec
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-09-06 06:54:50 +00:00
David Monnom (moda) ab4d9056d4 [FIX] point_of_sale: skip receipt screen blinking
Currently when the pos.config is set to "Skip Preview", when printing a
receipt, the receipt or bill screen shows very quickly and disappears.
This is not good UX.

Now, the receipt is printed from the payment screen itself. We don't
need to show the receipt screen at all.

closes odoo/odoo#132550

Taskid: 3441238
Related: odoo/enterprise#46187
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-06 06:54:47 +00:00
Jérémy Hennecart (jeh) 706df048b3 [FIX] website_event: add answers info in registration summary
- Add the registration answers of the attendee in the registration
summary.
- Add a mobile kanban view for answers on the attendee form to
make them more visible.

task-3491881

closes odoo/odoo#134404

X-original-commit: 35ed7ccfd24ea31df86f9c863e75f1cb0fb77f0d
Related: odoo/enterprise#46957
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-09-06 05:53:58 +00:00
Baskhuu LodoikhuuandAntoine Dupuis b8b4135842 [IMP] l10n_mn: Changes needed for updated reports
Necessary changes to:
- CoA
- Taxes
- Fiscal Positions
- Account Tags
for supporting up-to-date Mongolian reports.

closes odoo/odoo#134379

X-original-commit: c76a837d8f517f6388fb37bc3126c2daa9d42446
Related: odoo/enterprise#46947
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
Co-authored-by: Antoine Dupuis <andu@odoo.com>
2023-09-06 05:53:55 +00:00
Vincent Larcin d1796b4768 [FIX] project: fix portal task groupby
In the portal view of tasks, we set a default groupby in _prepare_task_values to project.
However, since this method is called every time we change the groupby, it is effectively
impossible to group by anything other than project.

This commit fixes this so that it is possible to select other groupbys.

Task-3438490

closes odoo/odoo#134378

X-original-commit: 02629788f24efb4646703cf94f1a8c603179e185
Related: odoo/enterprise#46945
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-06 05:53:54 +00:00
Vincent Larcin c5fe911540 [FIX] project: allow groupby project when it has shared documents
When viewing an individual project in the portal, despite there being a single project,
we still want to group by project when that project has shared documents, so that the
"Documents" button is displayed.

This commit adds a method meant to be overriden in documents_project so that behavior can
be readded for project with shared documents only.

Task-3438490

X-original-commit: b8e68f35fe151d59bd60510ccd3a43c0a92e1190
Part-of: odoo/odoo#134378
2023-09-06 05:53:54 +00:00
Victor Feyens 23d2c5294a [FIX] product: automatic generation of documents for attachments
Finetuning of #132739

closes odoo/odoo#134364

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-06 05:53:51 +00:00
Walid 585c2d806a [FIX] stock_landed_costs: reconcile LC after posting the bill
Steps to reproduce:
- Create a PO (fifo automated product)
- Recieve product
- Create the bill and add the landed cost product to it
- Create the landed cost before posting the bill
- Post the bill

Bug:
when creating the landed costs if the bill is already posted
the created amls are reconciled otherwise they aren't

Fix:
reconcile the landed costs amls after posting the bill

opw-3377088

closes odoo/odoo#134349

X-original-commit: 233699522c48dce9b541a79db756cc478ed71592
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-06 05:53:50 +00:00
Sébastien Geelen (sge) bfa3090be2 [FIX] web_editor: delete behavior before table
Before this commit:

* A delete at the end of an empty block just before a table (unbreakable), nothing happened.

After this commit:

* A delete at the end of an empty block just before an unbreakable block, the empty paragraph should be removed and the selection put at the beginning of the unbreakable block.

task-3186679
task-3252775

closes odoo/odoo#125211

closes odoo/odoo#134327

X-original-commit: 70a03c931438fd549d167deb9ad500f3fc8b6024
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-09-06 05:53:48 +00:00
Sébastien Geelen (sge)andAashish Thakur 8c481c7b8e [FIX] web_editor: delete behavior in LI
Before this commit:

* A backspace at the beginning of a List Item (LI), the indentation of the list item was reduced by 1 unit.
If not possible, the current LI was merge with the previous LI.
* A delete at the end of a LI, first we remove one unit of indentation from the next LI,
only when not possible anymore we merge next LI in the current LI.

After this commit:

* A backspace at the beginning toggle off the current LI ( the LI tag is remove and popped out of the List )
The parent List is splitted if needed.
* A delete at the end of a LI directly merge next element inside the current LI.

task-3186679

X-original-commit: b177c29ee0df8c7edf72b177c59c5dff6bd0d270
Part-of: odoo/odoo#134327
Co-authored-by: Aashish Thakur <aath@odoo.com>
2023-09-06 05:53:48 +00:00
Sébastien Geelen (sge)andSanjay Sharma d8d30bc7b1 [FIX] web_editor: backspace should keep current node
Before this commit:

On backspace current node is removed and it's content were moved to it's
preceding node.

After this commit:

Now keeping the current node it removes preceding node if empty and if not empty
then merge current node to previous node.

Task-2909314
task-3186679

X-original-commit: bca7f0455ce56268a592c924ac22f9f2dc6541db
Part-of: odoo/odoo#134327
Co-authored-by: Sanjay Sharma <shsa@odoo.com>
2023-09-06 05:53:48 +00:00
Alexandre Kühn 78fcad9176 [FIX] mail: properly type static methods of discuss models
Before this commit, static methods on discuss models like `.get()`
or `.new()` where not properly documented.

The superclass `Record` documents `@returns`, but jsdoc failed to
deduce these static methods return subclass instances. We tried to
find a way to define things once in `Record` and let typedoc deduce
things automatically without overriding in each models just for the
sake of type. However typedoc still sucks in 2023 despite requests
for improvements to support this specific case since 2016, 7 years
ago.

This commit fixes the issue by overriding static method in all discuss
models so that the `@returns` is properly documented.

closes odoo/odoo#134316

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 05:53:46 +00:00
Arnold Moyaux 38abfc16e7 [IMP] mrp: add a table in stock
closes odoo/odoo#134314

Related: odoo/enterprise#46908
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-06 05:53:45 +00:00
David Monnom (moda) c825bd0b25 [IMP] point_of_sale: change skip line color
Previously before the bootstrap refactoring the skip line color was
`#7F82AC` which is a dark purple. After the refactoring the color was
changed to `text-secondary` color which is a light gray.

This commit changes the color to `#7F82AC` again to keep the same
behavior as before the refactoring.

closes odoo/odoo#134305

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-06 05:53:43 +00:00
Gabriel de Paula Felix (gdpf) a14bc16647 [FIX] microsoft_calendar: traceback trying to delete recurrence
Before this commit, trying to delete a recurrent event that was already synced with Google Calendar or Microsoft Calendar was raising a traceback and not showing the User Error which forbids this action to be done.

After this commit, the traceback is not shown anymore and the User Error is correctly presented to the user while trying to delete a recurrent event (with Microsoft synchronization active).

Traceback snippet:

result = _call_kw_multi(method, model, args, kwargs)
File '/data/build/odoo/odoo/api.py', line 448, in _call_kw_multi
  result = method(recs, *args, **kwargs)
File '/data/build/odoo/addons/microsoft_calendar/models/calendar.py', line 168, in action_mass_archive
  if self._check_microsoft_sync_status() and any(self.microsoft_id):
TypeError: 'bool' object is not iterable

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error

closes odoo/odoo#134293

Issue: 3468190
Task-id: 3473180
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-09-06 05:53:42 +00:00
tsm-odoo f5c12800c9 [FIX] mail: fix record deletion crash
Before this commit, calling `record.delete` twice would
result in a crash. This is due to `this.Model`being cleared
once the delete is done. This commit skips the deletion if
it was already done: calling delete will result in the desired
state anyway.

This can be easily reproduced:
- Throttle your network
- Send a message on the discuss app
- A crash occurs

closes odoo/odoo#134254

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 05:53:41 +00:00
Josse Colpaert a8a752a14e [FIX] l10n_es_edi_tbai: avoid external tests on l10n staging
For mysterious or logical reasons, the test classes inherit
the test tags from each other.  This means that the TBai external
test will have the post_install_l10n tag inherited and are currently
run when staging.  It should not block our staging when they are
down, ... by accident.

https://runbot.odoo.com/runbot/build/50405024

closes odoo/odoo#134286

X-original-commit: 7ebc8cc5771d069b32722d493dd0ae5341e54c96
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-09-06 02:22:43 +00:00
Didier (did) ae9da88c0c [IMP] mail: simplify link preview payload
Before this PR the link preview formatter was creating an unnecessary complex
object in the message key.
This PR simplify the payload by using a message_id key and remove the
unnecessary object.

closes odoo/odoo#134283

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 01:18:47 +00:00
Aaron Bohy e6fde6b694 [FIX] web: apply correct limit when grouping list/kanban
Be in an ungrouped list or kanban view. The "limit" number of
records is displayed (by default 80). Apply a group by. The same
limit is applied for the number of groups, whereas there's a
specific parameter ("groups_limit") for the number of groups to
fetch and display. The same problem occurs the other way around
(going from grouped to ungrouped), as in this case the groups_limit
is kept when the view is no longer grouped.

This commit fixes the issue by forcing a reset of the limit when
we go from grouped to ungrouped and from ungrouped to grouped.

We also add a test to ensure that the "groups_limit" is taken into
account even when there're multiple groupbys, which wasn't the
case in previous versions, but which is working as expected with
the new model.

closes odoo/odoo#134253

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-09-05 21:18:19 +00:00
FrancoisGe 956393ab90 [FIX] web: clean input m2mTagsAvatar
Before this commit, performing a search in a Many2manyTagsAvatarFields
and selecting an element does not remove the search value from the input.

Why not?
The value passed to Autocomplete is the default ''.
As this value never changes, onWillUpdateProps is never called and cannot
empty the input.

Solution:
Use the resetOnSelect option to force the input to be reset at each select
if props.value is the default value.

closes odoo/odoo#134242

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-05 21:18:17 +00:00
Didier (did) a6ebc20b73 [FIX] mail: only display followers with mail.mt_comment activated
Before this commit, recipient list in chatter when using composer
in "Send message" mode where listing emails of all followers, instead
of only subscribers of "Send message" (= `mail.mt_comment`).

This commit solves this issue by loading and showing followers
that are recipients in this list. Because this feature and follower
list lazy-load some data, they need to manage they own list for
the "load-more" aspect. That's why the diff shows some duplicated
code as with `followers` field of JS thread model.

closes odoo/odoo#134225

X-original-commit: ba43502b22f8f00e7a2318b341302b809e7129dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-05 21:18:14 +00:00