Commit Graph
168073 Commits
Author SHA1 Message Date
Loan (LSE) 962d4324fb [FIX] hw_drivers: add cron for HTTPS certificate update
Context:
When an HTTPS certificate is delivered, it is valid for ~1 month.
To avoid missing the certificate, a script is automatically ran daily
to check if a new HTTPS certificate is necessary.

On the IoT box, it is added in the native Unix system with this file:
https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/cron.daily/odoo

However, prior to this commit, there is nothing equivalent for windows

Note: the HTTPS certificate check is also done automatically when
accessing the homepage.

Before this commit:
After an HTTPS certificate delivery, if we let the IoT server
running non-stop (and without accessing the homepage).
The HTTPS will expire without any automatic renew.

After this commit:
The cron process is handled by the handler Manager

Other note:
- Using native Windows "Scheduled Task" have been proposed at:
https://github.com/odoo/odoo/pull/144584
But, was judged too risky from a security point of view
- `sched` library have been discarded as the code is too verbose
- This is unstable for the iot-box. This is the reason for the
initial Windows check on the import. The iot-box does not need
this fix anyway as explained in the context

opw-3617687

closes odoo/odoo#145114

X-original-commit: b9bd36056fbd3c27148da82cc49039669b8f8563
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-12-06 17:27:42 +00:00
ravb-odoo e3ddf17bef [FIX] hr_expense: correct domain to compute expense report
Steps to reproduce:
- open kanban view of department in employee module.
- click on 'Expense Report'.

Issue:
- When viewing the department's expense in the employee  module, all
  department data is displayed, regardless of the department selection.

Solution:
- The issue is resolved by correcting the domain, ensuring that only data
  related to the selected department is displayed. This adjustment results in
  accurate department-specific request information.

Task-3541358

closes odoo/odoo#145042

X-original-commit: 89b04551465ff323eed08afb6e0bbcb944724254
Related: odoo/enterprise#52156
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-06 16:12:26 +00:00
Leonardo Pavan Rocha f8c2efc012 [FIX] hr_homeworking: show correct colors in homeworking icons
Since the early versions of the homeworking modules, we were showing incorrect
colors for the homeworking icons if the partner_id was too large. This comes
from the fact that we were not using the getColor helper from calendar
to decide which color to render. Since we have a limited amount of colors,
we should not use the partner id to define the color, but actually cycle
through all the possible colors, which is done by the getColor method.

Also, when getting the homeworking data, it was possible to get partner_id as
false when the employee had no related user. This commit also changes this to
fallback on the work_contact_id if no user is set.

task-3561678

closes odoo/odoo#139167

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-06 16:12:24 +00:00
AH-Yussef 7d58fe2c16 [FIX] web: align progress bar to end of table cell
Steps to reproduce:
- intall Employee app
- install HR Gamification module (not an app)
- Go to Employees app
- Go to Configuration > Challenges > Challenges
- Create a new challenge with goals and participants
- Go to Configuration > Challenges > Goals History
- Open up a group
- The word "Completeness" and the progress bar is not aligned correctly, the bar is supposed to be directly underneath the label.

Investigation
- The styling of the progress bar inside table cells https://github.com/odoo/odoo/blob/1f12670a8061a4eb3fd57abca238d8daf7ef574d/addons/web/static/src/views/fields/progress_bar/progress_bar_field.scss#L27-L32 was missing to align the progress bar to the end of the containing flex box

opw-3599052

closes odoo/odoo#145190

X-original-commit: 9a02e535882bf6844fffdb7c6a71053645e3af68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-06 14:07:57 +00:00
Djamel Touati fe508c6b2c [FIX] mrp: validate a MO with manual consumption
Steps to reproduce the bug:
- Create a storable produce P1 with BoM:
    - select any component, qty: 1 unit

- Create a MO to produce one unit of P1
- Confirm the MO
- Update the qty of the component to 2
- Validate the MO

Problem:
The quantity of the component is overwritten and reset to 1
Because, when the new qty of the component is set, only the
“manual_consumption” field is updated to “True” thanks to their compute:

https://github.com/odoo/odoo/blob/17.0/addons/mrp/models/stock_move.py#L138-L145

But the field ‘picked’, is not updated
So when we check if we have to set a quantity, the condition is false
and the quantity is reset to the original value:

https://github.com/odoo/odoo/blob/26193fdb707a631d498cbc37d68c08497e32a31d/addons/mrp/models/mrp_production.py#L1201-L1202

opw-3616628

closes odoo/odoo#145157

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-06 14:07:56 +00:00
Thomas Becquevort (thbe) 392e6d2369 [FIX] account: non responding view button on coa
Description of the issue/behavior this commit fixes:

