Commit Graph
152817 Commits
Author SHA1 Message Date
Alexandre Kühn 12dcc5f46e [FIX] web: deploy services once in frontend
Before this commit, it was possible to deploy services more
than once. This happened in case the root widget was about to
deploy and start the services, and more than one service was
registering itself during a next tick.

Services must be deployed and started only once. This commit
ensures that if many services are added in this scenario, the
services are deployed and started only once.

Part-of: odoo/odoo#92786
2022-06-13 16:51:26 +02:00
Alexandre Kühn 96333be674 [FIX] web: no infinite loop on asset error
This happens when some assets are missing in portal
and dev tools are open. `odoo.debug` is undefined, so
`odoo.debug.includes` crashes, but this LOC is in handler
of a crash, therefore infinite loop.

Part-of: odoo/odoo#92786
2022-06-13 16:51:26 +02:00
Audric Onockx (auon) 439836ba63 [IMP] sale_{project,timesheet} : format hours and differenciate sol
With this improvement,
* in the Project Updates kanban/tree side pannel :
	> Hours are displayed 'HH:mm Hours'
* in the Project Updates form description :
	> idem
	> Sales Order Items with the same products also display their
price to differentiate them.

task-2841685

closes odoo/odoo#90624

Related: odoo/enterprise#27753
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-13 16:51:17 +02:00
Krina Oza cc8fe32512 [IMP] project,hr,sale(_timesheet): generic improvements
The purpose of this commit, is to make improvements in Project.

In this commit, following changes are made:

-rename 'Duration' to Hours/Days Spent
-rename hours/days to Hours/Days Spent
-add links to Sales Order, Quotation, Ticket and Invoices linked
 the task in left panel
-indicate email of the assignee
-indicate email of the partner
-indicate 'Draft Invoice' instead of '/' for invoices
-display 'remaning hours on SO' value in red if value is less
 than 0

task-2743512

closes odoo/odoo#86422

Related: odoo/enterprise#25280
Related: odoo/upgrade#3406
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-13 16:51:05 +02:00
Julien Castiaux 4960665043 [FIX] web: missing cache of /web/assets
Fine tuning of da8def8e41

closes odoo/odoo#93407

X-original-commit: 7efa8743b1bbe9efc4b81a10331f096e8de1e52d
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-06-13 13:31:47 +02:00
tsm-odoo 5bdf2a4e45 [IMP] mail, web: dont patch window in patchUiSIze
Patching the window object is not robust and can lead to errors.
In order to make patchUiSize more robust, patching of window have
been replaced by a patch of the uiService.

closes odoo/odoo#93355

X-original-commit: 46be08a551ead8d2e0304a753af3d3b13744e6ed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-13 11:33:31 +02:00
Aurélien Warnon a0e9e5670d [FIX] website_event_questions: support searching on attendees answers
Since: a0092d0011

Users can see attendees' selected answers in the registrations list view using
an optional field ("registration_answer_ids").

However, searching on this field is currently not correctly supported as the
"event.registration.answer" model does not implement it (no "_rec_name" and no
"_rec_names_search").

This commit adds a "_rec_names_search" attribute to allow users to search on
both "value_answer_id" and "value_text_box" fields.
This makes it easy to search for all attendees that have filled in a specific
answer, allowing a better organization of the event based on question results.

Task-2868203

closes odoo/odoo#92486

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-13 10:30:35 +02:00
abd-msyukyu-odoo 0fd0987994 [FIX] knowledge: fix move cancel failure in article tree
There was an issue when canceling the move of an article from one section to
another: a previous move which was not canceled could be undone when it should
not have been.

Impacted versions:

  * 15.4+

Steps to reproduce:

  1. Have one article (A) in the "workspace" section and one article (B) in the
     "private" section
  2. move (A) into "private", validate the move in the dialog
  3. move (B) into "workspace", discard the move in the dialog

Current behavior:

  * (A) is displayed as if it is currently in "workspace" but it is in fact
    still in "private"

