Commit Graph
156437 Commits
Author SHA1 Message Date
vishal padhiyar 12f2cd2d34 [FIX] web_editor: stuck after manual link creation
Before this commit:

When we try to create link manually and try to press enter cursor gets stuck.

After this commit:

Now when we create link manually and press enter cursor moves to next line.

Task-2745129

closes odoo/odoo#105968

X-original-commit: 4d14fa559b2ffcb768fa0a0a42b9b9eb2703a050
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-24 17:23:40 +01:00
William Henrotin b39f37153c [FIX] stock_account: open layer form from list
Since e4988b70ab, the record openned from the stock valuation layer
list view will depend on the stock move parent's document. If, the move
has a picking_id set, the record will be the stock picking.

This implies in some cases (a stock move linked to a picking or a
manufacturing order) we cannot access the stock valuation form view and
thus the accounting entries are not reachable from there.

This commit adds a button in the list view to open the layer form view.

closes odoo/odoo#106398

X-original-commit: d5162f814f4d1181e2063f788b7933ce84a32b7c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-24 15:31:55 +01:00
niyasraphy 8c9fdafff5 [FIX] mail: channel/partner create error
closes odoo/odoo#106370

X-original-commit: e998b2c5d31ad0e601ed4d5e0439b999872627b8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-24 15:31:53 +01:00
Nicolas Martinelli 7b6921fb0e [FIX] account: do not call button_install is not necessary
If the method `_auto_install_l10n` is called programmatically on a DB
where the localization has already been installed, useless processing is
performed by `button_install`.

Do not call this method if no module need to be installed.

closes odoo/odoo#106419

X-original-commit: 11e9d3f1a9e8c85fa85a86f0a63935250552a19f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-11-24 14:33:00 +01:00
Thomas Lefebvre (thle) bd235e57cc [FIX] base, contact: add conditions in Set Defaults form
Version: only V16.0 (will be improve in future versions)

Steps to reproduce:
    - install the "contacts" module;
    - go to a contact;
    - go to the "Set Defaults" tab (in the debug menu).

Issue:
    There is no field that allows you to select the condition.

Cause:
    The function `getConditions` needs the `change_default` attribute of the field.

Solution:
    Add the `change_default` attribute to the list which is returned by the `_get_view_field_attributes` function.

opw-3079328

closes odoo/odoo#106410

X-original-commit: 07315bee24f69e2b9a1004d33eab842a8929709d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-11-24 13:29:05 +01:00
niyasraphy c23bbf30c8 [FIX] base: country form oe_button_box alignment
closes odoo/odoo#106409

X-original-commit: c7f1bb1882ab254e1e1cc74b014ce99408203e9f
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-11-24 13:29:03 +01:00
Nshimiyimana Séna 445d4cd97c [FIX] web_editor: fix codeview toggle
### Steps to reproduce
* Enable Dev mode
* Open an email template
* Open Code View of the template
* Click the green button in the top right corner of the content box

You should be met with a traceback.

opw-3045759

closes odoo/odoo#106408

X-original-commit: 01fb9cab941d9055efbeac738490fe53a91ceccf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-24 13:29:00 +01:00
maximilien(malb) a24e3de28c [FIX] account: coa kanban bug
Before this PR, going to the coa in kanban view was broken with an infinite white screen. The error was that the template tried to display the account type and without the .value is resulted in an owl error.
It's now corrected, we can now access the kanban view of the COA.

I also changed a bit the size of column so that the name of the account stay a maximum in one line

closes odoo/odoo#106391

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-11-24 13:28:57 +01:00
Ivan Yelizariev 0339a506f8 [REM] base,web: delete menu Apps Store, Updates
Those menus are supposed to be integrations with apps.odoo.com, but it doens't
work and not maintained.

Existing menus that open apps store links should be enough:

* Apps >> Apps >> Theme Store --> https://apps.odoo.com/apps/themes
* Apps >> Apps >> Third-Part Apps --> https://apps.odoo.com/apps/modules

---

close #72902
close #74602

closes odoo/odoo#106379