When accessing the chart of accounts from the button in the starting banner
on the accounting dashboard, the "View" button on the right does nothing while
it should open the form view of the account of the row which's
button is clicked.

Steps to reproduce:

1 - Install account_accountant (or else the coa is not reachable from the dash)
2 - Open the Accounting app
3 - Click on "Chart of Accounts" in the onboarding banner
4 - Click on the View buton of any row
5 - Nothing happens

Desired behavior after this commit is merged:

This commit adds the form view in the view that is returned when clicking on
"Chart of Accounts". Thanks to that, the open_form_view is able to return a
form view when the button is clicked.

With this commit, the view button is operational.

task-3624209

closes odoo/odoo#145053

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-12-06 14:07:53 +00:00
Elisabeth Dickinson 8e1906724c [FIX] web: quick fix to remove ButtonBox overflow on mobile and tablet
Because the number of buttons in the `ButtonBox` isn't dependent on 
the size of each button, sometimes the bar overflows on smaller screens. 

This should probably be redone to calculate the size of each button 
depending on its contents (which can be translatable).
In the meantime, this fixes the overflow issue.

task-3573807

closes odoo/odoo#141163

Related: odoo/enterprise#50256
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-06 14:07:49 +00:00
Elisabeth Dickinson a01a6822dd [FIX] web: fix oe_stat_button dropdown width and button alignment
In the stat buttons' dropdown under "More", if the text is too long
a horizontal scroll appears.

Fixed by removing the fixed `width` and the `w-100` class on the
dropdown box.

Because of `height: 100%` which is needed for the button to be aligned
with the other buttons, the contents of the dropdown button are not
centered.

Fixed with a `d-flex` and `align-items-center`.

task-3573807

Part-of: odoo/odoo#141163
2023-12-06 14:07:49 +00:00
Elisabeth Dickinson 2172001cc9 [FIX] point_of_sale, hr_org_chart: fix status button's font-size
The structure of the stat button which is not generated by a field
has been changed to match the buttons which are generated by a field.

task-3573807

Part-of: odoo/odoo#141163
2023-12-06 14:07:49 +00:00
Anita (anko) 1d3d587edd [IMP] payment : delete sepa direct debit from mollie
Sepa Direct Debit is deleted from Mollie data as it seems
to not support one time transactions and currently Odoo
doesn't support tokenization in Mollie.

closes odoo/odoo#145166

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-12-06 12:42:24 +00:00
Youssef Bashandy 8699231bc8 [FIX] point_of_sale : Removing orderline
Steps to reproduce:
	1- Install POS module and French Localization
	2- Open a session in POS
	3- Add an item to the order then remove it and set the quantity to 0

Current behavior before PR:
When you try to remove an item from POS while using french localization it gives an error 'null exception'. This happens because we are trying to set the quantity to the order after unlinking the order line and setting the order with null.

Desired behavior after PR is merged:
The error pop-up is not there anymore and you can remove any item. Now we set the new quantity to the order before unlinking the order to avoid the null exception

opw-3607956

closes odoo/odoo#144592

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-06 12:42:22 +00:00
Gabriel de Paula Felix (gdpf) 161e93fb88 [FIX] microsoft_calendar: old events spam during sync
Before this commit, there were situations that old events in Odoo which shared the same state with Microsoft got updated (without changes) in Odoo due to a few seconds of update time difference, triggering lots of unwanted spam for attendees on Microsoft side when it shouldn't happen. Additionaly, when restarting the synchronization with Microsoft, the setting parameter `range_days` was being used to update all events in Odoo with `{'need_sync_m': True}`, which also triggered updates in old events and future events on Microsoft side. If `range_days` was too big, lots of events were 'updated' and triggered spam, and if it was too small, only events within the `range_days` range were synchronized with Outlook.

After this commit, using system parameters, old events in Odoo which update time difference between Microsoft and Odoo is too small are not updated in Odoo anymore, thus not triggering unwanted spam for attendees in these situations. Also, one system parameter `lower_bound_range` was added to be used for selecting the range of old events in Odoo that will be synchronized (and send emails).

closes odoo/odoo#145117

Task-id: 3601306
X-original-commit: aabca65
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-12-06 11:22:10 +00:00
Romain Derie 5d50a6b20f [IMP] website: remove useless lang redirect on /robots.txt
Same as what was done:
- in 2019 for favicon.ico at [1].
- in 2018 for sitemap.xml at [2].
- in 2015 for many controllers at [3].

Note that it's not about crawlers/robots, because those won't go through
the lang redirect (see `is_a_bot()`).

It's just to avoid a redirect which has no meaning/sense when requested
by real users. /robots.txt is not language dependent.