Expected behavior:

  * (A) and (B) should be displayed in the "private" section

This commit fixes the problem by manually replacing the article whose move was
discarded (B) at its previous position while triggering a "change" event instead
of a "cancel" event.

The bug is caused by an incorrect implementation of the "cancel" handler in
`jquery.mjs.nestedSortable` library. Since this library uses jQuery and it is
discontinued, we should consider to reimplement the feature internally in the
future.

This commit also synchronizes data-attr attributes (parent-id and section) with
the hidden value data('attr') from jQuery for consistency.

Task-2877766

closes odoo/odoo#93244

X-original-commit: 98aaeb32e04f99c06c75166593e3b89c4aa087df
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-13 08:34:59 +02:00
Julien Banken 083e35f570 [FIX] knowledge: make custom emoji picker compatible with new standard templates
The template of the standard emoji picker has recently been updated. This
commit will update the emoji picker of Knowledge to make the custom
component compatible with the new standard templates.

Related: https://github.com/odoo/odoo/commit/9830406020ef1c3b0c57045a6e285a31ebf81143
task-2871883

closes odoo/odoo#93243

X-original-commit: 7f35a0bf19bfe02200244847b09ae43f4bc02494
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-13 08:34:55 +02:00
Goffin Simon 2d717e0bd2 [FIX] tool: Function sleep not available in time library
Since this commit https://github.com/odoo/odoo/commit/06a8c5264eb6e87c29ad1d23a14e12dd45aa281c
the function sleep was not available when executing python code in safe_eval

opw:2858779

closes odoo/odoo#93314

