Commit Graph
164404 Commits
Author SHA1 Message Date
Pierre Pulinckx (pipu) 5e5178eb66 [FIX] website: fix lints in tour_utils
Due to a problem with eslint configuration,
few eslint errors were introduced during
09535ef5e6.
In this commit, these errors are fixed.

closes odoo/odoo#132963

Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-24 20:03:38 +02:00
Brieuc-brd 003678d1dd [FIX] web: adapt directional icons for rtl
Prior to this commits, new directional icons [1] from the ui icons
library were not adapted for RTL language.

This commit fixes this issue.

[1] 418413e499

task-3414560
Part of task-3326263

closes odoo/odoo#132946

X-original-commit: 8f3ea530a52e3c51f4f46f95119e093a37266e6c
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-08-24 20:03:33 +02:00
Louis Wicket (wil) 1276f53229 [I18N] l10n_es_edi_tbai: add Spanish translation
closes odoo/odoo#132914

X-original-commit: b752ca37957b1d37d882111816a4c88993457901
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-08-24 20:03:28 +02:00
Victor Piryns (pivi) 0d7fc98e0e [FIX] l10n_es_edi_tbai: workaround pos checkout w/ inv. printing
Issue:
In the spanish localisation (specifically with `l10n_es_edi_tbai`
installed), when generating an invoice at POS checkout, we are met
with a stacktrace about failed formatting of empty date.

Steps to reproduce:
- Install l10n_es_edi_tbai, l10n_es, l10n_es_edii_sii, l10n_es_reports, point_of_sale
- Switch ES company
- Setup POS, create a new session
- Make an order and at checkout select "invoice" (this normally
  prints the invoice of the order)
- We have the stacktrace.

Cause:
In the spanish localisation, when posting an invoice, it is sent to the
Basque government for a signature and for it to be added to a
"blockchain" for proof of uniqueness. The invoices normally are sent
to the government when being posted. Sadly currently there is no
`l10n_pos_es` or equivalent at the moment, so when generating
invoices when checking out in POS, we are trying generate the
necessary tbai_id and qr_code for the pdf, but since the
`signature` and `registration_date` are missing, we are met with a
stacktrace (failed formatting of the `registration_date`, because
it is empty). Subsequent try to print the invoice from the backend
also leads to the same stacktrace.

Fix:
Don't print the id and qr code when the invoice is not signed.

Affected versions:
16 up to master

Reference:
opw-3414480

X-original-commit: 31aa4be2e832236fa85fdcdbe90cae9fe30e8f8b
Part-of: odoo/odoo#132914
2023-08-24 20:03:27 +02:00
Adrien Widart (awt) f41c3b1d9e [FIX] base: rollback if broken transaction while importing
Suppose a user who has CRM module and wants to import some leads
thanks to this CSV file:
```csv
name,recurring_plan
Coca-Cola,Plan01
SAP,Plan02
```
And, because the recurring plans are not yet created on his database,
he enables the option "Create new values" for that field. An error
will occur and here is the only info the user will have:
> current transaction is aborted, commands ignored until end of
> transaction block

When importing, we convert the data encoded by the user ([1]). To do
so, we convert the provided values, field by field ([2]). Since
`recurring_plan` is a `many2one` field, we go (through
`_str_to_many2one`) in `db_id_for`. In this method, we `name_search`
the record and then, if it does not exist and if the feature is
enabled, we `name_create` it ([3]).

Back to the above use case. We start with the first line and there is
not any recurring plan called "Plan01" so we try to create it. But
here is the issue: we only have a name to create the record although
there is another required field: `number_of_months`. Therefore, it
leads to a `NotNullViolation` error. This error is caught (see [3])
and, later in the same method, we will raise a `ValueError`. This
error will be caught by one of the except in [2]: we will save the
error and will then  continue with the convertion of next values.
However, because of the `NotNullViolation`, the current SQL
transaction is broken. As a result, while trying to convert the
second line of the file, we will `name_search` "Plan02" and it will
simply lead to a `InFailedSqlTransaction`