[1]: https://github.com/odoo/odoo/commit/94bcbc92e5e5a6fd3de7267e3c01f8c11fb045f4
[2]: https://github.com/odoo/odoo/commit/708ad186d52aff9270ea73888326370ada2fbc71
[3]: https://github.com/odoo/odoo/commit/a696913364ffc4d5f1ce0675bc9be82f84f3ff93

closes odoo/odoo#145018

Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-12-06 11:22:09 +00:00
Gauthier Wala (gawa) fae7a7e212 [FIX] l10n_lt: change default digits for Lithuania
The digits of the accounts of Lithuania's COA go up to 6.
It's currently defined to 1, which makes no sense.
We will change it to 6.

closes odoo/odoo#143986

Related: odoo/enterprise#51661
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-12-06 11:22:05 +00:00
std-odoo b046f21b59 [IMP] website_sale_slides: ensure login after purchase
Purpose
=======
If we buy a course without being logged in, we are redirected to a page
with a button "Start Learning". That button redirects to the course we
just purchased. Instead, we want to redirect the users to the login page,
and after that to the course page.

Task-3544591

closes odoo/odoo#143899

X-original-commit: cbe570e107e9a27e43d35f40071323f5443c1999
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-12-06 11:22:04 +00:00
Maximilien (malb) 1be6866b15 [IMP] portal: country read-only
Before this commit, when a client had 1+ posted invoice he could still modify
his address, including his country. The country can have as much fiscal
implications for the Accounting as the Tax ID (both fields are used in the
Fiscal Positions mapping). For that reason, once an invoice has been made for a
customer, we should not let him change his country freely. This can still be
done in the back-end, but should not be possible in the front-end.

Also changing a bit the message to include the new read only on the country.

closes odoo/odoo#142910

Task: 3603353
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-12-06 11:22:03 +00:00
Jorge Pinna Puissant 5940233032 [FIX] web: remove nondeterministic error when waiting for RPC
Before this commit, to be sure to wait for all the RPC are finished
before continue, the clickbot, patched the ORM class and saved in a
waiting list the model and method called, and removed when finished.

The issue with this, is that when calling an ORM with a protected RPC
service (as is the case for the RequestBatcherORM), if the caller
component is destroyed before the return of the RPC, as the RPC service
is protected it will return an always pending promise, and the RPC will
never be removed from the waiting list and the clickbot will wait
indefinitely.

Now, we use the RPC event directly, so even if the component is
destroyed, we know that the RPC was finished, and is removed from the
waiting list.

Note that, this commit doesn't have a test, making a test for this case
is quite difficult, and some of the causes of the issue will be removed
in future versions.

closes odoo/odoo#145081

X-original-commit: c444255004d37f5153de24d938a4b7bc4497e858
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-06 09:53:22 +00:00
Julien (jula) 56ef824d39 [FIX] website_sale: set correct payment terms
__Current behavior before commit:__
When a sale order is created with a product added to the cart,
`payment_term_id` is initially set by [sale_get_payment_term][1].
However, when the user sets their address, `payment_term_id` is then set
to `partner_id.property_payment_term_id` due to the triggering of
[_compute_payment_term_id][2].

This means that `payment_term_id` is computed differently if the user
edits his address before confirming the order or not. (Resulting in it
being `False` most of the time).

__Description of the fix:__
Inherit [_compute_payment_term_id][2] to set `payment_term_id` using
[sale_get_payment_term][1] from the **website_sale** module.

__Steps to reproduce the issue on runbot:__
- Add a product to the cart through the website.
  → A new sale order will be created with payment terms set.
- Proceed to checkout and edit the address on the website
  → The sale order payment terms will be removed

opw-3492868

[1]: https://github.com/odoo/odoo/blob/1336ecf08210b04fb4b365d9e3a2bf8ae434de51/addons/website_sale/models/website.py#L215
[2]: https://github.com/odoo/odoo/blob/1336ecf08210b04fb4b365d9e3a2bf8ae434de51/addons/sale/models/sale_order.py#L518

closes odoo/odoo#145023

X-original-commit: 14f1168d1a27c04312a42f365ebfd24c0d07dba8
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
2023-12-06 09:53:20 +00:00
jugj-odoo 8b978ab01d [FIX] resource : fix traceback in _get_attendance_intervals_days_data with adjacent attendances
----------------------Issue--------------------------
When calling get_work_duration_data on a calendar that contains adjacent calendar attendances,
we get a traceback in the method _get_attendance_intervals_days_data.
This is due to the fact that adjacent attendances (like 09:00 -> 13:00, 13:00 -> 17:00) will get merged into one single interval.
Which will generate an attendance interval with multiple resource.calendar.attendance records associated with it.