Related: odoo/enterprise#34324
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-24 13:28:55 +01:00
Kartik Chavda a8cf155ddc [FIX] hr_timesheet,repair: fix field width issue
Before this commit field width was not as expected because
its label defined in container(Ex: div,span)

This commit fix field width issue by giving o_td_label class
to container of label to properly compute its width

task-3032518

closes odoo/odoo#106336

X-original-commit: 41b354f3edf7fc77162a59613ccafc0b9b9066a0
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-24 13:28:50 +01:00
Morgane (morm) bcc7b5ba08 [IMP] website: new content modal blog icon
Prior to this commit, the icon to create a blog post in the new content
modal, inside the website "+ new", was not really fitting.

task-2941545

closes odoo/odoo#106269

Signed-off-by: Delacroix Pierre (pde) <pde@odoo.com>
2022-11-24 13:28:47 +01:00
Florent de Labarre 1f3cda12bd [IMP] base: remove unused index
On database with 5 million attachaments, the index of checksum is 250 Mo, but this field is never used to search.

closes odoo/odoo#106253

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-24 13:28:44 +01:00
Adrien Widart (awt) b603cde02d [FIX] delivery: hide useless length UoM
The dimensions UoM of the carrier packaging is useless: it is not the
one used in the requests and there is not any conversion

To reproduce the issue
(Need delivery_fedex. Use demo data. Enable debug mode)
1. In Shipping Methods, edit 'Fedex US':
    - Package Weight Unit: KG
    - Debug Requests: True
2. Edit its Fedex Package Type:
    - Height: 1m
    - Width: 1m
    - Length: 1m
    - Package Code: YOUR_PACKAGING
3. Create a SO with a US partner and one product
4. On the SO
    - Add Shipping
    - Select 'Fedex US'
    - Click on 'Get Rate'
5. In Logging, open the request sent

Error: the dimensions of the packaging are expressed with "CM" but they
are not converted:
```xml
<ns0:Dimensions>
	<ns0:Length>1</ns0:Length>
	<ns0:Width>1</ns0:Width>
	<ns0:Height>1</ns0:Height>
	<ns0:Units>CM</ns0:Units>
</ns0:Dimensions>
```

When encoding the packaging in the request, the UoM defined on the
packaging (meter) is ignored. Instead, we define a length UoM depending
on the UoM of the weight and we don't convert any dimension:
https://github.com/odoo/enterprise/blob/e4fd13a0e073b9855864b7fabc26bc05b9a5fd19/delivery_fedex/models/fedex_request.py#L172-L178
There is even a `TODO` about the issue.

It will be the same with the other carriers. For instance, with UPS:
https://github.com/odoo/enterprise/blob/c9899f7860cd19c86f215d6dcea89f73b51433f3/delivery_ups/models/ups_request.py#L98-L102
We use the UoM of `ups_package_dimension_unit` and do not convert the
dimensions.

We can't implement the dimensions conversion on stable versions, since
it will break all existing packagings. So, as temporary solution, we can
simply hide the useless UoM defined on the packagings.

OPW-3053048

closes odoo/odoo#106338

X-original-commit: 3bc2f594395a08515ed362e3d9a816e7cc18c842
Related: odoo/enterprise#34305
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-24 12:26:06 +01:00
Denis Ledoux 141852dc66 [IMP] mail: hide Unread messages filter for email notification users
The goal of this revision is to add a group
`mail.group_mail_notification_type_inbox` which is granted
automatically when the user `notification_type` is set to `Inbox`
to be able to easily hide the filter `Unread messages` when
the user uses the `Email` notification type,
by simply adding `groups="mail.group_mail_notification_type_inbox"`
on the filter rather than overriding `_get_view` in every model.

The code overriding `_get_view` of `project.task`
to hide the filter "Unread messages" replaced
in this revision initially comes from
odoo/odoo@da868d28e2

> - In project.task search View:
>   - the filter for unread messages should be visible only if the current user
>     managing his notifications in Odoo

The above revision was part of the task 2844212

closes odoo/odoo#104328

Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-11-24 12:26:01 +01:00
Romain Estievenart 72440e016c [FIX] web: text header appears over the text kanban card
Scrolling inside a grouped kanban with a lot of cards on a column
makes the text header appear over the kanban card due to the missing
background.