[1]
https://github.com/odoo/odoo/blob/f3d7fdce608f692ecb08498ee158edf9dfbced5e/odoo/models.py#L1170-L1182
[2]
https://github.com/odoo/odoo/blob/b80d4294a000e748677a3a0c1849140bf46ddbe8/odoo/addons/base/models/ir_fields.py#L117-L118
[3]
https://github.com/odoo/odoo/blob/b80d4294a000e748677a3a0c1849140bf46ddbe8/odoo/addons/base/models/ir_fields.py#L472-L475

sentry-3969379125

closes odoo/odoo#132897

X-original-commit: 28373b9d261a48154b233fbbd895880680b0aed0
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-08-24 18:38:17 +02:00
abd-msyukyu-odoo 44b53f6de3 [IMP] *: add name to Form notebook pages to be used in Knowledge
Knowledge macros rely on the `name` attribute of a notebook page to switch
between tabs in a Form notebook. That attribute is not mandatory, so some views
with a valid `html_field` did not have one. This commit adds the `name`
attribute so those fields can now be manipulated by Knowledge macros.

See `searchInXmlDocNotebookTab` in `abstract_macro.js` for more details about
the usage of the `name` attribute in Knowledge macros.

task-3410128

closes odoo/odoo#132824

Related: odoo/enterprise#46146
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-24 18:37:51 +02:00
abd-msyukyu-odoo 9eb0c71c69 [IMP] mail: add classes on buttons used in Knowledge macros
To avoid relying on translated attributes, add classes on specific elements that
Knowledge macros can interact with.

task-3410128

X-original-commit: 2e92fef311da5492257b275427c4dcec683b9a12
Part-of: odoo/odoo#132824
2023-08-24 18:37:50 +02:00
MerlinGuillaume 0d4f6799f8 [FIX] l10n_it_edi: create 0% EU tax with correct exoneration values
The italian company of the demo data and new companies with the italian
fiscal localization have the tax "0% EU" with incorrect configuration

Steps to reproduce:
1. Install Accounting and module l10n_it_edi
2. Create a new company and select it
3. Go to Settings > Accounting > Fiscal Localization, set it to `Italy -
   Generic Chart of Accounts` and save
4. Go to Accounting > Configuration > Taxes and open tax "0% EU"
5. The fields for the italian exoneration are not properly set (same for
   the demo data italian company)

Solution:
Update the tax "0% EU" with the correct configuration in the
`post_init_hook` and in `_post_load_data`

opw-3414593

closes odoo/odoo#132754

X-original-commit: 5cb17244ca8b457e3964c7c6a115d132d0b6ab56
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-08-24 18:37:43 +02:00
Nicolas Bayet f5eca4245f [FIX] web_editor: use owl idiom for link tools_updateOptionsUI
There is an undeterministic error while testing the link tools
because `this.linkComponentWrapperRef` is null at the time of calling
`_updateOptionsUI` by the `onWillUpdateProps`.

As using the element for setting the class is not idiomatic in owl,
this commit adapt the code to use `t-att` attribute.

runbot-23346

closes odoo/odoo#132535

X-original-commit: a16c8b8598761808f5cb2a712c6f5808297e48f3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-24 18:37:34 +02:00
Victor Feyens 484210c5d3 [IMP] sale: ease catalog inheritance
closes odoo/odoo#132341

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-24 18:37:29 +02:00
amdi-odoo 960b4c8616 [IMP] base: improve record rules view
Purpose
=======
Promenade of the record rules views

Specification
=============
In the record rules search view:
- add a group by 'Group' separated with a separator.
- below the 'Global' filter, add a 'Group-specific'
filter which only displays the record rules with groups.
- shorten the labels of the other search filters.
- in the quick search, add the domain_force field below
the name.

In the tree view:
- rename the read, write, create and delete columns to
make their labels readable.

Task-3451884

closes odoo/odoo#130546

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-24 18:37:20 +02:00
Adrien Guilliams (adgu) 6ce6d6ea7b [IMP] point_of_sale,*: order visualization on ticket screen
*: pos_loyalty,pos_restaurant

The ticket screen contains a widget showing orderlines
and information about them for paid orders. This commit introduces
the use of this widget for open orders. On the ticket screen,
the cashier will be able to have information about the orderlines
for each order without necessarly loading the order in full screen.
The user now have to click on the order on the ticket screen and click
on the new button "Load order" to display it in the main screen.