----------------Steps to reproduce-------------------
1) Create a Calendar
2) Create for a same day 2 attendances going from 09:00 to 13:00 and another going from 13:00 to 17:00 3) Try creating a time-off for that day
3) Associate that calendar with an employee
4) Try creating a time off on the day where we have adjacent attendances
---------------------Fix-----------------------------
Adapt _get_attendance_intervals_days_data to handle attendance intervals associated with multiple resource.calendar.attendance

task-3615723

closes odoo/odoo#144036

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-12-06 09:53:19 +00:00
Rodolpho Lima 7a8c0b0091 [FIX] web_editor: remove observerUnactive before adding tooltip
Since [1], the tooltip is not longer the jQuery-UI or Bootstrap one, but
the popover service with the Tooltip component, which does not make
changes to the editable DOM when being added or removed. This means that
switching the observer off before opening the tooltip is no longer
necessary.

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

closes odoo/odoo#141882

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-12-06 09:53:17 +00:00
Rodolpho LimaandNicolas Bayet a7ade66595 [FIX] web_editor: close iframe document after write
Since [1], in case of import errors, the module loader waits for
`document.readyState` to be "complete" or for the "DOMContentLoaded"
event to be triggered in order to replace the DOM content by the error
report.

But, before this commit, the Wysiwyg's iframe document was opened for
writing (`document.open` and `document.write`) and was never closed. As
a result, the `readyState` would be left as `loading` and the error
import would never be displayed in case of import errors, making imports
fail silently.

This commit makes sure the iframe document's `readyState` is changed
back to "complete" after its content is written to it.

[1]: odoo/odoo@e0fdb6a0b4

task-3537756

Part-of: odoo/odoo#141882
Co-authored-by: Nicolas Bayet <nby@odoo.com>
2023-12-06 09:53:17 +00:00
Mahdi Cheikh Rouhou (macr) 11bd9e01b7 [FIX] website_sale_{loyalty,delivery}: display using website lang
Issue:
======
When we use the website in a language different the the partner lang ,
it will always display `Free product`  in the partner language.

Steps to reproduce:
===================
- Create a loyalty program that gives a free product
- Install another lang (FR for example) apply it for website too
- Go to website and change lang to FR
- Added the product which gives the free product promotion
- Go to cart

Origin of the issue:
====================
The lang was forced as partner language in displaying the free product
name.

Solution:
=========
If the call is being made from website , then we need to use the website
lang, otherwise the partner_lang

opw-3593505

closes odoo/odoo#145122

X-original-commit: fe43d01085f46ac736e598ecfcf9fc3e0c9739f6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-12-06 08:20:14 +00:00
Benjamin Hanquin (beha) 493cfa41aa [PERF] product: Improve name_search performance
Issue:
The name_search performance was highly inefficient with a high number of
records.

Analyze:
The bottleneck came from the NOT IN search on the product_template.

Fix:
As a NOT IN  is not efficient, an not exists must be used.

Note:
The ORM has to be bypassed has no "not exists" feature has been
implemented yet.

Benchmark:
| # Input data | Before PR | After PR |
|:-------------:|:----------:|:---------:|
| 182386                    |     15+ min           |   ~100 ms |
|       29            |      ~29 ms          |    ~28 ms           |

Related task:
opw-3554133

closes odoo/odoo#145095

X-original-commit: 955d28a485d569569af2792fa014b52c1829d178
Signed-off-by: Benjamin Hanquin (beha) <beha@odoo.com>
2023-12-06 08:20:13 +00:00
Saiyed Irmi 18fbdea689 [IMP] web: fix alignment of progress-bar
Steps:
 - Open Appraisals
 - Go to Skills
 - Add new skill
 - Progress-bar was left-aligned in both rtl and ltr mode

 Issue:
 - progress-bar should always aligned to the right (it should be to
  the left only in rtl mode) in list view.In rtl mode, white space coming
  before progress-bar.Progress-bar with different percentage values
  was not aligned.

 Cause:
 - the progress bar alignment was inconsistent, especially when dealing
   with RTL languages.

 Fix:
 - By justifying the content of progress-bar to flex-end and of rtl mode to
  flex-start  Applying min-width to progress-bar value.
 Task: 3525850

closes odoo/odoo#145094

X-original-commit: 52a90d638b79f313c6803b09e54b721eeee2e2fa
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Signed-off-by: Prakash Prajapati (ppr) <ppr@odoo.com>
2023-12-06 08:20:12 +00:00
Thomas Beckers dd975f2dad [FIX] account: avoid error when moving item to account of parent company
On a company with branches, you can move an amount from a branch company
account to a parent company account using "Move to Account" action. This
will create a new entry with both accounts. If this entry is created on
the parent company, it will trigger an error since parent company does not
have access to branch company accounts.