Steps to reproduce :
- Open Helpdesk on small screen like a mobile
- Open VIP Support
- Made a Group by "Create date => day" (there should be enough cards on
  a column to scroll)
- Scrolling the column => bug, the text header appears over the kanban
  card

closes odoo/odoo#106368

X-original-commit: 041fddf0c884ae9a6e2b040decfb1f31e9d25a29
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-11-24 11:08:42 +01:00
Arthur Detroux (ard)andqsm-odoo 0a83f41d59 [FIX] web_editor, website: improve perf of color previews
Follow-up of [1].

After [2], color previews on the side panel would be changed by the
wysiwyg adapter. The adapter would add each block individually inside
the iframe and check its current styling to then add the style to the
color preview elements. This was performed many times (as color palettes
all have their own individual rendering of the color previews)
and slowed down the editor.

This commit improves that by relying on the copied variables introduced
at [3]. This removes the "re-render" of the color preview elements,
instead relying on styling rules and CSS variables which are initialized
when the editor is started.

[1]: https://github.com/odoo-dev/odoo/pull/1149#discussion_r900120846
[2]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
[3]: https://github.com/odoo/odoo/commit/a396f791da94d064d58cce15892e74f45d29b7b7

closes odoo/odoo#106366

X-original-commit: 7f5a9d040348048990b25c271875c77d2c314e4d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-11-24 11:08:39 +01:00
Ivan Yelizariev 0c8e158393 [FIX] web: fix error on creating new record with ref field
STEPS:
* Open ``Settings >> External Identifiers``
* Click `[Create]`

Patch in `getValue` fixes js error:

> Caused by: TypeError: Cannot read properties of undefined (reading 'model')

Patch in `onWillUpdateProps` fixes infinite loop

task-3047190
opw-3056362

closes odoo/odoo#106195

X-original-commit: 92c4f55e341437b20f9320eded0baaa44628fb25
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-11-24 11:08:36 +01:00
Touati Djamel (otd) 8daffdd16a [FIX] mrp, sale_mrp: always use BOM UoM on Replenishment
Steps to reproduce the bug:
- Create a storable product “P1”:
    - route: MTO + manufacture
    - uom: unit
    - BOM:
        - qty: 1 dozen
        - component: 12 units of “C1”
- Create a SO:
    - Product: 12 unit of “p1”
    - uom: unit
    - Confirm the SO

Problem:
The UOM set on the product is used instead of the BOM UoM on the created
manufacturing order.

wrong MO:
    - 12 unit of "P1"
expcted MO:
    - 1 dozen of "P1"

opw-3048190

closes odoo/odoo#106351

X-original-commit: 8c5fb8b71538462422c8f166b772b5e316ecd6b5
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-11-24 10:02:53 +01:00
Andrea Grazioso (agr-odoo) f0d1bcd816 [FIX] account, account_sequence: psycopg2 errors class missing
Traceback when starting odoo server
ImportError: cannot import name 'errors' from 'psycopg2'

Exception management update in commit
4b430f8e30efb15f06982e4673cd73531a2119b3
would require psycopg2 version 2.8 minimum but version in
requirements is 2.7.7

closes odoo/odoo#106369

X-original-commit: b21fdf115e855d2383603e67343012bfe346cfd9
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-23 21:56:09 +01:00
aliya 97c1fbc18b [FIX] account: bill date rather than accounting
We should always use `invoice_date` instead of the `date` of the move for currency exchange.
Re-adding some of the changes from odoo/odoo#87984

task-2807136

closes odoo/odoo#106367

X-original-commit: 76a640d05a350840bdde1c88bd052251aabd6b12
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-23 21:56:04 +01:00
Audric Onockx (auon) 4fe0ce8460 [FIX] hr_timesheet: uninstall project's 'timesheet' config
Steps :
Go to project > settings.
Check 'timesheet' config and save.
Uncheck it back and save.

Issue :
See errors in the logs, due to on delete restrict.