closes odoo/odoo#128288

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-24 18:37:10 +02:00
Antoine Guenet 6f560990b1 [FIX] mass_mailing: remove sidebar from conversion iframe
When converting an email for compatibility with email clients, we move
the contents of the editor iframe inside a new iframe, keeping only
what's in the iframe target element. But we failed to remove the sidebar
and other UI utils elements, which are irrelevant to the conversion.
Additionally, failing to remove the sidebar from the conversion iframe
made the snippets' images load again when committing changes.

task-3323894

closes odoo/odoo#126845

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-24 18:36:57 +02:00
Antoine Guenet d1a9e049f7 [IMP] mass_mailing: do not load images on add sidebar and commitChanges
Images in mass_mailing are not lazy loaded, which is deliberate for the
mailing itself and its conversion, but when we load the sidebar we add
the HTML to all the snippets and hide it so if these images are not lazy
loaded, they all get loaded along with the sidebar, which is slow and
unnecessary.

This loads the images only once we add them to the mailing, which is
when we remove the lazy loading attribute.

task-3323894

Part-of: odoo/odoo#126845
2023-08-24 18:36:56 +02:00
dise 723ea29937 [IMP] project_todo: add a create to-do command on the command palette
This task will add a new command on the command palette, which will
allow the user to create a to-do and schedule an activity for it.

The command will open a new wizard to create a to-do.

task-3330177

closes odoo/odoo#125644

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 18:36:48 +02:00
Gurupreet Singh 60009bccc9 [FIX] hr_timesheet: fix the border color in kanban view remaining hour field
In the Kanban view of the project module, the remaining hour's widget should
have the frame colored orange, while the rest of the widget should have no color

task-

closes odoo/odoo#125526

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 18:36:44 +02:00
Kartik Chavda a844f37aac [IMP] hr_timesheet,project: refactor 'planned_hours' field
Before this commit 'project.task' model 'planned_hours' field
is inconsistent to the 'allocated_hours' field.

After this commit rename the 'planned_hours' to 'allocated_hours'
and related string change to 'Allocated Time'.

task-3231680

closes odoo/odoo#120405

Related: odoo/upgrade#4617
Related: odoo/enterprise#40643
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 18:36:33 +02:00
Samuel Degueldre 6f95be6884 [REF] *: remove web.assets_common
*: auth_password_policy, bus, event, im_livechat, mail, mass_mailing,
mrp_subcontracting, point_of_sale, pos_self_order, project, stock,
survey, web, web_editor, web_tour, website, website_event,
website_forum, website_sale, website_slides, base

Historically, the web.assets_common bundle was used to contain assets
that were needed by both the frontend and the backend. In practice, this
caused a bunch of issues where people would add things in assets common
that were not needed by both, and it was also abused as a way to get
bootstrap working in unrelated places by only using that bundle's css.

Because of this, as a first step, the assets_common stop being used in
the frontend, but was left everywhere else.

This commit removes the bundle completely, and moves the files that used
to be in that bundle in the other bundles that need them, this will
allow those bundles to evolve independently going forward.

in im_livechat and mail, some of the unneeded legacy code was removed, this
allows us to avoind including all of the legacy code from web in the
livechat embed bundle and in the dicuss public bundle respectively.

closes odoo/odoo#132190

Related: odoo/enterprise#45884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-24 15:11:05 +02:00
Yash Vaishnav 901294601e [IMP] project_timesheet_holidays: set project and task of the time-off type's company
Before this commit, the project and task fields were not dependent on the
company. The default project was set as the company if it existed; otherwise,
it was retrieved from the environment, and the internal project was set as
the default. The task was computed based on the project.

In this commit, the project will only be set to its internal project if the
company exists. If the company is false or not specified, both project
and task will be set to false.

task-3279188

closes odoo/odoo#129539

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 11:59:03 +02:00
Abdelouahab (abla) b6ce915eef [FIX] lunch: search domain type
To reproduce
============
- on Lunch set a filter and try to save it to favorites
an error is raised

