Commit Graph
152817 Commits
Author SHA1 Message Date
Adrien Dieudonné a8312703f6 [REF] barcodes: simplify isSpecialKey method
Note that more 'non printable keys' are escaped now, like 'Home'.
This seems like a bit naive solution but it avoids having to list
every key.
The only issue we might have is if a device sends the whole value in the
'key' property directly without sending sequentially several keydown events.

As a reminder, 'ctrlKey', 'metaKey', 'altKey' properties are used
because we also want to ignore keys pressed while this modifier is
active. For example, if you press CTRL+e, we want to ignore 'CTRL'
AND 'e'.

Useful references:
https://w3c.github.io/uievents/tools/key-event-viewer.html

Part-of: odoo/odoo#93387
2022-07-04 14:07:27 +02:00
Adrien Dieudonné f7ff35dad0 [FIX] barcodes: Allows 'tab' as end character
Before this commit 'tab' was escaped because isSpecialKey was true.
This was strange because this key was defined in 'endRegexp'.

So, there were only 'enter' key who worked as a barcode end key.
Note that it wasn't a big deal if 'tab' was used because checkBarcode
was executed anyway after a timeout.

Now the barcode value is directly checked if the strind ends with
'enter' or 'tab' (by-passing this timeout).

Part-of: odoo/odoo#93387
2022-07-04 14:07:27 +02:00
Adrien Dieudonné d621d15d22 [REF] barcodes: removes blur functions
As we now use 'inputmode=none' on the barcode field, the mobile virtual
keyboard doesn't open anymore. So, there is no need
to have to blur barcode input after receiving a value.

There is no issue to keep the focus on this field. We only did it
to close the virtual keyboard as soon as they pop up after each scan.

Part-of: odoo/odoo#93387
2022-07-04 14:07:27 +02:00
Géry Debongnie 325afc5bc6 [IMP] barcode: introduce barcode handler service
This provides a simple way to react to some specific scans.  This commit
implements one handler for 'O-BTN' scans

Part-of: odoo/odoo#93387
2022-07-04 14:07:26 +02:00
Géry Debongnie 5f15909c8a [REF] barcodes: remove dead code
Part-of: odoo/odoo#93387
2022-07-04 14:07:26 +02:00
Géry Debongnie 2dd2f97de3 [REF] barcodes: introduce barcode_service
And remove most of barcode_events. The goal is to have a service that
can be used by components to reliably detect a barcode action. For now,
we keep barcode_events around, but the goal is to completely remove it
as soon as all the code using it is updated

Part-of: odoo/odoo#93387
2022-07-04 14:07:26 +02:00
Géry Debongnie 4aa1643cc4 [REF] barcodes: simplify and improve barcode implementation
- use keydown events all the time
- remove dead code
- simplify implementation

Part-of: odoo/odoo#93387
2022-07-04 14:07:26 +02:00
Thibault Delavallée ccf9a5aa9f [FIX] mail: help user using scheduled date field on mail
Followup of odoo/odoo@582ac8d9a9

Task-2860761

closes odoo/odoo#95143

X-original-commit: d95b19e2481e13fa159ebce0f1cc35175adecd4d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-04 10:19:42 +02:00
Renaud Thiry 9eb8e52fdc [IMP] mail: Remove "duplicate" from notification form view
(To be commited with  [#94024](https://github.com/odoo/odoo/pull/94024))

Duplicating an email sent from Odoo would raise an error because some required fields could not be set.
Setting those fields on duplication does not make sense, duplication is to be disabled on e-mails.

As this applies to some messages and no use-case could be found for the duplication of messages or notifications,
both also had duplication disabled.

Task-2857244

closes odoo/odoo#95138

X-original-commit: 6f9656fc4ceeecd304f600b7cd65d649618ad182
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-04 10:19:39 +02:00
luvi 1c0c7a30f2 [FIX] web: ProgressBarField behavior and edition in kanban
This commit fixes some inconsistencies of the progressbar
field widget since it was converted to Owl. Some behaviors
were wrongly adapted and edition was not enabled in kanban
views. It was also missing an option to allow editing the
field value in readonly mode.

closes odoo/odoo#95033

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-04 10:19:36 +02:00
Ayoub Amzil c9e43c7bff [FIX] account: wrong currency separator in the tax field
The issue:
1.) Switch to German language (or any language that uses , versus . as a point separator
2.) Create a vendor bill
3.) Add items
4.) Click on the pencil/edit icon next to the tax field (below subtotal)
5.) Separator used is . instead of ,