Steps to reproduce
- Have a company with a branch company
- Create an account belonging to the branch company
- Create an entry with this account
- Select parent company and go to journal item list
- Select one item with the account created above and use the
action "Move to Account"
- Try to move to an account of parent company => Company access error

Now we create the entry on the lowest child company.

opw-3554088

closes odoo/odoo#145076

X-original-commit: ad43eb54104671a606d1d8b142df2154e86678bf
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Thomas Beckers (tbs) <tbs@odoo.com>
2023-12-06 08:20:09 +00:00
Rodolpho Lima 37b7a0da7e [FIX] web_editor: paste odoo-editor html in iframe
Before this commit, pasting html content that had been copied from the
the Editor failed to paste any content when inside an iframe.

This happened because the DOMPurify library was not configured to use
the iframe's window for Node prototypes, which led `instanceof` checks
to fail, removing nodes a result.

Additionally, commit [1] did not do the job completely: while the
document for creating the document fragment became the one received as
parameter, the DOMParser constructor remained the one from the window in
which the JS code is executed, which might be different from the
received document's window. This mismatch happens in particularly when
the editable is inside an iframe.

task-3575496

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

closes odoo/odoo#144744

Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-06 08:20:08 +00:00
Abdelouahab (abla) 11a81bf88b [FIX] web: check children instead of childNodes
To reproduce
============
on time Off -> allocations, open a record and try to open studio
-> Owl Traceback

Problem
=======
the ButtonBox is not well compiled, we check if it has children
using `!el.childNodes.length`, but this property returns the total
number of child nodes, including text nodes ...
So counting text nodes, we proceed to create ButtonBox node and fill it
with children `for (const child of el.children)`, but the property `el.children`
doesn't take into account text nodes, which leads to return `''` then a null object

Solution
========
as we loop on `el.children` the check must be done using the same property.

opw-3603952

closes odoo/odoo#145080

X-original-commit: e9e8626c7dabd2d0ba51390279e5adb1eb3aef6f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-06 06:58:52 +00:00
alsh-odoo 42a73a9ca2 [FIX] hr_expense: allow multiple expense sheet recordsets to post
This traceback arises when the user tries to post multiple
expense sheets of different employees.

To reproduce this issue:

1) Install 'hr_expense'
2) Open 'Expenses/Expense Reports'
3) Select multiple expense sheets of different employees
4) Make sure the selected recordsets status is in 'Approved'
5) Now click on the 'Posted Entries' button

Error:- 'ValueError: Expected singleton: hr.employee(10, 7, 15, 11, 6)'

https://github.com/odoo/odoo/blob/655c408d319a14cc9b972d4f49816c91fb502b22/addons/hr_expense/models/hr_expense.py#L1474-L1475

After applying this commit will resolve the issue by looping the recordset.

sentry-4595012933

closes odoo/odoo#144137

X-original-commit: 840fa66433be5a3e7c8b34c06d6dadf6e8496013
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-12-06 05:01:41 +00:00
Nicolas Viseur (vin) 61fbd95e6d [IMP] l10n_id_efaktur: add translations
In an effort to make the module more accessible
in its target country, add translations to the
module. This mostly concerns error messages.

Task id # 3570055

closes odoo/odoo#145116

X-original-commit: 8b504af3226ed1e2581e19736a7f7675aa7a30ee
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-12-06 02:26:19 +00:00
duongnguyen-viindoo af71880cee [FIX] l10n_vn: wrong pos receivable account
-According VietNam Circular , Receivable account we should use for POS
is 131 account, not 132
see https://thuvienphapluat.vn/van-ban/Doanh-nghiep/Thong-tu-200-2014-TT-BTC-huong-dan-Che-do-ke-toan-Doanh-nghiep-263599.aspx
, select English version - Section 'Short-term receivables from
customers' to read it and we will see 132 account is not appropriate

closes odoo/odoo#145119

X-original-commit: abe25df784a9cd2bb06ba3f32fe5104160bf2fca
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-05 22:40:48 +00:00
Tiffany Chang (tic) 692b1a28f1 [I18N] add hr_hourly_cost to .tx/config
Somehow the module disappeared from the file between versions 16.0 and
saas-16.1 even though the .po files exist (up to + including saas-16.2).
Further investigation/fixing will occur later on to check overall
consistency correctly, this commit is only a quick fix to get the
translations working properly for this specific module.

closes odoo/odoo#145044