Problem
=======
at this line https://github.com/odoo/odoo/blob/16.0/addons/web/static/src/search/search_model.js#L1771
we are expecting `_getDomain` to return a Domain, but the overrided version
on Lunch returns a List, so when we are calling `toString` it's not the one defined
in `Domain.js` that will be called but the default one defined by JS, which
is not expected in the rest of the process.

Solution
========
`_getDomain` return type depends on the boolean `params.raw`, if it's `True`
we return a Domain else we return a List.

opw-3435524

closes odoo/odoo#132931

X-original-commit: ce21a4bc1057c251d39e44da30dd5ffadf354e4d
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-24 01:07:03 +02:00
Didier (did) fdea4ee0e0 [FIX] mail: jumping on a message should not work outside the message thread
Before this PR, jumping on a message that is not displayed in it's originThread
would not work.
To reproduce:
* star a message that is a reply.
* open the starred menu.
* Try to jump on the replied message.

This PR fix the issue by not allowing the jump.

closes odoo/odoo#132924

X-original-commit: 914f899f119e4b5f6271613b4af653211a32f915
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 23:53:47 +02:00
Lucas Lefèvre (lul) 9849161a7d [FIX] spreadsheet: force light theme on top bar
o-spreadsheet code isn't prepared to handle dark theme. At all.
There are hardcoded colors everywhere.

Until we have a proper way to handle dark theme (use overridable scss
variables, rely on bootstrap), we force light theme for all elements
inside o-spreadsheet.

The white background on the top bar was removed by commit
odoo/o-spreadsheet@4d93a99

Other changes probably from the new milk design

opw-3461191

closes odoo/odoo#132909

X-original-commit: aaa9ea5c6584a8f830d8313d2f26670bf5b34cef
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-23 22:22:54 +02:00
Antoine (anso) e719063dd2 [FIX] web: fix logo colors
Before this commit, most of the logos used in Odoo were using the old
purple color.

This commit updates all these old logos with the latest version that
can be found on the Odoo brand-asset page

https://www.odoo.com/page/brand-assets

task-3328677

closes odoo/odoo#132878

X-original-commit: 9e6adb74223482539fd83cb99587816969e7468b
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-08-23 21:07:54 +02:00
Goffin Simon e2feb8c539 [FIX] purchase: recover vendor bill auto-complete by vendor reference
Up to v11 it was possible to search by purchase vendor reference when
we're using the auto-complete function in a vendor bill. With the
refactor of this functionality, this useful feature was lost.

opw:3387397

closes odoo/odoo#132896

X-original-commit: 0e7257306bb3dc8258b9642a53e2eefe7493c487
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-08-23 19:58:07 +02:00
Alexandre Kühn fec00da16e [FIX] mail: only prevent odoobot new messages during onboarding
Before this commit, new messages from odoobot were never opening
a chat window automatically.

This is desirable only during the onboarding process of the user,
when first logging-in, as to not bully the new user. It is not
intended to prevent all new messages from odoobot.

This commit fixes the issue by only preventing auto-opening of
chat window of odoobot for the 1st step of the onboarding process.

closes odoo/odoo#132689

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-08-23 18:55:17 +02:00
yhu-odoo 6faafdefa3 [REM] mrp: remove report "Manufacturing Order"
The report "Manufacturing Orders" is just the graph/pivot view of MO,
most of the infomation can be found on a more accurate report
"Production Analysis".
In this commit, we removed "Manufacturing Orders" from the report view.
Users can still access it from Operations -> Manfacturing Orders ->
graph/pivot view.

Task-2695732

closes odoo/odoo#130342

Related: odoo/enterprise#44912
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-23 18:55:03 +02:00
yhu-odoo f9867a5fa5 [IMP] mrp, *stock*: change move quantity reporting
Currently on stock moves, product_uom_qty indicates the demand qty
before the move is done and it indicates the acutual done qty when
the move is done.
As a result,  when validate a stock move with qty_done !=
product_uom_qty, a new move is always created for the difference.
And the product_uom_qty of the original move will be changed to match
qty_done.

In this commit, we change to that product_uom_qty will always indicate
the demand qty, and qty_done will always indicate actually done
quantity.
To do that, when underconsumption, we won't split the move when no
backorder. and when overconsumption, we will always merge the extra move
back to the original move.