The fix:
the field will use the right separator depending on the currency.

closes odoo/odoo#95147

X-original-commit: 3cca50bfca14f3748d16c43c25119dbe90972f7f
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-07-04 08:35:47 +02:00
Víctor Martínez 662a5c0ba9 [FIX] account_edi_ubl_cii: Prevent error when zip is not set (since https://github.com/odoo/odoo/commit/b467c2c6536d291ac9b4d426f964fb1d9e309e3f).
TT36147

closes odoo/odoo#95139

X-original-commit: b84d61bcf6755e02fd567e4698bda488211ca2eb
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-07-04 07:27:55 +02:00
dbkosky 4964e9df7d [FIX] l10n_it_edi: <ImportoTotaleDocumento> field
The total value of the invoice can be reported in the edi using the
field <ImportoTotaleDocumento>. This commit uses the amount_total of the
invoice to occupy this field.

Adapt the l10n_it_edi_sdicoop tests to include this field in the
expected xml.

closes odoo/odoo#95175

Task-id: 2894623
X-original-commit: 2e0c6def4d9be3b73e874304813ed3bb685ade95
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-07-04 01:16:44 +02:00
Nasreddin Boulif (bon) 8bd265aca3 [FIX] website_sale: fix website_sale test_customize tests
Cause:

  The tests fails because the expected price is not the right one.
  It is because that when installing the l10n module, it changed
  the current company currency (if no localisation set) but not the
  pricelist.

Solution:

  For the tests, change pricelist currency of the main website
  with company currency.

opw-2899730

closes odoo/odoo#95080

X-original-commit: ddc802dc3be5e02166ffefe917ebaa3cfdd02e8d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-02 21:07:47 +02:00
Christophe Simonis d8db282e97 [FIX] core: fix deprecated uses of collections.<ABC>
Leftovers of previous fixes of this issue.

closes odoo/odoo#95162

X-original-commit: dffc184862018670008ff4da839fc520a72bddca
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-07-02 19:37:13 +02:00
alt-odoo 919dfca455 [IMP] l10n_es_edi_sii: clearer missing element TipoDesglose error
When sending an invoice to the SII edi, the field TipoDesglose is
required. In case we have a foreign customer outside of Spain, we are
filtering the taxes information based on the tax scope (services or
goods). In case the tax scope is not filled in, TipoDesglose is not
provided and this will cause the request to fail, with no clear reason
for the user. We should add an UserError message to make it clear enough
so the user can fix it himself.

closes odoo/odoo#95164

X-original-commit: 7a6b3544d7c3a855489a0d5f7075691e25264e2d
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-07-02 18:34:49 +02:00
Nicolas Bayet ac0cb67f36 [FIX] web_editor: transform space to nbsp when deleterange
Before this commit
When removing the last word of an html container, the last space was
not transformed into an `nbsp`. This caused google chrome to not
render the space.

Task-2809312

closes odoo/odoo#95124

X-original-commit: cd4f1c4bce66817640eea20f0b297095d48ea647
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-02 11:41:21 +02:00
Carlos Valverde 6bef82db98 [REM] web: o_kanban_counter_label dead code removal
This commit removes the css class `.o_kanban_counter_label` which is no
longer being used in Odoo.

The class above is supposed to add styles to text labels inside progress
bars in kanban view mode. However, this feature is no longer used, since
contextual information is already given either by tooltips
(`progress-bar o_bar_has_records`) or by text on a side
(`o_kanban_counter_side`).

Task-2898427

closes odoo/odoo#94884

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-01 22:18:50 +02:00
lejeune quentin d3592fd816 [FIX] pos_adyen: Remove the diagnosis from the polling
Actually we send request to check if the terminal is available when we poll
the status of a payment.

We remove it and need check the availablity before we start the session

closes odoo/odoo#95102

X-original-commit: 215c8fc7cebdb566a008bf2badb6a934af84150a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-07-01 20:41:50 +02:00
Sébastien Theys 0bf3a1dac3 [IMP] mail: move attachment viewer widget to community
This will allow to reduce overrides in enterprise, and we want to display the
feature in community soon as well.

Part of task-2871070

closes odoo/odoo#95085

Related: odoo/enterprise#29036
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 20:41:40 +02:00
Sébastien Theys d32865aa91 [IMP] mail: introduce messaging variable in form renderer code
It is used in enterprise to further clean up the code.

Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:40 +02:00
Sébastien Theys 3e33deb48f [IMP] mail: move hasAttachmentViewerFeature in community
Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:40 +02:00
Sébastien Theys f085040dfa [IMP] mail: remove jquery from form renderer
Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:40 +02:00
Sébastien Theys 779175fd42 [IMP] mail: move hasAttachmentViewer in community
This reduces the need for overrides in enterprise.

Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:40 +02:00
Sébastien Theys 8bb675ffa5 [IMP] mail: better documentation for __renderView override
Part of task-2871070

Part-of: odoo/odoo#95085
2022-07-01 20:41:39 +02:00
Valentin Chevalierandxlu-odoo 2d81dffd23 [IMP] payment_test: support all additional features
After the payment apocalypse, `payment_test` was cleaned and stripped of
all useless parts. It was a very basic testing acquirer that allowed to
enter fake arbitrary payment details, choose whether they should be
tokenized, and then pay. It was intended to test the payment flow of
various applications (Sales, Subscriptions, Invoicing, ...) for a single
scenario: successful payments with immediate capture.

In order to extensively test an app's payment flow (explore other
scenarios), we need `payment_test` to have additional features.