Cause :
Record 'hr_timesheet.internal_project_default_stage' from data
is deleted when hr_timesheet is uninstalled.
Yet some project task records still use it, so we can't delete it.

Fix :
Delete the corresponding ir.model.data to keep the stage,
but unlink it from the 'hr_timesheet.internal_project_default_stage' ref.

task-2998416

closes odoo/odoo#106354

X-original-commit: c9e49358111521c042dd793f80ff99895d0fd179
Related: odoo/enterprise#34317
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 19:59:59 +01:00
Alexandre Kühn e9bf6d732a [FIX] mail:tests: channel fetch preview filter no last_message
MockServer behaviour on fetching channel preview was different from
server. Thankfully no test rely on this slight behabiour, but it's
important to ensure same behaviour for future tests.

closes odoo/odoo#106357

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-23 18:15:50 +01:00
Abdelouahab (abla) ae9d917c89 [FIX] point_of_sale: fix customer name overflow
To Reproduce
============
- start a session on pos
- on customer button create new one with a long name
- go back to pos dashboard, the name of the chosen customer goes outside of the button

Solution
========
a style was added to the button so that the long string is divided on multiple lines

opw-3074503

closes odoo/odoo#106352

X-original-commit: 4bf9627fc49439012198d9194859429bc0db89fa
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-11-23 18:15:48 +01:00
PNO 7fe785763a [FIX] stock: multi-company check to change product type
On the ticket https://github.com/odoo/odoo/pull/101547 a constraint was added to prevent the user from changing the product type if some moves have already been made.
This was done because changing the type creates inconsistencies (like breaking the valuation).
However, it currently only checks if there are moves on the current company, when it should check in all companies.
This can be fixed by adding sudo.

closes odoo/odoo#106346

X-original-commit: e8bb4a50aa0d3829d590858784e2c573118bc392
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-23 17:15:00 +01:00
Philippe Wauthy d61af003e1 [FIX] hr_holidays: fix allocation without validation
In hr_holidays, when the time off type has the following settings:
- Requires allocation: Yes
- Employee Requests: Not allowed
An allocation created with this time off type still requires to be validated.

This commit removes the need to validate an allocation created with the time off type described above.

task-3004313

closes odoo/odoo#106337

X-original-commit: c98e1280aee2f31e6dbf3f52dac47cf020c628d2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-23 17:14:54 +01:00
Kyle Young d1eab39ec3 [CLA] signature for ispiders
closes odoo/odoo#106286

X-original-commit: aa6554e858aa61f3abb038cde2e7f81a13a53377
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-23 17:14:52 +01:00
william-andre c45998c836 [FIX] account: unique constraint in sequence mixin
Change the way the uniqueness of the sequence numbers is ensured.
Instead of using a `SELECT FOR UPDATE` approach inspired from the
`ir.sequence`, or even a true UPDATE, we can use a constraint approach.

SELECT FOR UPDATE
=================

By doing a FOR UPDATE NO WAIT, we are throwing an exception when another
transaction is creating a move using the same sequence as this one, by
locking the row that holds the current greatest sequence.
Since the row doesn't change, the lock is released and the following
UPDATE is allowed. Because of this, a "useless" UPDATE was always done
on the previous row to ensure a SerializationFailureError if two
concurrent transactions were trying to assign the same number.
This means that in a database with a lot of concurrent transactions
(typically with an online shop), many transactions were
aborted/rollbacked.
This approach also has the drawback of having the constraint implemented
python side, which is less robust.

UNIQUE CONSTRAINT
=================

Using a constraint on the database level means that the database knows
when some transactions will try to do something similar. It will
therefore make the concurrent transactions wait instead of aborting the
transaction.
It is however harder to have the constraint customized by different
modules/localization because it is now done directly in the database and
not in python. Changing the constraint means deleting/recreating the
index. For now, this only happens for Latin America l10n, so a simple
hardcoded approach is implemented.
In order to achieve this, the business code is trying to use the
sequence incrementally until it gets a number it can use for when
multiple transactions are concurrent.

closes odoo/odoo#106325