Task-2695732

Part-of: odoo/odoo#130342
2023-08-23 18:55:02 +02:00
Matheus Leal Viana (malv) 4c253949b0 [FIX] sale: fix amount to invoice value for multiple SO’s
Issue:
-------------------
When creating invoices for two sales orders with the same customer the field amount_to_invoice is wrongly calculated and it shows a negative value when it should be zero

Steps to reproduce:
-------------------
1. Go to Sales -> sale orders
2. Create two sale orders with the same customer
3. Confirm the SO’s and delivery the items
4. Create the invoices for both SO’s
5. The field amount_to_invoice is negative

Cause:
-------------------
The method _compute_amount_to_invoice considers the value of all sale orders without any filter, but in this case we have two different sale orders and we only have to consider the value for the respective SO.

OPW-3437237

closes odoo/odoo#132859

X-original-commit: e2ec9e6c86949f5781d03a7dbb1065ef8af3196a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-23 17:40:33 +02:00
Dawn Hwang ed05c372b3 [FIX] point_of_sale: Fix typo that prevents reversal on refresh
closes odoo/odoo#132858

X-original-commit: b7d2d408c99eabda97b00884b7d8716412eed06c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-23 17:40:21 +02:00
Sébastien Theys a7485e53d6 [REF] mail, *: clean click and contains API
* = test_mail, hr, im_livechat

- Allow only selectors
- Add `value` check to `contains`
- Remove return from `click`

closes odoo/odoo#132799

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 17:40:07 +02:00
Sébastien Theys be199cd923 [REF] mail: remove unused afterEvent
Remaining of last refactoring.