Now, `payment_test` will allow profound testing of these features:
- separate authorization and capture
- customer fees computation
- tokenization
- refunds
- on the /pay page, users will be able to select the status of the
  payment
- on the payment transaction form view, users can change the status of
  a payment 'pending' to either succeed or fail
- on the payment token form view, users can change the state of future
  transactions made with that token

task-2512196

closes odoo/odoo#78083

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: xlu-odoo <xlu@odoo.com>
2022-07-01 19:37:10 +02:00
william 3262adf566 [FIX] tests: look for google-chrome-stable executable
On archlinux, when installing the AUR package [1] through yay, the
executable name is `google-chrome-stable`

[1]: https://aur.archlinux.org/packages/google-chrome

closes odoo/odoo#95093

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-07-01 17:48:27 +02:00
Adrien Widart 9da9ad2a80 [FIX] mrp: replan workorders
In some cases, replanning a work order does not change anything.

To reproduce the issue:
(Use demo data):
1. In Settings, enable "Work Orders"
2. Create two manufacturing orders (MO01, MO02) with 1 x [FURN_8522]
Table Top
3. Confirm MO01 and MO02
4. Set the same Scheduled Start Date (SSD) on the WO of each MO
    - A warning should be displayed on the work order line because of
the conflict
5. Open the warning and click on "Replan"

Error: Nothing happens, the warning is still displayed and the scheduled
start date does not change.