X-original-commit: d1dfb5085b2d5c21485e75e0eb9e0c43b7e2c079
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-12-05 22:40:46 +00:00
aliya 25118dc5fa [FIX] l10n_lu: fix tax repartition
Current distribution of taxes is not correct

- 461411 is a current liability account (expressing VAT due)
- 421611 is a current asset account (expressing VAT deductible)

Example distribution as it is:
- grid 459 expresses VAT deductible
- grid 712 expresses VAT due

Hence, the current configuration of all IntraCom taxes is inconsistent. 
Essentially, the taxes need to be swapped between these accounts.

task-3619708

closes odoo/odoo#145025

X-original-commit: 3d466638e614e26e0cb3066981bb8bdcf4a767a1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-12-05 22:40:45 +00:00
Julien Alardot (jual) 9aaba411dd [FIX] hr_expense: Fix payment method line flow
The payment method line set on the expense sheet isn't the one used
on the payment.

The 'print check' payment method test, requiring
the 'account_check_printing' installation and that module not being
in hr_expense dependencies would fail if both weren't installed.

A new and more method-agnostic test replaces it

Task-3498991

closes odoo/odoo#145017

X-original-commit: c9554cb
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-12-05 22:40:44 +00:00
Louis (wil) e1570d82bf [I18N] l10n_mx_*: update translations
closes odoo/odoo#145012

Related: odoo/enterprise#52141
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-12-05 22:40:42 +00:00
Alexandre Kühn 10c9a55e50 [FIX] mail: invoke onAdd/onDelete hooks on inverse relational field
Before this commit, when adding on a many relational field with an
inverse, the `onAdd()` hook was not triggered on the inverse:

On the inverse, the `addNoinv` and `deleteNoinv` are invoked on
inverse. We forgot to invoke these hooks in these functions.

closes odoo/odoo#144999

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-05 22:40:41 +00:00
Alexandre Kühn a59c36731f [FIX] mail: lazy fields not properly recomputed
When a lazy field was computed on-the-fly by a getter and later
the field had its dependencies changed, the field was not
recomputed.

This happens because in this condition, the field is immediately
recomputed, and the code was always clearing the "in-need" flags
when recomputing the field.

This commit fixes the issue by preserving these "in-need" flags
at the end of the update cycle. Note that there's no way to detect
reactive "unread", so a lazy field will keep its "in-need" at least
for an extra update cycle.

Also transition of field flag "on-need" becoming `true` and field
was already "in-need" was not correctly computing/sorting the field.
This commit also fixes this issue.

Part-of: odoo/odoo#144999
2023-12-05 22:40:41 +00:00
Alexandre Kühn 3e443edcf9 [FIX] mail: insert data in relational field
Before this commit, when a record was identified by relational
fields, we couldn't insert this record by passing data rather than
the records.

We should be able to insert records and data in the models, so
passing data should be ok.

This commit fixes this issue by backporting some code of improvements
and fixes from master. Note that the internal code of model is
written for retrocompatibility, so some added features like
store.Model in diff is ok.

Part-of: odoo/odoo#144999
2023-12-05 22:40:41 +00:00
Alexandre Kühn 0761b4299e [FIX] mail: field.onAdd/Delete & record.delete at end of update cycle
Before this commit, the onAdd/onDelete hooks of fields and the
deletion of record was performed immediately. The main drawback was
that `this` and the record being added or deleted from a relational
field was in an intermediate state.

For example, if the record to be added had some computed fields,
the code executed by the `onAdd` hook was reading the field before
it was computed.

This commit fixes the issue by moving the execution of field hooks
`onAdd` and `onDelete` at the end of the update cycle on records,
after the compute methods.

Part-of: odoo/odoo#144999
2023-12-05 22:40:41 +00:00
Djamel Touati 6520697467 [FIX] mrp: allow access BoM Overview consumable product
Steps to reproduce the bug:
- Create a consumable product:
    - Create a BoM

- Attempt to access the BoM overview

Problem:
An error is triggered:
"Caused by: TypeError: value.toFixed is not a function"

This error occurs when attempting to format the float value of the
available quantity for a consumable product, where the function is
called with `value: False`:

https://github.com/odoo/odoo/blob/054ca0a19aaf297f420a1b478b93ae26f1b943b8/addons/web/static/src/core/utils/numbers.js#L192

opw-3622251

closes odoo/odoo#144988

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-05 21:15:34 +00:00
dhda-odoo 0a62f7e06a [FIX] project: add space between caret and assignees dropdown
step to produce :
- go to project
- click on any project in the Kanban view
- click on the quick create button
- notice caret at assignees dropdown

issue:
- at the assignees dropdown the caret position is at the far right and not
  aligned with the discard/trash button