X-original-commit: 4b430f8e30efb15f06982e4673cd73531a2119b3
Related: odoo/enterprise#34297
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-23 16:14:45 +01:00
william-andre 15beec2324 [FIX] account: locking in partner customer/supplier rank update
2 fixes are made:
* We use a FOR NO KEY UPDATE instead of FOR UPDATE because we don't want
  to prevent the insertion of lines referencing the partner as a foreign
  key (i.e. new invoices).
  The data is purely informative and the exact value isn't too important
  anyways.
* We catch SerializationFailure on top of the previously catched
  LockNotAvailable. It can happen in this use case
  - T1 and T2 start
  - T1 acquires the lock and updates
  - T1 commits
  - T2 acquires the lock: it gets it because T1 released it
  - T2 updates: T1 did it as well so there is a serialization failure.

X-original-commit: b1491b7663e4c6c675e88a172e4b0a812e9b00a3
Part-of: odoo/odoo#106325
2022-11-23 16:14:44 +01:00
william-andre 88879f9f27 [IMP] core: allow to have virtual SQL constraints
Sometimes a constraint is too complex to be expressed in the general
`_sql_contraint`.
This allows to hook on a constraint if it matches the name in order to
display a user friendly error message.

X-original-commit: e1f06479a526c703ccabc441b1e194646206b966
Part-of: odoo/odoo#106325
2022-11-23 16:14:44 +01:00
Ivan Yelizariev 20d4dbca23 [FIX] web: show field domain in debug mode
Field tooltip lacks domain information because of a small mistake in
`getTooltipInfo` function.

To reproduce: open a form in debug mode and hover any many2one field that has
domain in its configuration. Example: ``hr.expense:sale_order_id``

opw-3049554

closes odoo/odoo#106225

X-original-commit: c2663c0493f8330041ba426ce233a2a73fda048a
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-11-23 16:14:39 +01:00
Rohitkumar (roku) 095efcd65c [IMP] project,sale,hr(_timesheet): improve the UX for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - rename 'total hours' into 'total hours spent' (or 'total days spent' if the
   timesheet encoding  unit is in days) for project.task
 - timesheets (billed on timesheets) section > group the graph view by
   invoice > employee
 - add default action project update > profitability> timesheets
   (billed on timesheets) section > group the grid view by
   invoice > employee (display sections)
 - add default  the 'timesheet costs' measure in pivot view
 - display 'hours remaining' in red if the number is negative for project.task
   form view
 - display the 'week' scale by default in the grid view

task-2819458

closes odoo/odoo#90270

Related: odoo/enterprise#26795
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 15:13:50 +01:00
Joseph Caburnay ac2074bd1a [FIX] web: update records of the current page when deleting
**Issue:**

When at the first page of the list, and the user deleted all/or some
of the records, the next page is not automatically displayed.

**Solution:**

This is because the first page (offset=0) is exempted from offset
adjustment (_adjustOffset) which is responsible in reloading the
records in the list.

In this commit, we propose to reload the list if the call to
`_adjustOffset` didn't call `load` and there are actually deleted
records.

closes odoo/odoo#106317

X-original-commit: 2863978041d2856644da938ced9eedc640b8f198
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-23 13:25:03 +01:00
Joseph Caburnay d9fafdd08e [FIX] web: should update group count when deleting records
**Issue:**

- Open a list view and group the records. Notice the count per group.
- BUG: When deleting a record under a group, the count in the group
  is not updated.

**Solution:**

When calling `deleteRecords` in the `DynamicGroupList`, we call
`deleteRecords` on each group's `list`. This "list" can be
`DynamicGroupList` or `DynamicRecordsList`. Regardless which instance
calls the `deleteRecords` method, we should take the number of the
deleted records and subtract it from the group's current count.

If it turned out that the calling object is a `DynamicGroupList`,
we should make sure that it returns the ids of the deleted records
so that the parent group can update its count as well, that's why
we are collecting the deleted record ids.

It's not so easy to follow but we can roughly imagine the structure
this way:

DynamicGroupList
-> DynamicGroupList[]
   -> DynamicRecordsList[]

Deleting items from the inner dynamic records list should result to
update of the parent group list, and eventually, to the update of the
root group list.