For the warning symbol to be displayed, we check (through
`_compute_json_popover`) if two work orders are in conflict:
https://github.com/odoo/odoo/blob/8cb5aad6126e3f63ee4ef91115c8b4a6be571828/addons/mrp/models/mrp_workorder.py#L719-L722
So, we base this information on the `mrp.workorder`

However, the planning logic is based on another model:
`resource.calendar.leaves`. When planning a WO, we create a
`resource.calendar.leaves` and we link this slot to the WO thanks to the
field `leave_id`:
https://github.com/odoo/odoo/blob/4870606b00a758e63713e6e82c0cba9b1e7dd4aa/addons/mrp/models/mrp_production.py#L1238-L1248
Therefore, when replanning a WO, we ensure that the new slot does not
overlap any existing slot in the same workcenter. But, here is the
issue: when writing the start date (step 4), we try to replan the WO of
the MO only if this MO is already planned:
https://github.com/odoo/odoo/blob/4870606b00a758e63713e6e82c0cba9b1e7dd4aa/addons/mrp/models/mrp_production.py#L723-L724
Wich is not the case in the above steps. So, we don't (re)plan anything
=> we don't create any slot.

As a result: the warnings are displayed, which is correct, but when
trying to replan one of the WO (step 5, viathanks to
`_plan_workorders`): There isn't any slot starting from WO's start date
(there isn't any slot at all!), so we can create a new slot -> the start
time of the WO does not change -> considering their start times, there
is still a conflict between both WOs.

Comment: if after the step 5, the user tries to replan the other WO, it
will work: the first replanning fails but a slot has still been created.
Therefore, when replanning the second WO, the newly-created slot will be
detected, a second slot will be created after the first one and the
start date of the second WO will be postpone (according to the second
slot).

(!) Note that nothing creates any slot if we directly define the start
time of the WO during the MO creation (step 2). So this use case will
fail too.

We should ensure a perfect coherence between both models
`resource.calendar.leaves` and `mrp.workorder`.

OPW-2887413

closes odoo/odoo#95087

X-original-commit: 9d4d8d24792933e53a4ca422ccedde8ddc93cdf4
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-07-01 17:48:23 +02:00
Adrien Widart 019f96559f [FIX] stock: prevent edit mode when resolving WO conflicts
To reproduce the issue:
(Install mrp)
1. Create a conflict between two work orders
2. Open one MO > Work Orders, click on the danger symbol

Error: The form has switched into edit mode

In case of a 2many field, if one of the inner fields has the class
`o_widget`, the quick edit feature is disabled for that inner field:
https://github.com/odoo/odoo/blob/7ad3c62b60965139fab06227cb4e941720fed8c2/addons/web/static/src/legacy/js/fields/relational_fields.js#L1121-L1125
This class is automatically added on JS-side, during the rendering
thanks to `_renderWidget`:
https://github.com/odoo/odoo/blob/80acf449bcaf5ff3d2ba81d84efc0498bc78c533/addons/web/static/src/legacy/js/views/basic/basic_renderer.js#L842
However, in the above case, because this is a widget defined explicitly
on the field:
https://github.com/odoo/odoo/blob/5682015958d03f4a65969afe3fce9b9b05e5b505/addons/mrp/views/mrp_workorder_views.xml#L101
It leads to `_renderFieldWidget` which does not automatically add the
class `o_widget`
https://github.com/odoo/odoo/blob/80acf449bcaf5ff3d2ba81d84efc0498bc78c533/addons/web/static/src/legacy/js/views/basic/basic_renderer.js#L726

OPW-2887413

X-original-commit: b7225f415a545e7fd204a7ab4d1114ac680aeea1
Part-of: odoo/odoo#95087
2022-07-01 17:48:23 +02:00
Fabio Barbero 9f39ca12ae [FIX] knowledge: fix resequencing articles
Purpose
=======

Properly display and resequence articles based on sequence field. Articles are
currently not sorted based on sequence, and when moving articles outside of a
parent resequencing is not applied.

Specifications
==============

Properly resequence articles not only if the parent_id value is non-false but
also if it's in the vals and set to False (when moving an article to the root).

Task-2883368

closes odoo/odoo#95078

X-original-commit: 6dde05e8779feb2ad6f8828e1bc2945fcf403248
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-01 17:48:19 +02:00
Pierre Verkest ee689a5945 [FIX] base: discard clear_cache on method res_users.has_group
Overriding method has_group() in some extension of model 'res.users' is
not possible because of code invoking model.has_group.clear_cache().

As clear_cache() is no longer invoked on ormcached methods, we can
simply replace the code by a global cache invalidation.  In this case,
it is not even necessary, since method call_cache_clearing_methods()
does it already.

closes odoo/odoo#95071

X-original-commit: 2dc80fe49ec2cb11e65465d4616b9bbb136bf6ab
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-07-01 17:48:13 +02:00
Pierre Verkest 3cd17a735b [CLA] Pierre Verkest
X-original-commit: 0e44329880e85fe134b000073ab9d3220d17f1c3
Part-of: odoo/odoo#95071
2022-07-01 17:48:13 +02:00
pedrambiria ae28f02912 [FIX] point_of_sale: wrong fixed taxes sign for zero amount products
Before this commit: If a fixed tax is used for a product with the price
of zero, the tax line sign would be positive and lead to an unbalanced
move. The solution is to use its sign in its context for correct
calculation.
Also, in the PoS front-end, when you want to return a zero amount
product with a fixed tax, its sign would be positive, which is
incorrect.

Steps to reproduce the first issue:

	- Install 'Point of Sale' module
	- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
	- Create a new 'Product' with zero Sales Price
	- Create a PoS session
	- Add the product to the order
	- Close the session

	It creates a line for the "Difference at closing PoS session," and
doesn't prevent closing. But the problem is that the tax capture as
debit is incorrect. The tax for the invoice must be credit.

Steps to reproduce the second issue:

	- Install 'Point of Sale' module
	- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
	- Create a new 'Product' with zero Sales Price
	- Create a PoS session
	- Add the product to the order
	- Change the quantity to -1 (refund)

	The final amount is positive, while it should be negative.

Solution

	The sign must be sent in the context, and for the PoS front-end, it
should consider zero amount cases.

opw-2833590

closes odoo/odoo#95067

X-original-commit: c5fb4f778db95fb33845b9a5e0c2190d4d9037ee
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-07-01 17:48:08 +02:00
Umesh Gupta 651af6292c [FIX] survey: fix survey live session traceback
Currently, in demo data (or data) of some surveys, there are records of
'survey.question' having 'is_page' field value as true and 'question_type'
is not defined. When question type is not defined, default value
'simple_choice' is assigned to the 'question_type' field. Now when we
create a live session of that survey and goes to the page, it tries to read
the data for bar chart but data is not available (undefined) and throws the
traceback. This happens  because question types 'simple_choice' and
'multiple_choice') are expected to load a bar chart.