Part-of: odoo/odoo#132799
2023-08-23 17:40:06 +02:00
casp-odoo 7ca7e56b24 [FIX] l10n_ch: fix qr-bills printing in batch
Since the fix of the QR bill headers (see task-3241502, PR:https://github.com/odoo/odoo/pull/130478), the print in batch functionality raises a stack trace.

This is because the render_qweb_pdf_prepare_streams method in base/ir_actions_report.py wasn't meant to handle multiple pages report without specific titles in its HTML structure, which is here the case since the QR bill fixing merges the top of one page with the end of another, therefore creating a peculiar structure.

In those cases we can consider that if each non-generated stream corresponds exactly to one page in the PDF reader, this is a simple batch printing case and we can just handle each page separately.

task-3241502

closes odoo/odoo#132816

X-original-commit: 84fdd2eb11e42f0422dd62961aea7fe4e6f52da3
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2023-08-23 14:44:05 +02:00
tsm-odoo 4dd66feaff [FIX] im_livechat, *: fix chat requests from operator
*: mail, website_livechat.

This PR fixes two issues with the live chat requests when initiated by the
operator:
- Thread name should not include "website" since [1]
- Welcome message should not be shown when the operator is the one who
initiated the chat

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

closes odoo/odoo#132815

X-original-commit: 38a6658beec8bd4423ee8b4ac16f2592b9fb36ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 14:44:00 +02:00
Prakash Prajapati 3c75588e2d [FIX] hr_attendance: open proper view in attendance report
Steps:
- Installed hr_attendance app
- Open attendance app and go to report menu
- Click on any cell

Issue-
When we click on the graph or pivot cell of the attendance report, the
attendance report tree opens instead of the attendance tree.

Why issue occurred?
In this commit the openView function has moved from (Graph/Pivot) Controller to
Renderer and in hr_attendance openView is in Controller so the issue has arisen.
Commit-https://github.com/odoo/odoo/commit/c8ca9da7bcee2c122a9d6cf8cda89f02823ba42d#diff-4e5bfd019e8d595efdf999a6b56fcb45a3127bb8bd7bb960161710bcfcd83687

task-3420173

closes odoo/odoo#132805

X-original-commit: 14504c0f4576ae76b095d3ea5f00f72c077f532f
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Prakash Prajapati (ppr) <ppr@odoo.com>
2023-08-23 14:43:55 +02:00
Pierre Paridans 4fef001672 [REF] web: move utils.scss out of legacy
task-3439226

closes odoo/odoo#132787

Related: odoo/enterprise#46131
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-23 14:43:51 +02:00
Pierre Paridans f7de71f696 [REF] web: cleanup legacy utils.scss
This commit does the following:
- remove the unused o-swap() SCSS function
- remove the unused mixin o-kanban-header-title and its related variable
- inline kanban specific mixins used only once (o-kanban-tag-color,
  o-kanban-dropdown, o-kanban-dropdown-open)

task-3439226

Part-of: odoo/odoo#132787
2023-08-23 14:43:49 +02:00
Pierre Paridans 2a59dd285e [IMP] web: remove unused legacy tooltip.scss
This file is only loaded in the backend bundle and overrides the
Bootstrap Tooltip's styling which the backend doesn't use anymore.

task-3439226

Part-of: odoo/odoo#132787
2023-08-23 14:43:48 +02:00
Pierre Paridans cb1ba1f2ba [IMP] web,*: move views.scss out of legacy
*: mrp_subcontracting,project,stock

task-3439226

Part-of: odoo/odoo#132787
2023-08-23 14:43:47 +02:00
Rodolpho Lima 954b2d1673 [FIX] web_editor: notification when image can't be cropped
After convertion of the ImageCrop widget to an Owl component [1], the call
to `this.displayNotification` no longer applies. In fact, it produces a
traceback when trying to crop an image that cannot be cropped
(base64-encoded image not yet converted to an attachment, for example).

This commit replaces such call for the more suitable notification
service's `add` method.

task-3471481

[1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997

closes odoo/odoo#132726

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-23 14:43:21 +02:00
niyasraphy f2f77b0b4a [FIX] pos_online_payment: translatable warning message
before this commit, the added user error and validation
error is not translatable to end user language.

after this commit, user error and validation error will
be show in users language

closes odoo/odoo#132637

X-original-commit: e2e580a0b83356dc32bc31bafaf1a3d03b47e266
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-23 14:43:16 +02:00
Noe Antoine c0a68becb5 [IMP] event: add a lang field on event.
In order to allow all communication to be sent in
a chosen language, a 'lang' field is added on the
event.event model. If set (amongst the installed languages)
this language will be used to translate email templates
instead of the partner's one (which is still the default one)

The field is added on the event form view.

Task-3357099

closes odoo/odoo#127540

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-08-23 14:43:11 +02:00
Lopes Marc (loma) bb4755f979 [IMP] website_slides: allow multiple correct answers
Purpose
=======
Currently the user interface let you specify several correct answers
per quiz question. But when you save the course, you get a notification
error. As those are simple quizzes, it might be interesting to simply
allow multiple answers.

Specifications
==============
Allow questions with multiple correct answers.
Back-end views: improve feedback when user forget to set at least one correct
answer and one incorrect answer per question.

Task-3366803

closes odoo/odoo#127065

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-08-23 14:43:06 +02:00
Aaron Bohy 122ff3ca59 [FIX] web: correctly leave sample mode in grouped kanban
Have a grouped kanban view with sample data and existing groups,
and the quick create feature enabled (e.g. CRM pipeline). Click on
"New", or on the "+" of a column. Before this commit, all columns
displayed the "Load More" button, with the count of sample records
that had been generated for that column, even though the columns
were empty. After this commit, no "Load more" button is displayed,
as expected.

closes odoo/odoo#132802

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-23 12:30:57 +02:00
Aaron Bohy ecb41753b6 [FIX] web: add record in list with sample data: no flickering
Have an editable list view with sample data (sample="1" and no
record). Before this commit, there was a flickering when the user
clicked on "New" to add a record. Indeed, the list was first
re-rendered without the sample mode (i.e. without the opacity style
and no content helper), but still with the sample records. With
this commit, we wait for the reload to be done before leaving the
sample mode, s.t. when the list is re-rendered, we don't have
sample records anymore.

Part-of: odoo/odoo#132802
2023-08-23 12:30:56 +02:00
tsm-odoo 2cfafbbcaa [FIX] bus: keep user log in debug mode tests
Before this commit, the current user was cleared after every
test. This is an issue since we can still interract with the
page after the test is done when in debug mode. This commit
fixes the issue by clearing the current user at the beginning
of each test instead of the end.

closes odoo/odoo#132801

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-23 12:30:49 +02:00
Jinane Maksoud 6021087f6c [FIX] models: add xmlid for inherited selection values
If model A has a selection field, and is inherited by 2 modules
B and C, B adds selection values to the field, and C inherits model
A under a different module and model names.
Based on the order of installation of B and C, we may end up with
different xmlids.
If B is installed before C, then B will add xmlids for the new
selection values added for model C. But if C is installed before
B, then C will have the selection values from B without xmlids.
The change here ensures that the selection values introduced by B
will always have correct xmlids.

closes odoo/odoo#132765

X-original-commit: c673d9db40cb91d4eb12cb787ff114068a924caa
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-23 12:30:45 +02:00
Hamza (hisl) d40d530a91 [FIX] hr_expense : remove the default_partner_bank_id
If we try to register payments for multiple expenses with multiple bank accounts from the expenses app, there is a traceback regarding the bank ids, as a singleton value was expected. We can do the same process from the vendor bills and the payment will be registered fine.

1. Create two expenses against two employees having different bank accounts.
2. Approve and post both of them.
3. In the 'To Pay' expense list, select the both expense reports and click on register payment.

Current Behaviour:
A traceback is thrown that a singleton value was expected. This is because there were multiple bank accounts against that payment.

Expected Behaviour:
The payment should be registered without any problem.

OPW-3272500

closes odoo/odoo#132774

X-original-commit: c7f62dca74e89659230ebc7a02d290cd62dd8323
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
Signed-off-by: Hamza Islam (hisl) <hisl@odoo.com>
2023-08-23 11:13:04 +02:00
roen-odoo 2799d8b75f [FIX] point_of_sale: Correctly set fiscal position on refunded order
Current behavior:
If you apply a fiscal position on a POS order, then refund it, the
fiscal position is not applied on the refund order.

Steps to reproduce:
- Create a fiscal position that match 15% of taxes to 0% of taxes
- Create a POS order with a product that has 15% of taxes
- Apply the fiscal position on the order
- Refund the order
- Check the taxes on the refund order, they are not correct

opw-3371028

closes odoo/odoo#132768

X-original-commit: 09dbf51e88ea76934634e1b2f4c0292e83f4c9e4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-23 11:12:59 +02:00
Tom De Caluwé 4163f1f4ff [FIX] web: prevent inline x2many list view overflows
When using a list view for an x2many field in a form view, the parent node
containing the list view will adapt its size to its contents. This can be a
problem for the list renderer as it calculates the allowed total table width
from the width of the parent node.

To resolve the issue we make sure the table does not cause any overflows at the
moment the allowed width is computed, just before the calculation of the column
widths.

Steps to reproduce:
Go to Inventory > Inventory Adjustments > Select a product from a line

In the many2many additional_product_tag_ids add a tag with a name longer than
the width of the column. Now all the labels in the column are broken (they will
wrap after every character).

opw-3358116

closes odoo/odoo#132759

X-original-commit: 1fa97b5a814ca678b831ef0545fd5a24f577c979
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
2023-08-23 11:12:49 +02:00
roen-odoo 517bc785ec [FIX] l10n_ae: fix vat amount computation
Current behavior:
If you make a sale in the PoS without invoicing it, the vat amount in
the tax report was no correctly computed.

Steps to reproduce:
- Install l10n_ae
- Create a payment method and a PoS with this payment method
- Create a product with a price of 100 AED and the tax of 5% (Dubai)
- Make 2 pos orders with this product, one with invoicing and one
  without
- To see the VAT Amount we need to add it with studio, go in accounting
  -> journal items -> studio -> existing field -> "vat amount"
- Go in the accounting app and go for the Tax Report, change the date
  range to the financial year. Now click on "Dubai" in the "Standard
  Rated Supplies (Base)" section. And click on "Audit"
- You will see that the VAT amount of the order is 0 when it should be 5

opw-3293589

closes odoo/odoo#132755

X-original-commit: cf261f5b6c9ec5d9d68bb7808e164ebdb85bb6ce
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-08-23 11:12:45 +02:00