X-original-commit: 865c1b37f7986f00b85c9e8135e46cc4b2ac70da
Part-of: odoo/odoo#106317
2022-11-23 13:25:02 +01:00
Renaud Thiry 629b904f32 [FIX] mail: focus on search bar after load
The logic to set the focus on the emoji search bar was only triggered
the first time any emoji picker was opened.

This makes sure the focus is processed every time a picker is opened.

task - 3035021

closes odoo/odoo#106315

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-23 13:24:56 +01:00
Paolo Gatti 459684e2a1 [FIX] l10n_it_edi: Non EU VAT fix
Non EU vendor bills are sent to the Tax Agency as self-invoices,
so the partner actually is the seller, but the same checks on the
VAT must apply as it was the buyer.

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

closes odoo/odoo#106312

X-original-commit: 8c18b870ecc04314380fcdb6b61179de78e28703
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-11-23 13:24:54 +01:00
Bruno BoiandLuis González 29ca002ee5 [FIX] web: menus missing aria attributes
Some missing aria attributes from 14.0 are reintroduced.

They are required for screen reader users to be able to know if menus
are opened and if menuitems are checked (e.g. if a filter is applied).

closes odoo/odoo#106277

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Luis González <lgonzalez@vauxoo.com>
2022-11-23 13:24:51 +01:00
Bruno BoiandLuis González 192e80c03e [FIX] web: dropdown unusable by screen readers
Dropdown menus/items were refactored and moved to OWL when migrating to
15.0. Now, the focus is always on the dropdown button, which captures
and handles all keyboard events, to be able to move over the menus.
Currently-selected item is highlighted by toggling classes.

However, since the focus is always on the dropdown button, screen
reader users are  no longer able to know what menu item is being
selected, as it's only a visual change (in previous versions, the focus
actually moved to the selected element).

The above is fixed by making the activeElement follow the visual change.

Part-of: odoo/odoo#106277
Co-authored-by: Luis González <lgonzalez@vauxoo.com>
2022-11-23 13:24:51 +01:00
Kartik Chavda 279856fb49 [FIX] project: fix layout of project share wizard
This commit fix layout of project sharing wizard.

task-3032518

closes odoo/odoo#104728

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 13:24:48 +01:00
Viktors Lipskis (vili) cdbc1b9a3b [FIX] hr: fix send access link
Detailed Reason field in hr_departure_wizard view is now wrapped in a group for better organization.

task-3002105

closes odoo/odoo#106304

X-original-commit: 824f62c59fd4408b1460826c2b0f0732bd10c2fd
Related: odoo/enterprise#34282
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-23 12:24:45 +01:00
Louis Wicket (wil) 1cd529c43f [FIX] mail: fallback extension to mp3 when ogg fails to be played
closes odoo/odoo#106106

X-original-commit: 2a6e113eca016489e8ededcb8ba6a47d093c4b27
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-11-23 12:24:43 +01:00
Thomas Lefebvre (thle) 9aa1cb261b [FIX] payment: don't reconcile validation transactions
Steps to reproduce:
    - install the "Subscriptions" module;
    - create a subscription;
    - got to the portal of the customer of the subscription;
    - click on the "Set/Manage Payment Method" buton;
    - add a new payment method.

Issue:
    An invoice is generated and therefore the next invoice date is incremented.

Cause:
    We do not check the type of operation when we finalize the payment process.
    And so a subscription renewal invoice is created.

Solution:
    Transactions with "operation" which is equal to "validation" are for tokenizer only (without payment).
    If "operation" is equal to "online_token", it is a payement which must be invoiced.
    Detect payment token change, if this is the case to not generate an invoice.

opw-3061621

closes odoo/odoo#106300

X-original-commit: 29bfe42904af485614ef8546490dc2ed31ecc785
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-11-23 11:26:33 +01:00
Adrien Widart (awt) e762362ef0 [FIX] core: find currency when writing monetary field
When creating a record, if a value is related to a monetary field and if
the currency field is a non-stored related one, the value will not be
rounding: when writing the monetary value in the database, we first call
`convert_to_column`. In the parameter, `record` is empty (it is not yet
created) and `values` only contains the stored values (so the currency
value is not present). As a result, `currency` will not be defined and
the value will not be rounded.