It used to work before commit[1] where default 'question_type' value was
being set to 'text_box' (so attempt to load bar chart was not made).

As a safest fix in stable, this commit adds condition in JS and in template
to make sure that bar chart will be instantiated only if the data needed by
(checked with JS) and when the question is not a 'page' (checked with
template).

commit[1] - https://github.com/odoo/odoo/commit/1fb99d7#diff-cf2aadbf6a252dfca6d3450a0ce6ad280b1924afe9a8fc22f7077c998d080009R52

taskID-2841582

closes odoo/odoo#95055

X-original-commit: d7c485e0b0791b6d3d127fedf867b9664df05463
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-01 17:48:05 +02:00
Kevin Baptiste eb09a8dae4 [FIX] hr_recruitment_skills: remove unexisting js_class
The populate JS class has been removed in #94554 but was still
referenced in the view.

closes odoo/odoo#95050

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-01 17:47:59 +02:00
Arthur Detroux (ard) 67ccc08b6e [FIX] website: (re)properly stop widgets before when removing snippet
Commit [1] introduced an event that stops the public widgets of a
snippet prior to removing it from the DOM.
Commit [2] moved the edition to the backend and forgot to bind that
event to the website_root.

This commit fixes that by binding the `will_remove_snippet` event to the
`_onRootEventRequest` method of the `WysiwygAdaptComponent`.