Cause:
- changes which happened in task-2944742 added left margin for user_ids field ,
  which then moved the position of caret.

Solution:
- changed css to just apply the margin at bottom right for M2M avatar at kanban
  and stopped it from affecting user_ids field in quick create task.

task-3506482

closes odoo/odoo#144987

X-original-commit: 519df29285700a33a515d640777745ca6a90fbab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-05 21:15:33 +00:00
Sanket Brahmbhatt 822dd8a5f2 [FIX] account: don't allow to user remove the company
When a user creates a journal entry in accounting and the company is empty or
not selected in that journal entry, an error is generated.

 step to reproduce -
 - install the `Invoicing` & `Inventory`.
 - open the `Invoicing`.
 - create New.
 - open  `other info` note page > company (company_id) must be empty.
 - the error will be generated.

Error-ValueError:
          Expected singleton: res. company()

If the user attempts to remove the company after this commit, they get a
validation error.

sentry-4558397052

closes odoo/odoo#144982

X-original-commit: baa6153bd25a794f432e1a8665098479b33b6e8e
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-05 21:15:32 +00:00
Pierre Masereel a77c6fee49 [FIX] hr_contract: unsual days of the correct company
When we create public holidays, we can create global ones that will
apply to all 'Working Hours' of the company.

When you create such a public holiday, it is displayed as a an unusual
day for all employees of all companies that have a contract.

The issue comes from the the fact that we use a sudo to get the contract
of the employees and then we call '_get_unusual_day' on the Working
Hours of the contract in sudo. So when we catch the global ones (wihtout
Working Hours) it takes them from all companies as we are in sudo and it
won't apply the record rule.

closes odoo/odoo#144981

X-original-commit: 349762e28461f795d4e8bd3110556b5a80f92d49
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-12-05 21:15:31 +00:00
Rémi Rahir (rar) 51b931b5de [FIX] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/a554a8ba8 [FIX] spreadsheet: Force left-to-right direction
https://github.com/odoo/o-spreadsheet/commit/4e028decb [FIX] evaluation: cache ranges with errors
https://github.com/odoo/o-spreadsheet/commit/40206f030 [FIX] ranges: allow single full col references Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/4862ff70e [FIX] composer: loop fixed full references Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/81f21a3cc [FIX] tokenizer: recognized fixed full headers Task: 3571633
https://github.com/odoo/o-spreadsheet/commit/d3f89b161 [FIX] SelectionInput: release overriden input
https://github.com/odoo/o-spreadsheet/commit/380f06bef [FIX] repeat: faster can redo check
https://github.com/odoo/o-spreadsheet/commit/ab3c0f813 [FIX] HeaderVisibilityPlugin: ensure hidden rows include folded rows Task: 3560662
https://github.com/odoo/o-spreadsheet/commit/24a1383c2 [Fix] FilterEvaluationPlugin: hide all rows of the sheet Task: 3560662
https://github.com/odoo/o-spreadsheet/commit/837cbb48b [FIX] Spreadsheet: Allow shift-scroll to work on mac os Task: 3603771
https://github.com/odoo/o-spreadsheet/commit/d979d8e36 [FIX] error tooltip: display more of the error message Task: 3599337
https://github.com/odoo/o-spreadsheet/commit/be4a2113d [FIX] line chart: non aligned checkbox label
https://github.com/odoo/o-spreadsheet/commit/e2e10a3e8 [FIX] Sheet: fix `ADD_COLUMNS_ROWS` allowDispatch Task: 3603714
https://github.com/odoo/o-spreadsheet/commit/29b5698b3 [FIX] Commands: Add Allowdispatch to `MOVE_COLUMNS_ROWS`
https://github.com/odoo/o-spreadsheet/commit/3238f1262 [FIX] selection: change `MOVE_COLUMNS_ROWS` payload Task: 3603714
https://github.com/odoo/o-spreadsheet/commit/6b79208cd [FIX] Autofill: Automatic autofill based on content Task: 3592859
https://github.com/odoo/o-spreadsheet/commit/d805d512b [FIX] HeaderPositionsUIPlugin: cell wrapping for long text

closes odoo/odoo#144972

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-12-05 21:15:30 +00:00
Deependra Solanki 790532a97e [FIX] web_editor: fix link label not getting updated
Before this commit:

After clicking one button and then clicking another, the link label didn't
update on the link tools.

After this commit:

The link label now updates when clicking from one button to another.

task-3514717

closes odoo/odoo#144954