OPW-2955202

closes odoo/odoo#106283

X-original-commit: 28196693b50b9d424887391ad13db69c5f5dfe4f
Related: odoo/enterprise#34265
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-11-23 11:26:28 +01:00
abd-msyukyu-odoo 51b5ee8d5f [FIX] web_editor, knowledge: prevent modification of data-oe-protected
Change class="oe-blackbox" to data-oe-protected="true" (same purpose), because
the name was decided in a rush before 16.0

When the editor history management and sanitization (sanitize.js) handle nodes
of an embedded view, OWL can become corrupted, which will lead to a traceback.

This commit uses the attribute data-oe-protected="true" to prevent
historyRollbacks or sanitization, and ensure that protected elements children
are removed during the cleanForSave operation.

The collaborative DOMPurify sanitization is untouched, for security reasons. To
properly use `data-oe-protected` in collaborative mode, a more complex
mechanism should be put in place to ensure that the protected element children
are properly reconstructed for each client, and that it is not part of the
collaboration. (i.e.: embedded view in knowledge do not support the
collaborative mode currently).

This commit also blocks the selection handling in tables which would be in a
data-oe-protected="true" node.

Task-3012552

closes odoo/odoo#106255

X-original-commit: 394e4fe567bb2eecbd0865de82914aa7396fde63
Related: odoo/enterprise#34245
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Signed-off-by: Abeloos Damien (abd) <abd@odoo.com>
2022-11-23 11:26:12 +01:00
Adrien Widart (awt) 99c3e750c3 [FIX] mrp: check SN uniqueness on WO
When marking a WO as done, if the serial number defined is related to an
unbuilt product, an error will be raised and the user will not be able
to mark the WO as done

To reproduce the issue:
1. Create a BoM for product P with one operation
    - P is tracked by SN
2. Produce one P with serial S
3. Unbuild it
4. Create and confirm a second MO with 1 x P
5. Start the WO
6. On tablet view, set the finished lot to S
7. Mark the WO as done

Error: a UserError is raised because "This serial number [...] has
already been produced". However, this serial number has been unbuilt so
the worker should be able to use it again

When marking the WO as done, we check the uniqueness of the defined
serial number. But:
- The check is not accurate enough, hence the above error
- The lot of the WO is a computed/inverse field based on lot of the MO
- Once the WO closed, we can still change the lot of the MO
- When marking the MO as done, a better method checks the SN uniqueness
(does not fail in the above case)

Therefore, the checking on WO side is useless. We should let the MO side
handle this.

Moreover, let's say that there is already one P in stock with serial S2.
On tablet view, if the worker set the lot to S2, there should be a
warning so he can be aware of the situation. This is already the case on
MO side:
https://github.com/odoo/odoo/blob/45e37b2ad7bdcfd9f9f7e1dabbd0a99c9a0b5cdc/addons/mrp/models/mrp_production.py#L694-L705

(This commit is linked to a similar commit OE side, same opw)

OPW-3002424

closes odoo/odoo#106152

X-original-commit: 60a4c37c781ceb20123cb99603ddd2890b1c806c
Related: odoo/enterprise#34183
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-11-23 11:26:06 +01:00
65dd6e2f78 [FIX] web: calendar filter autocomplete issues
**Before this commit**
Various issues are present in the calendar filter autocomplete:
- typing a character in the input would close the autocomplete dropdown
- search for a term yielding to no results would not display the
  "No records" entry
- click on the "Search more..." entry yields to a validation error
  message: "a mandatory field is not set". [1]

**After this commit**
The FilterAutoComplete component has been removed as it was useless.
It was a kind of higher order component trying to manage the
AutoComplete component's input state, leading to unwanted complexity.

We decided to remove this component despite being in a stable branch
for the following reasons:
- it was not exported and only used by the CalendarFilterPanel
- it brought unnecessary complexity
- it was not working properly
- the branch is still a bit young
- the diff in the CalendarFilterPanel template is minimal

Now that the CalendarFilterPanel directly make use of the
AutoComplete component, the first listed issue has been solved.
The two other issues were simple fixes addressed in the mean time.