[1]: https://github.com/odoo/odoo/commit/b66409cad4a9a3d040820c3935f9a64b09ba25d3
[2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#95038

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-01 16:36:24 +02:00
Thibault Francois 226df213f2 [FIX] cloc: fix count of studio field + exclude sa
This commit fix 3 problem

Don't count studio field
------------------------

the commit https://github.com/odoo/odoo/commit/75b8c4eb1ed6e44f427886eea06ad216995e16c8
was supposed to stop counting count field generate by addins a smart
button with studio.

It works fine when base import module is not installed which is never
the case.

When base_import_module the field is counted as a field that belong
to a imported module installed : studio_customization

studio_customization should not be counted as an imported module
installed

Count Field with standard xml_id
--------------------------------

With https://github.com/odoo/odoo/commit/9afce4805fc8bac45fdba817488aa867fddff69b
Each manual can end up with an xml_id from a standard module:
the original module of the model

A standard module should never create a manual field so we can consider
they should be counted unless they match the criteria of the first
problem

If a field has a standard module xml_id and no other the module
should be odoo/studio and not the name of the standard module

Make possible to exclude some db record from cloc
-------------------------------------------------
It's possible to exclude some file in python module
but it's not possible to exclude some field or SA in
the database from the count

Make it possible if they are link to an xml_id
from the module __cloc_exclude__

The exclude record will be shown in cloc report with
the verbose mode

closes odoo/odoo#95028

X-original-commit: db52fb174461107e26b066147801f54a89d0dbf9
Related: odoo/enterprise#29007
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-07-01 16:36:18 +02:00
Andrea Grazioso (agr-odoo) 5c8441debb [FIX] l10n_id_efaktur: (efaktur 3.2) transaction Code 05
In April 2022 efaktur standard has been updated to version 3.2
Transaction code 05 has been introduced
https://atpetsi.or.id/kode-transaksi-05-pada-faktur-pajak-digunakan-untuk-ppn-ini

opw-2830864

closes odoo/odoo#95026

X-original-commit: f65d2b6958b2bc019027d0a1874cec5a9eaa14d8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-07-01 16:36:14 +02:00
Vincent Larcin 70b58228b9 [FIX] project: hide the "Recurrent" option in the form view
Since https://github.com/odoo/odoo/pull/85176, following a conflict resolution in a forward-bot,
the domain used to show the "Recurrent" option in the form view
of tasks is wrong, and the option is shown for all unarchived tasks,
regardless of whether the setting is enabled.

This commit fixes this domain.

closes odoo/odoo#95015

X-original-commit: f26d864da52a3543d9f9733b2833a3210d5449f6
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2022-07-01 16:36:11 +02:00
Kevin Baptiste d40d69c456 [FIX] hr_holidays: fix undeterministic test
The test was randomly failing on nightly builds as the timeoff was
considered as started, thus preventing the user from modifying it.

closes odoo/odoo#95010

X-original-commit: 95f84086d15ed0a139e4e145dc2422a949f1ae95
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-01 16:36:06 +02:00
Joren Van Onder 7a89246e9f [FIX] hr_recruitment: don't send chatter to Recruitment Interviewers
1f7c83cc3e renamed _notify_compute_recipients to
_notify_get_recipients. This function was not renamed with it so
members of the hr_recruitment.group_hr_recruitment_interviewer group
were receiving chatter they shouldn't be receiving.

The test didn't catch this because:

- the interviewer was not subscribed and thus never received email,
- MockEmail._filter_mail got passed status=False instead of None,
  which always made it return an empty mail.mail recordset.

opw-2898730

closes odoo/odoo#95004

X-original-commit: 4dd9d3ee6fb261fd856036ced35bfb15b302b0b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-01 16:36:02 +02:00
Sébastien Theys d5ed1069f0 [IMP] mail: introduce ComposerSuggestable model
This will allow to remove AND/OR mix in identifying fields of composer
suggestion view.

Part of task-2741982

closes odoo/odoo#94999

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:59 +02:00
Julien Mougenot 3a5f94bff5 [FIX] web: Properly support subtemplates in kanban
Before this commit, subtemplates in kanban did not share the same
ViewCompiler instance, thus losing the aggregation of the dropdowns.

Now, a single ViewCompiler is used for each KanbanRecord, properly
taking into account dropdowns declared in subtemplates.

closes odoo/odoo#94977

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-01 16:35:55 +02:00
FrancoisGe 7bbe1f3caf [FIX] web: fix id BooleanToggleField in KanbanView
In the new Kanban view, clicking on a BooleanToggle field (on any card)
always toggles the field of the first card. We would like to toggle the
field of the card that is clicked on.

This is because the same id (fieldName) is used for all Checkbox
in the BooleanToggle. If you click on a label, its native behaviour is
to click on the input with the same id. In our case, this will always
create a click on the first ToggleBoolean (the first card).

The solution is to make the id passed to the field unique. To do this,
we will add the datapointID to it.

Before:
Card 1: id = fieldName
Card 2: id = fieldName

After
Card 1: id = fieldName_datapoint_1
Card 2: id = fieldName_datapoint_2

closes odoo/odoo#94966

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-01 16:35:52 +02:00
Sébastien Theys 7b464a992b [IMP] mail: introduce MessageListViewMessageViewItem
This allows to remove the AND/OR mix from message view identifying fields.

Part of task-2741982

closes odoo/odoo#94948

Related: odoo/enterprise#28988
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:49 +02:00
Sébastien Theys 723cfddf38 [IMP] mail: move messageViews from ThreadView to MessageListView
Part of task-2741982

Part-of: odoo/odoo#94948
2022-07-01 16:35:49 +02:00
abd-msyukyu-odoo dcdc046b03 [IMP] knowledge: clean (demo) data for editor compatibility
Clean (demo-)data to be fully editor-friendly (i.e. use `<p><br><p>` instead of
`<br>` between paragraphs), fix some (grammar) typos.

Task-2893398

closes odoo/odoo#94943

X-original-commit: 87b4bc6d19fef947f7bf5d15835f17b9c2019902
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-01 16:35:41 +02:00
Nicolas Bayet eb9c991c60 [FIX] web_editor: make o_not_editable contenteditable=false
The fix 1b80fe9 removed the behavior that made `.o_not_editable`
`contenteditable=false`. Without this behavior, other issues could
arises.

closes odoo/odoo#94889

X-original-commit: 4e7d6e1a70e44df3476c2602119fbcedc7c04199
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-01 16:35:38 +02:00
Yannick Tivisse 0d4a621e5a [IMP] hr_work_entry: Improve error message to be more user friendly
closes odoo/odoo#94885

X-original-commit: 77c0dc3eb75b568b4e6aab9bc26f6e5b5f0f8d4b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-07-01 16:35:34 +02:00
Yannick Tivisse 4cf496a190 [FIX] hr_work_entry_holidays: Split existing leave when opening a contract
Purpose
=======

Currenlty an error is raise saying that a leave cannot be set accross
overlapping contracts.

But in this special case we could split the time off and allow this simple
action.

Taskid: 2836901
X-original-commit: 1012a7ea8033675b6ebab96922e124b04e5ed884
Part-of: odoo/odoo#94885
2022-07-01 16:35:34 +02:00