X-original-commit: 7c5d76bc46f1cdad6af9f44a96b192d699a34305
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-06-13 07:36:41 +02:00
Martin Trigaux 52b420febd [I18N] web_editor: translate the editor lib content
The js content of the odoo-editor is located into the
web_editor/static/lib/web-editor directory.
Only the js code located into */static/src/* is considered for export
of translations. This is done to avoid poluting translations for code
not managed by Odoo.

The best solution is to move the odoo-editor code inside static/src
but as a workaround in stable, we can add the terms manually in the
.pot file.
This has the drawback of being lost in the next export of translations
so should be considered as a temporary solution.

Fixes odoo/odoo#93258

closes odoo/odoo#93360

X-original-commit: d2e40ea2b36df8488402ec3401bd1bb3669dc05c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-11 16:12:57 +02:00
Alexandre Kühn e73b89cdb0 [MOV] mail: rename 'MediaPreview' to 'CallDemoView'
Task-2871939

closes odoo/odoo#93330

Related: odoo/enterprise#28274
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-11 02:15:15 +02:00
Alexandre Kühn 751affdb8a [IMP] mail: rename 'MediaPreview' to 'CallDemoView'
Task-2871939

Part-of: odoo/odoo#93330
2022-06-11 02:15:15 +02:00
Alexandre Kühn dcfc8a91e8 [IMP] mail: Introduce view models
This commit moves code from components to models,
by introduce some models and fields.

It also cleans a few things in models, like:
- use Timer model instead of setTimeout
- replace local variables by model fields

Task-2881075

All changes:
- [IMP] mail: remove ChannelMemberListCategoryComponent/channelMemberListView
Task-2831082
- [IMP] mail: introduce ChannelMemberListCategoryView/members
Task-2864112
- [IMP] mail: introduce ChannelMemberListCategoryView/title
Task-2864115
- [IMP] mail: introduce ChannelMemberView
Task-2864119
- [IMP] mail: introduce 'Chatter/attachmentsLoaderTimer'
Task-2868781
- [IMP] mail: introduce 'MessageView/highlightTimer'
Task-2868794
- [IMP] mail: introduce 'CallView/showOverlayTimer'
Task-2868867
- [IMP] mail: introduce RtcSession/broadcastTimer
Task-2868929
- [IMP] mail: introduce CallView/tileContainerRef
Task-2871859
- [IMP] mail: introduce CallView/tileWidth
Task-2871869
- [IMP] mail: introduce CallView/tileHeight
Task-2871878
- [IMP] mail: introduce ChatWindowManager/endGapWidth
Task-2871960
- [IMP] mail: remove unused CallView/columnCount
Task-2871885
- [IMP] mail: introduce ChatWindowManager/hiddenMenuWidth
Task-2871963
- [IMP] mail: introduce CallView/calculateTessellation
Task-2871867
- [IMP] mail: replace model methods of MediaPreview by record methods
Task-2871934
- [IMP] mail: introduce ChatWindowManager/betweenGapWidth
Task-2871956
- [IMP] mail: introduce ChatWindowManager/chatWindowWidth
Task-2871957
- [IMP] mail: introduce ChatWindowManager/startGapWidth
Task-2871965
- [IMP] mail: introduce ChatWindowManager/availableVisibleSlots
Task-2871971
- [IMP] mail: introduce ChatWindowManager/visual/hiddenChatWindowLocalIds
Task-2871980
- [IMP] mail: introduce ChatWindowManager/visual/isHiddenMenuVisible
Task-2871981
- [IMP] mail: introduce ChatWindowManager/visual/hiddenMenuOffset
Task-2871984

Part-of: odoo/odoo#93330
2022-06-11 02:15:15 +02:00
Sébastien Theys eca952307a [FIX] mail: correct unlink in _mockMailThreadMessageUnsubscribe
closes odoo/odoo#93354

X-original-commit: 6bcf70d3f51d66861f5ec2f0e769c14a091e5ddf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-11 01:13:54 +02:00
Julien Castiaux 537f6fae92 [FIX] test_http: unreliable tests
Forward-port of 8f52bdf9f4

closes odoo/odoo#93335

X-original-commit: e766798cb11e4637d9a303c525c78cf8e60f20dd
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-06-11 00:13:03 +02:00
Pierre Masereel e65ddaf2d7 [FIX] point_of_sale: avoid unreserve more than reserved
When you are shipping later from POS and have a multi-step
configuration, you get an error saying that you cannot unreserve more
than what is reserved. It comes form a bad filtered list of move.

Now as we are correctly filtering the move on their product_id it
correctly works.

OPW-2854159

closes odoo/odoo#93336

X-original-commit: 93e0509d0ba7302ecdf5d0f6dbc2dbe90e98229d
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-06-10 20:40:21 +02:00
Thibault Francois a84f6965ee [FIX] project: Fix random access error on task creation with public
Use case:
---------

Create a task with public user

At the end of the transaction sometimes the flush
is done with an env where su is False.

This cause the public user enable to read data needed
for the recomputation of is_closed field which is related_sudo=False

Why is this random ?
--------------------
The flush in transaction select the first env in the set of
env with a user. Since the order in the set is not deterministic
Sometimes an env with su=True is choosen and everything is fine
but sometimes it's not and we get an access error

It happened in 3 acts

this commit f98470e6cf add
related_sudo=False for perf improvement pre v13.0

this commit 42c430a539 introduce
a new related field is_closed that copy paste the related_sudo=False

this commit cf8bb933ac3a9fd6344ca79617a2f7317fbc20af stored the field
and stored computed field should always be compute_sudo=True

Solution
--------
Remove all the related_sudo=False, they don't make sense since v13.0

closes odoo/odoo#93349

X-original-commit: e0fe5c5a1c6932f02ca0822c5c26618c91fd50b3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-06-10 19:46:41 +02:00
Sébastien Theys 8ad3e3a30f [FIX] mail: adapt misleading assert comment in form tests
closes odoo/odoo#93342

X-original-commit: 849eba9a9d037c3486772dce9c96662516425dba
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-10 19:46:37 +02:00
Andrea Grazioso (agr-odoo) 385fb2bb97 [FIX] point_of_sale: missing tax mapping in receipt
Activate units of measure
Create taxes:
- [TAXE] not included in price (i.e. 15%)
- [TAXI] included in price (i.e 15%)
Have a fiscal position mapping [TAXE] to [TAXI]
Have a product [PROD]:
- Price 10$
- Tax [TAXE]
- Unit: g
- Purchase Unit: kg
In point of sale settings:
- Add the fiscal position as default
- Display tax included prices
Start a pos session, add [PROD] to order, confirm and print receipt

The price on order screen and receipt will be wrong, it will take into
account the price excluded tax on top of the correct price
(final price 11.50, should be 10.30)

opw-2688375

closes odoo/odoo#93321

X-original-commit: ff61382c3865a159bb92f873bf82b8ab48426730
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-06-10 18:07:04 +02:00
Thanh Dodeur 663db10fe9 [IMP] mail: change the rtc layout system
This commit removes the layout menu, the layout is now automatically
adjusted based on the focused tile and uses a collapsable sidebar.

Layout variables are now located on the callView model instead of
messaging, which means that the presence of video tiles may depend on
multiple views with each their own layouts. It is therefore no longer
possible to rely on the previously global layout state to know if a
stream is viewed and should be downloaded.

closes odoo/odoo#82692

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 18:07:00 +02:00
Sebastien LANGE 7d04cdc2c7 [CLA] Update CLA for the new mail in Subteno IT.
closes odoo/odoo#93297

X-original-commit: 9136fea6c4d0f74f74d87300fa4108fd509b4554
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 14:58:24 +02:00
Sébastien Theys e62942a568 [FIX] mail: fix broken attachment reload on upload
Follow up on a35c71690a

closes odoo/odoo#93295

X-original-commit: 28014c97191e28b9db3870cdf4460f4bf243feb5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-10 14:58:20 +02:00
Laurent Desausoi (lade) 7d013ffba9 [FIX] web: allow date to be validated through the ENTER keyboard
When creating a custom datetime field (with date option type) with Studio and
that you edit the field manually then validates with the ENTER keyboard, the
date is changed (one day is removed - mm/dd-1/yy).
Since [1].

Step to reproduce the issue:
1. Put yourself in Europe timezone (e.g. BE)
2. Add a datetime field via studio (e.g. on the product form)
3. Put a date widget (no datetime)
4. Enter a date manually mm/dd/yy
5. Hit ENTER without clicking outside the box
You will see that the final date will be mm/dd-1/yy.

Solution: The path applied when clicking outside the box and cliking ENTER is
not the same. In the ENTER path, we check if the type of the field is a
`datetime`, if so, we remove the offset TZ to match 00:00:00 instead of
02:00:00 (if you were in GMT+2 zone). The issue is that we do this offset
if the customm field (via Studio) is a `datetime`. This check is incorrect: we
can have a `datetime` field but a date widget, in that case, if we are not on
GMT time we offset by some hours and we end up the day before (as we offset by
2 hours starting from midnight which results in 22PM the day before and when
rendered as a simple date we "loose" one day).

[1]: https://github.com/odoo/odoo/commit/08a423577f732b65ad5035e8f4662386a8631c5f

opw-2830843

closes odoo/odoo#93293

X-original-commit: 37a58832bc966f28fb2c1d627dfe28cef4fb5de7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-06-10 14:58:16 +02:00
Sébastien Theys 188afc6954 [IMP] mail: really open and close discuss in chat window manager test
Part of task-2871070

closes odoo/odoo#93273

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 14:58:12 +02:00
Sébastien Theys bcf7d6ac7c [IMP] mail: clean follower tests to use proper thread
Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:12 +02:00
Sébastien Theys 1bc57cd96e [IMP] mail: move hasParentReloadOnMessagePosted to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:12 +02:00
Sébastien Theys 87dc6a035d [IMP] mail: move hasParentReloadOnFollowersUpdate code to models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:11 +02:00
Sébastien Theys 910ac4caea [IMP] mail: move hasParentReloadOnAttachmentsChanged code in models
Remove code from legacy form in preparation of Owl form.

Part of task-2871070

Part-of: odoo/odoo#93273
2022-06-10 14:58:11 +02:00
Thanh Dodeur 307cec490a [REF] mail: move DOM function to view model
Since the addition of the CallParticipantVideoView model, it makes more
sense to have this view(DOM) related function in it.

closes odoo/odoo#93260

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-10 11:26:20 +02:00
Jigar Vaghela 529bab8f0b [FIX] l10n_in_edi: Fix 100% discount or zero quantity error and value
Before this commit:
===================

unit price calculation give error ZeroDivisionError: float division by zero for more details https://pad.odoo.com/p/r.c871c2581c415b13b0455a192ad0619d

After this commit:
==================

No error and set unit price,total amount before discount and discount amount if 100% discount or zero quantity is there

closes odoo/odoo#93027

X-original-commit: 60047761e592e9621650d65ac6ac1911f853141a
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-06-10 11:26:16 +02:00
Domenico Stragapede 48ba585bd6 [CLA] signature for domenicostragapede
closes odoo/odoo#93249

X-original-commit: 0bbe85e7426ace7e66ee4f01fae37690f08d8c86
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-10 10:29:47 +02:00
Domenico Stragapede df80a24828 [FIX] sale: translate down payment product name
Translate the product name "Down payment"
when it is created "on the fly" from wizard.

X-original-commit: 17f460587a207d708f1b9d9a0c6d080e64f9eac8
Part-of: odoo/odoo#93249
2022-06-10 10:29:46 +02:00
clesgow 660de02c21 [FIX] sale_stock: Cancel a SO with non delivery picking done
In the case of a multi-step delivery, a warning would be thrown telling
goods have already been delivered when only one step (like packing) was
done, which is wrong.

In the case of a MTO MO flow, just validating the 'pick components'
picking for the MO would trigger this warning as well.

Task-2797359

closes odoo/odoo#93233

X-original-commit: 167e94cba756a3fa88ed9928be7a1be3f85464a6
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-06-10 10:29:41 +02:00
clesgow ab825e9f19 [FIX] mrp: date_deadline lost on mrp backorders
When creating a backorder for a manufacturing order, date_deadline for
its raw_moves are lost in the process, as the field is set to copy
False. But the split of a manufacturing order is not a usual copy paste.

In this specific case, we need to keep the date_deadline as well, or
resulting moves wouldn't be able to be merged with moves in
pre/post-production pickings from the original manufacturing order.

Task-2797359

X-original-commit: b50db19fa0da58dc0734c8cd494795743eaf0984
Part-of: odoo/odoo#93233
2022-06-10 10:29:41 +02:00
Arnold Moyaux 718a8ee554 [FIX] stock: couldn't unreserve mixed tracking stock
- Install stock
- Go to Inventory > Configuration > Settings and enable "Lots" and "Storage Locations"
- Create a Product tracked By Lots (i.e. Product X)
- Go to Inventory > Operations > Inventory Adjustments
- Create an Inventory Adjustment for Product X:

     Product   |   Location   |   Lot/SN   |   Real Quantity
 -------------------------------------------------------------
    Product X  |   WH/Stock   |   LOT 01   |       20
    Product X  |   WH/Stock   |            |       10

- Validate Inventory
- Go to Inventory > Operations > Transfers and create one:
  * Source Location: WH/Stock
  * Destination Location: WH/Stock/Shelf1
  * Operation Type: Internal Transfers
  * Operations:
    [Product: Product X, Initial Demand: 25]
- Save Transfer, Mark As Todo and Check availability
- Click on list icon of Operation line for Product X to display Detailed Operations
- 20 units of LOT 01 and 5 units without lot have been reserved
- Set LOT 01 for the 5 reserved units without lot and confirm
- Open Detailed Operations again
- There are now 20 units of LOT 01 and 5 units of LOT 01
- Remove the row with 5 units and confirm
- Check availability and open Detailed Operation
- There is now only a row with 25 reserved units of LOT 01
- Unreserve
The following errror is raised:
"It is not possible to unreserve more products of P than you have in stock."

It happens because the system is not able to manage quants with lots and
wihtout lots at the same time. When modifying the move line to 25
reserved units. It's composed of 20 quants with lot and 5 quants without
lot. And when unreserving it will check if there is a quants with 25
units with the lot and if it's not found 25 units without lot. But never
25 units of quants with lots and without lots.

opw-2419444

Close #64497

closes odoo/odoo#66029

closes odoo/odoo#93141

X-original-commit: 83d55d8ed8b8b5a5232e3cdfc09abf5285f18ed7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-10 10:29:36 +02:00
manu 269886ec50 [FIX]l10n_es: account common 4009 account type to Current Assets, account common 438 account type to Current Liabilities
However, by further investigation, we saw that both need to
be current liabilities. (see discussion on issue/pr)
(92515, 91455, 84039)

closes odoo/odoo#93129

X-original-commit: d432ce9e5fd546cdf3759e5563c3a17d5381fefc
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-06-10 10:29:32 +02:00
Nicolas Pierre 5b2d16360d [FIX] purchase_stock: days to purchase not used in orderpoint action
Since https://github.com/odoo/odoo/pull/86682, when a user opens
the replenishment view, the  Days to Purchase are not taken into
consideration when calculating the forecast of a product.
This was due to the fact that the Days to Purchase are now taken from the
orderpoint and not from the company settings. This is fixed by taking
the company setting if no value from the orderpoint is sent to the
method.

closes odoo/odoo#93252

Task-id: 2871408
X-original-commit: ac1df1949e4523aff65543f1381300fc7de3b4e4
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: npi-odoo <npi@odoo.com>
2022-06-10 09:28:13 +02:00
William Henrotin 63d068e94d [FIX] stock,mrp: render control panel components
Since 362f6b6d5b, the control panel of an
action can be rendered only the first time the dom is mounted. Any
further remount won't rerenders do anything. The bom report needs to add
some buttons and a searchView. Previously, those widgets was mounted in
the set_html _after_ the first mount of the controlPanel. This report is
an extend of the stock traceability which also adds some buttons. In
this case the buttons are rendered correctly because they are added
_before_ the first controlPanel mount.

This commit makes the extra widgets to be rendered in the control panel
generated in a new specific method overridable in the bom report file

closes odoo/odoo#93245

X-original-commit: 39306370a3a7c5767a29bba216ffe61ab8c69544
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-06-10 09:28:09 +02:00
Yolann Sabaux a95cb2eb2d [FIX] stock_account: fix rounding error
Steps to reproduce:
- Define the decimal accuracy for the "Product Price" to 5
- Create a product with "cost = 0.00875"
- On-hand product = 10'000
- Change the cost to "0.00975"

Issue:
In Inventory valuation, for the product you will have two layers valued at:
- 87.5
- 12.5
Instead of:
- 87.5
- 10

Cause:
We round with currency precision

Solution:
Use the "Product Price" decimal precision as it is the case when we define a "standard_price"
https://github.com/odoo/odoo/blob/4c7ef5673b8fc28bf7fe2bc36fe2450987f15a28/addons/product/models/product.py#L110-L112

opw-2724975

closes odoo/odoo#93257

X-original-commit: deb26bb1182682a5071287ae313064801d080607
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-06-10 08:28:12 +02:00
Kevin Enlong dea1d46faf [CLA]Corporate signature for Enlong
closes odoo/odoo#93254

X-original-commit: 9f9249481a5e13db5744601471f76a3f269a113e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 08:28:07 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Pierre Paridans b94e612378 [FIX] web: scrolling element to bottom border test breaks in Chrome 94+
Since Chrome 94, some element's sizing computation returns a slightly
different value (in the order of a fraction of a pixel). Sadly, due to
rounding, this difference has an impact on exact sizing assertion.

In this case, assertion regarding the scrolling of an element inside its
scrollable container when it should be aligned to the bottom of the
container while being fully visible breaks due to those rounding change
(cf. the element is +/- 1px too low).

This commit fixes it by adjusting the `scrollTo()` implementation to
round the height of the element that should be visible in its scrollable
element to the upper pixel. This allows the element to remain fully
visible, with eventually a 1px margin in some cases (taken as an
reasonnable margin of error).

closes odoo/odoo#93235

Note: similar issue was also addressed in commit odoo/enterprise@6e973df114
X-original-commit: fdd03848e806b42ee0ee778bfd09d2f583b34f16
Related: odoo/enterprise#28215
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-06-09 18:57:46 +02:00
Kevin BaptisteandYannick Tivisse 3ee9041f62 [IMP] hr_recruitment: Allow displaying CV on application form
closes odoo/odoo#93219

Taskid: 2868881
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2022-06-09 17:37:41 +02:00
Laurent Desausoi (lade) 964d352077 [FIX] sale: allow down payment sections to be properly translated
When generating an SO, the down payment section is translated into the language
of the current user instead of the language of the partner.

Step to reproduce the issue:
1) Install the Sales module
2) Install another language (e.g.: French) and change the language of a partner
to this language.
3) Create a quotation for the partner which you just changed its language (and
confirm it)
4) Create an invoice (down payment) of 50% for example (confirm the invoice)
5) Create another invoice to complete the payment (confirm it too)
6) Go the latest invoice and print it
You should see that the "Down Payments" section is kept in English instead of
the other language (e.g. French).

Solution: The issue is simply that the translation of the concerned term is
translated using the lang of the user instead of the lang of the partner. To
fix this, we must update the current context to change the lang to the partner
language (defaulting to the user language if the partner has no lang).
The side effect is that in the frontend, the user will see this section in the
language of the partner instead of his own (which may looks as a bug).
Unfortunately, it is an inherent functionnality of reports, we cannot do it
otherwise (we have the same issue with the label of the Down Payment).

opw-2865865

closes odoo/odoo#93210

X-original-commit: 2859f2709f92f8947c1f81f52a580ad3510316eb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-06-09 17:37:37 +02:00
Florian Damhaut 6916375be1 [FIX] web: breadcrumbs with readonly Many2One links
Step to reproduce:
- Open 'Sales'
- Open a SO
- Click on the product link in the OrderLine tree

Current Behaviour:
- Breadcrumbs are cleared
Since https://github.com/odoo/odoo/commit/cefd6ade293e6cfa8ec405f55c6d4d7194f36e7e the onClick is only triggered in form view

Behaviour after PR:
- Breadcrumbs are not cleared
Link are now trigger via another click action '_onLinkClick' and quickEdit does not trigger on URL click

Test provided by Anh Thao (pta)

opw-2748041

closes odoo/odoo#85203

X-original-commit: 8ba45fde9f248e5a2b76ff3e934d9784d5d57ff0
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-06-09 16:29:22 +02:00
Jinjiu Liu 629b440d45 [FIX] l10n_de: “Invoice” not translated in template preview
Reproduction:
1. Setting up a database with location in Germany and choose German as
the system language
2. Go to Settings->General Settings->Configure document layout, choose
DIN5008
3. The word “Invoice” is not translated

Fix: translate the title in python file, added term in pot

opw-2795031

closes odoo/odoo#93196

X-original-commit: 18c5bf4581d1e13ec169dc26f79499dac73eaed0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-06-09 15:26:26 +02:00
Yannick Tivisse abef5a7fb2 [ADD] hr_recruitment_skills: Manage skills for applicants
This commit also add a wizard on the applicant kanban view to
search applicants in the reserve based on their skills, degree,
tags and availability and move them on the recruitment pipe.

closes odoo/odoo#93126

Taskid: 2877672
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-09 15:26:22 +02:00
Yannick Tivisse 16ee5235e0 [MOV] hr_skills: Split model files according to coding guidelines
Part-of: odoo/odoo#93126
2022-06-09 15:26:22 +02:00
Yannick Tivisse 3cd48c67d0 [IMP] hr_recruitment: Add 'Reserve' filters for applicants
Part-of: odoo/odoo#93126
2022-06-09 15:26:21 +02:00