[1] this issue comes from opw-3031045, more infos below:
Steps to reproduce:
- Go to calendar basic view
- Click on "+ Add attendees" and then on "Search more ..."

Current behavior:
Validation error on partner_id in calendar_filter create

Expected behavior:
You can look for a partner with advanced research options

Explanation:
The code treated the "Search more ..." option like a partner
option instead off calling the onSearchMore method that creates
the advanced research dialogue.

opw-3031045

closes odoo/odoo#106292

X-original-commit: 73af1d04d9d49eace16e3f88c32ce5d457b44b83
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Martin Fockedey <mafo@odoo.com>
Co-authored-by: Hubert Van de Walle <huvw@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2022-11-23 09:24:03 +01:00
Claire Bretton (clbr) a963ea8a02 [FIX] account: fix dashboard graphs alignment
Graphs were not aligned depending on data. They will now stick to bottom of the card and fill consistently the space above.

closes odoo/odoo#106276

Task: 3071124
X-original-commit: f39904cbe8db3a4788b6771e2f4591d94dd38363
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-11-23 07:22:42 +01:00
fkramer c67bbb044e [CLA] Updating CLA initos.md
closes odoo/odoo#106282

X-original-commit: b09b8ef9cc5106f3dbfd2cb1f29a4b2594f4a01e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-22 19:10:06 +01:00
momegahed 7171d60e44 [FIX] l10n_ch: QR-Invoice don't work for LI customers
Issue :
- Liechtenstein adapted the same QR-Invoice as Switzerland.
However, Odoo only allows the issuance of QR-Invoices to
swiss customers

https://www.llb.li/en/private/paying-and-saving/payment-services/qr-bill#:~:text=Standing%20orders%20based%20on%20orange%20payment%20slips%20can%20no%20longer%20be%20processed%20after%2030%20September%202022.%20Therefore%2C%20these%20standing%20orders%20need%20to%20be%20newly%20set%20up%20on%20the%20basis%20of%20QR%20bills.

Fix:
- Allow LI users to be issued QR-Invoices

OPW-2977644

closes odoo/odoo#106239

X-original-commit: 634c7bbe687c850b23e811b4b7e7b7da77313d99
Related: odoo/enterprise#34234
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-11-22 19:09:57 +01:00
Thomas Lefebvre (thle) a64bd4ba52 [FIX] base: add ir_config_parameter with default value
Steps to reproduce:
    - install sale_management module;
    - go to settings of sale_management and check "Automatic invoice" parameter;
    - in debug mode, we can see the template selected (do not change it);
    - save the settings;
    (This is just one example)

Issue:
    The parameter is not added to the "ir_config_parameter" table.

Cause:
    The improvement which consists in comparing the settings which one wishes to record with those which already exist in order to set the parameters which are different creates a problem.
    Indeed, the current settings are retrieved directly from the model with their default value if there is one.
    These are the values that will be used for the comparison.
    Because of this, when we want to save a parameter which is set to its default value (on first save), the logic will not notice a difference.
    Therefore, the parameter will not be saved in the "ir_config_parameter" table.

Consequence:
    In the code, when we wanted to look up the value of a parameter, if it is not saved, we use its default value instead of saving it with its default value.
    Example:
    ```
    field_example = fields.Integer(string='Example', default=1000, config_parameter='model.field_example')
    value_field_example = params.get_param('model.field_example', default=1000)

    ```
    The default value is repeated.

Solution:
    To know whether or not we add a new parameter in the "ir_config_parameter" table, we must look at what already exists in the table and not in the settings defined in the model.

opw-3057306

closes odoo/odoo#106188

X-original-commit: d881dfaaa163b409a94494e35afa2cbda7cf2aa2
Related: odoo/enterprise#34258
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-22 19:09:55 +01:00
Dossogne Bertrand 2415338d46 [IMP] hr_contract: remove unused code
In the hr_contract_history list view, some owl code was set to
allow employee creation from that view. Since the create button
has been removed, that code was unused.

closes odoo/odoo#106264

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-22 18:12:31 +01:00