X-original-commit: 372c86b70b20ee3992e6376d9b6dba3c3a4b78bc
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-05 21:15:28 +00:00
Katherine Zaoral 5483208d02 [FIX] l10n_ar: problem with precision on rate
Description:
This pull request addresses the inconsistency observed in the rounding behavior of currency rates within Odoo applications and their corresponding PDF outputs. The current implementation leads to a discrepancy that can affect financial accuracy and reporting.

Current Behavior:
In Odoo, when rounding currency rates, the system is set to round up values. However, when these values are transferred to a PDF format, a truncation method is used instead of rounding up. This inconsistency in the rounding method can result in a misalignment of financial data between the system and the generated reports.

Expected Behavior:
The intended behavior is to standardize the rounding process across both Odoo and PDF outputs. By ensuring that both platforms employ the same rounding mechanism, we can maintain data integrity and reliability in financial reporting.

Proposed Solution:
The code modification proposed removes the explicit precision definition on the l10n_ar_currency_rate field. This change will allow Odoo to handle the precision based on the default rounding method defined elsewhere in the system, thereby synchronizing the rounding behavior with that of the PDF output.

closes odoo/odoo#140169

closes odoo/odoo#144939

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-12-05 21:15:27 +00:00
Gabriel de Paula Felix (gdpf) 3a4f7eaf35 [FIX] microsoft_calendar: recurrence outliers blocking sync restart and account reset
Before this commit, when restarting the synchronization, recurrence outliers were blocking the synchronization restarting because they were being considered as complete recurrences, although they must be treated as single events. Additionaly, when resetting the Outlook account, choosing to delete events in Odoo should not be allowed since recurrence outliers must be treated as single events.

After this commit, this issue is now solved by adding the 'dont_notify' param in the context to skip the validation of single events when restarting the sync. Additionaly, when resetting the Outlook account, the forbiddance of deleting events in Odoo is not a blocking point anymore.

closes odoo/odoo#144928

Task-id: 3617978
X-original-commit: c0e1bbe
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-12-05 21:15:24 +00:00
Surabhi Varma 009c4c6a78 [IMP] l10n_in_edi: error for partner with it's name
Before this commit
================
Before only error message was displayed, but not the partner's name for which it
was causing error

After this commit
===============
After changes the partner's name is displayed along with the error message

task-3293271

closes odoo/odoo#144915

X-original-commit: 5f1961ef2ca97a4a794685b343bb2236caaa7561
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-12-05 21:15:23 +00:00
Sébastien Theys 4d00cedaca [FIX] mail: fix race condition in "make voice message in chat"
runbot-46626

closes odoo/odoo#144901

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-12-05 21:15:22 +00:00
Victor Piryns (pivi) 34bd5d5655 [FIX] mail: abort ignored name_search RPC in "assign to" cmd palette
Issue:
When using the command palette to assign an user to a task, a
"spinning wheel" animation may show up even when everything seems to
have been loaded.

Steps to reproduce:
- Install Project
- For testing, add a `time.sleep(5)` in the
  `_name_search` of `'res.users'` to simulate a slow `name_search`
  (instead of populating).
- Open your browser's networking tab.
- Open a form view of a task, press Ctrl+K, Alt+I
- Start typing an user name
- Notice that all `name_search` requests are being processed, even
  if only the results of the last one are used. You may also notice
  the loading animation on the client.

Cause:
When using the cmd palette, when typing an user name, we are
sending RPC requests to the `name_search` of the `'res.users'` model.
The issue is that the requests are not aborted when it is
superseded by a new search value. This can lead to issues in a
large database where short search strings matches too many records,
therefor is generally slow. This can confuse the end user, as a
"spinning wheel" can show up, but the result are already present
(because a subsequent request gave back results faster than
the previous request, which is often the case because a more
elaborate search value matches less records, therefor is faster for
the DB to process). This use case also hogs workers uselessly for
results that are going to be ignored.

Fix:
Store the last running RPC and abort it when making a subsequent
call to it with new search values and the request hadn't complete.

Affected versions:
16.0 up to master = saas-17.1

Reference:
task-3532458

closes odoo/odoo#144900

X-original-commit: 2391d7ffc3dfe760c1ba75b7b2cbbedebff5f347
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-12-05 21:15:21 +00:00
Rodolpho Lima 12f5333c24 [FIX] web_editor: link label on preview
Before this commit, when the link dialog was opened in order to edit an
existing link, the label shown in the preview section was the link's
URL instead of its label.

This happened because `_adaptPreview` (called by `start` -> `_setUrl` ->
`_onURLInput`) was called before the label input field was set (and an
empty value defaults to the link's URL).

task-3563608

closes odoo/odoo#144884

X-original-commit: 6540d5feac2fd8f4a9650288e10e3c264101fa8a
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
2023-12-05 21:15:20 +00:00