Tuesday, April 2, 2024
39 changes
4 changes
Resolved issues and error corrections
This update tidies how the website editor manages link preview behavior and event cleanup. It reduces the risk of editor actions interfering with other page behavior, helping keep editing more reliable without changing visible features.
Original PR description
In preparation of https://github.com/odoo/odoo/pull/98429
This fixes an internal test issue affecting analytic reporting when accounting permissions are present. It ensures the test uses the right access group when available, helping keep validation reliable without changing normal user behavior.
Original PR description
The fields debit and credit are shown in analytic. They are hidden when account is installed if you don't have the group, which is the default. When account_accountant is installed, then the group is given by default. To fix the test on debit and credit, we just give the group if it exists. Linked to runbot error 61019 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an internal timing issue that could make live chat-related automated tests fail unpredictably. It helps maintain confidence in the quality checks without changing how users experience the product.
Original PR description
missing last_interest_dt of channel member can lead to unwanted unpinned channel in test due to race condition. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change removes a duplicate Inventory page path that could cause errors when users refreshed the page or shared a link. It also adds an extra check to prevent similar duplicate paths from being created in the future, improving navigation reliability.
Original PR description
Since [1], a duplicate path `inventory` was introduced, this leads to errors when reloading the page, or when a URL is shared. Normally, duplicated path should be impossible due to the unique SQL constraint, added in [2]. But, the tables ir_act_window, ir_act_report_xml, ir_act_url, ir_act_server and ir_act_client inherit from table ir_actions (see base_data.sql). And a big limitation of the postgresql inheritance feature is that unique indexes only apply to the single tables, and not across all the tables, for more information see [3]. This commit, removes the duplicated path, and add a python api constraint, to check the uniqueness of the path. [1] https://github.com/odoo/odoo/commit/814d2dc6ac5c06403ae5d2133d572a6b01edc1c0 [2] https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f [3] https://www.postgresql.org/docs/14/ddl-inherit.html#DDL-INHERIT-CAVEATS
1 change
Resolved issues and error corrections
This update resolves an issue where users couldn't modify or remove products from the catalog view when multiple line items were added. The fix adds a necessary condition to allow updates and removals, ensuring a smoother user experience when managing multiple items within the catalog.
Original PR description
**Before this PR:** When more than 1 line item is added, users are unable to update or remove products from the catalog view. **Technical Reason:** There is a function _is_readonly() that returns True if there are multiple line items, and because of this, the value of props.readOnly becomes True which prevents users from updating the products in catalog view. **Solution:** Adding one more condition in account_move_line to satisfy the desired behavior. **After this PR:** The users can update or remove the products from the catalog view if there are multiple line items. **Task**-3806509
3 changes
Resolved issues and error corrections
31 changes
Resolved issues and error corrections
This update adjusts performance test thresholds for the Appointment HR module to account for a change in how website menus are cached. When the Help Desk module is installed, the menu now contains special links that prevent caching, resulting in more database queries. The fix increases the acceptable query count in tests to reflect this new behavior.
Original PR description
[This first commit] fixed an issue with the website menu cache. The menu is not cached anymore if there is a record like URL in the it. When `website_helpdesk` module is installed, since `saas-16.3`, the menu contains a record like URL which disable the menu cache and increase the number of queries. The solution is to increase the max number of queries even if a better solution would be to remove the `Help` link from the menu but we can't do that because `appointment_hr` doesn't depend on `website`. [This first commit]: https://github.com/odoo/odoo/commit/43576cd424b6d0fc7da01142b5e6550e371ad1ff runbot-60956 runbot-59981 Forward-Port-Of: odoo/enterprise#59618
This change corrects spreadsheet dashboard and template files where pivot function names had been renamed unnecessarily or incorrectly. It helps keep dashboards working as expected while relying on the existing client-side upgrade process to handle function name updates automatically.
Original PR description
Partial revert of a6d2b0dc in which pivot functions were renamed. However, some were badly renamed in dashboard json files. It turns out we didn't even had to rename the functions in json files as the (client-side) upgrade script already takes care of that. Task: 3837323
This fixes the subscription renewal flow for the 'Send & try to charge' option. If an automatic payment attempt fails, the invoice is still created and sent manually so customers and staff do not lose track of the renewal charge.
Original PR description
Create a subscription model with 'Create invoice' option set to 'Send & try to charge'. Create a subscription product based on the model From Sale generate a sale order with such product, save and confirm. On renew, if the payment is not successfull the invoice will not be generated. Fixing by creating and sending the invoice manually in case the payment fails opw-2199358
Spreadsheet formulas now handle empty cells more consistently by storing them as empty values instead of text. This reduces the risk of incorrect formula behavior and makes spreadsheet data processing more reliable.
Original PR description
In previous commits we were able to change the structure of the formula evaluation payload so that the structure corresponds to the structure of an evaluated cell. This change greatly simplifies the reading of data from a cell when a formula need it. However, the data read from the cells is in some cases modified before being used by the formulas: This is particularly the case for empty cells which are saved as an empty string value, while the value is transformed into null during evaluation. This commit corrects this by directly recording the null value on empty cells. Task: 3685074
This fix adds account 1611 (Crediti per ritenute subite) to the Italian Balance Sheet report. This account, which tracks withholding tax credits, was being created by the system but wasn't appearing on the Balance Sheet, causing incomplete financial reporting. The fix ensures all relevant accounts are now properly displayed in the Balance Sheet.
Original PR description
Account 1611 Crediti per ritenute subite (appoggio) which is created by the l10n_it_edi_withholding module was not referenced in the Balance Sheet. We fix this now. taskid: 3060790 Forward-Port-Of: odoo/enterprise#59148
This fix resolves an issue where views embedded in Knowledge articles fail to load with an access error. The problem occurred when importing views from other modules like Documents because the Knowledge module was overriding the search model needed to retrieve data. The solution restructures the Knowledge search model to work alongside other modules' search models, allowing embedded views to function correctly.
Original PR description
**Step to reproduce:** - Install `Knowledge` and `Documents` modules (for test purpose) - Go to Documents app - Click on Action button -> Knowledge -> Insert view in article - Select any article…
**Step to reproduce:**
- Install `Knowledge` and `Documents` modules (for test purpose)
- Go to Documents app
- Click on Action button -> Knowledge -> Insert view in article
- Select any article
**Issue:**
View is not loaded correctly in the article.
Error message: Something went wrong! The view does not exist or you
are not allowed to access to it.
**Cause:**
In the imported view, we try to retrieve the selected Folders, but this last one need the search model to retrieve the data.
https://github.com/odoo/enterprise/blob/11daa694d4ca51939c2b458bced8ab9d48030ef8/documents/static/src/views/documents_controller_mixin.xml#L5
The method called to retrieve the folders (`getSelectedFolder`) is set on the documents search model (`DocumentsSearchModel`), however, the search model set in the embedded_view is the knowledge search model (`KnowledgeSearchModel`).
**Solution:**
Change the `KnowledgeSearchModel` class into a mixin so it can extend the (potentially) custom search model defined for any embedded view during the mounting process (default to the generic search model), instead of overwriting it.
opw-3752927
Forward-Port-Of: odoo/enterprise#59758A ticket field was incorrectly appearing in the timesheet list when viewing support tickets with timesheet tracking enabled. This fix removes the duplicate field to match the expected behavior and provide a cleaner user interface.
Original PR description
Before this commit, the ticket field is displayed in the sublist view of timesheet when the user is in ticket form view with timesheets feature enabled. This commit hides the ticket field as it was the case base. issue found during the testing of task-2276015
This fix ensures that when a job offer is generated with a specific job and department, those details are correctly transferred to the new employment contract. Previously, the contract was not using the job and department information from the offer, which could result in incorrect contract details. Now the system prioritizes the offer information over the contract template defaults.
Original PR description
Since when we generate an offer, we can provide a specific job and department, that will be set on the user and used in the pdf contract signed. We should also get this job and departement correctly set on the new contract which is not the case for now. So we first choose to use the info comming from the offer before the one from the contract template.
This fix resolves a bug where vendor bill totals (Untaxed Amount, Taxes, and Total) were incorrectly displayed as $0 when manually editing invoice line prices after adding a product. The issue occurred for users without the Units of Measure feature enabled. The fix reorders form fields to ensure proper calculation of invoice totals.
Original PR description
Steps to reproduce: - Install Invoicing - Create a product with $0 cost (e.g. Product X) - Create a vendor bill: * Vendor: [any] * Invoice Lines: - Product: [none] - Label: [anything] - Price: [any]…
Steps to reproduce:
- Install Invoicing
- Create a product with $0 cost (e.g. Product X)
- Create a vendor bill:
* Vendor: [any]
* Invoice Lines:
- Product: [none]
- Label: [anything]
- Price: [any]
- Taxes: [any]
=> The displayed "Untaxed Amount", "Taxes" and "Total" are correct
- Save the vendor bill
- Edit the invoice line of the bill
- Add Product X => "Untaxed Amount", "Taxes" and "Total" are correctly set to 0 as expected
- Change Price to 100 manually
Issue:
"Untaxed Amount", "Taxes" and "Total" stay at $0.
Upon save, "Untaxed Amount" is correctly set to $100, but "Taxes" stays at $0.
If "Units of Measure" option is activated in the Settings (available with Sales, Purchase or Inventory app), the user will be in "uom.group_uom" and the issue will not happen.
Cause:
When the user isn't in "uom.group_uom" group, "product_uom_id" field is declared after "price_unit" field in the view.
Due to that, adding a product in the invoice line and changing the price to $100, will first set "price_unit" to $100 and then set "product_uom_id" that will trigger "_compute_price_unit" method where "price_unit" is recomputed to $0 (its cost).
Solution:
Move "product_uom_id" field before "price_unit" field in the view as it is the case when the user is in "uom.group_uom" group.
opw-3750740
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update resolves a visual issue where the comment box was being incorrectly highlighted when signing reports in the Field Service module. The fix removes unnecessary styling that was causing the unwanted highlight effect, improving the user experience when completing and signing worksheets.
Original PR description
17.0 Steps to reproduce: - install field service - check worksheet option from setting in field service - complete worksheet of any task and click on sign report - click on sign button on portal Issue: - comment box is getting highlight Solution: - remove the position relative styling from comment box Task:3770835
This fix prevents the Google Calendar sync from accidentally removing video call locations that were set in Odoo meetings. Previously, when syncing calendar events from Google, the system would clear any existing Odoo video call information. Now, local video call details are preserved and no longer overwritten during the synchronization process.
Original PR description
The `videocall_location` was accidentally unset when synch from Google, which is not expected ### Step to reproduce 1. From from calendar view of calendar.event, click to open the form view 2. click `Add Odoo meeting` to set discuss videocall location 3. save to create new calendar.event record 4. wait for synch to be done 5. recheck the field `videocall_location` to find its value False ### After this PR The discuss videocall location is no longer overriden with False --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157939
This fix resolves an error that occurred when users tried to create a location record by clicking on a date in the Calendar view while using the homeworking feature. The issue was caused by incorrect use of the calendar API, which has been corrected to use the proper record creation method. Users can now successfully set locations in the calendar without encountering errors.
Original PR description
Versions -------- - 17.0 - saas-17.1 Steps ----- 1. Have `calendar` and `hr_homeworking` installed; 2. go to Calendar; 3. try to set a location by clicking on a date column. Issue ----- Odoo Client Error. Cause ----- The `onDayRender` function calls `onDateClick` to create a record, passing an `info` object lacking the `jsEvent` attribute. Solution -------- Use `this.props.createRecord` instead. opw-3815617
This fix corrects how invoices are downloaded from the customer portal. Previously, downloading an invoice could unintentionally trigger additional processes (like CFDI document generation in Mexico) and show a Print button even when documents weren't ready. Now, downloads only retrieve the invoice file without triggering extra workflows, and the Print button is removed from the portal view to prevent confusion.
Original PR description
Steps to reproduce: - Install l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create an invoice: * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA) * Product: [any…
Steps to reproduce: - Install l10n_mx_edi - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Create an invoice: * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA) * Product: [any product with UNSPSC Category set] - Confirm the invoice - Go to the portal preview of the invoice - Download the invoice from portal Issue: 1) On the invoice, the CFDI document has been generated and processed without notice. Downloading an invoice from portal should only download the invoice. 2) There are 2 buttons on the portal: "Download" and "Print". The "Print" allows to print the invoice, even if it has not been generated and sent yet. Cause: When downloading an invoice from portal, we are going through the "Send & Print" wizard (without displaying it) with only "Download" option checked. However, some localization (e.g. MX) may add specific options that are checked by default (e.g. CFDI), which triggers the corresponding flow. Solution: 1) Make sure that all options of "Send & Print" wizard are deactivated, except "Download". Download existing invoice documents or generate a Pro Forma document when downloading invoice from portal. 2) Remove "Print" button from portal view. opw-3821371 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug that occurred when users sorted a list of records and then tried to delete an item. The system was not properly loading all required field information for records that needed to be moved between pages after deletion, causing the application to crash. Now the system ensures all necessary data is loaded before attempting to delete records.
Original PR description
In some cases, sorting a sub-view list and then deleting one of its rows can cause a traceback. This commit corrects this situation. Here's a way to reproduce the error: - Install `sale_management` -…
In some cases, sorting a sub-view list and then deleting one of its rows can cause a traceback.
This commit corrects this situation.
Here's a way to reproduce the error:
- Install `sale_management`
- Open a quotation
- Put enough elements to have two pages
- Modify the view via debug mode and change the list view limit from "200" to "2".
- Add 4 elements
- Sort with `product_uom_qty` field
- Attempt to delete the second element (i.e. the last element on the first page)
When deleting this line, a traceback is raised
Let's say we have 4 records with the following data
Page 1 (`1 - 2 / 4`):
| ID | Product | Quantity |
|----|---------|----------|
| 1 | Table | 6 |
| 2 | Lamp | 1 |
Page 2 (`3 - 4 / 4`):
| ID | Product | Quantity |
|----|---------|----------|
| 3 | Chair | 4 |
| 4 | Board | 3 |
In this case we have two cached elements: the two elements visible on
the first page.
In the cache we have two complete records, by complete we mean a record
containing all the fields, for example:
```js
{
"1": {
id: "datapoint_4",
...
data: {
sequence: 10,
name: "Table",
product_uom_qty: 6,
display_type: false
...
}
},
"2": {
id: "datapoint_11",
...
data: {
sequence: 10,
name: "Lamp",
product_uom_qty: 1,
display_type: false
...
}
}
}
```
After sorting by quantity, we end up with
Page 1 (`1 - 2 / 4`):
| ID | Product | Quantity |
|----|---------|----------|
| 2 | Lamp | 1 |
| 4 | Board | 3 |
Page 2 (`3 - 4 / 4`):
| ID | Product | Quantity |
|----|---------|----------|
| 3 | Chair | 4 |
| 1 | Table | 6 |
It also changes at cache level, since we sorted via the `product_uom_qty`
field, we had to go and read the records on the next page (despite the
fact that they weren't displayed).
But as we only need the quantity information, we only fetch this field
from the records on the following pages.
In terms of cache, we have something like this
```js
{
"1": {
id: "datapoint_45",
...
data: {
sequence: 10,
name: "Lamp",
product_uom_qty: 1,
display_type: false
...
}
},
"3": {
id: "datapoint_16",
...
data: {
sequence: 10,
name: "Board",
product_uom_qty: 3,
display_type: false
...
}
},
"4": {
id: "datapoint_32",
...
data: {
sequence: 10,
name: "Table",
product_uom_qty: 6,
display_type: false
...
}
},
"2": { //Chair
id: "datapoint_1",
...
data: {
sequence: 10,
product_uom_qty: 4,
}
}
}
```
We therefore have one new incomplete record in the cache
The problem will occur when we try to delete a record from the first page,
if we delete `Board`, to have this
Page 1 (`1 - 2 / 3`):
| ID | Product | Quantity |
|----|---------|----------|
| 2 | Lamp | 1 |
| 3 | Chair | 4 |
Page 2 (`3 - 3 / 3`):
| ID | Product | Quantity |
|----|---------|----------|
| 1 | Table | 6 |
So we'll have to move the table that was on page 2 to page 1 (in our
case `Table`), except that when we render the list we'll have to compute
the required/readonly/invisible elements, and if we have a field that
has a readonly with the condition `not display_type` in our view, this
will cause a traceback because in the cache we only have this
```js
"4": { //Chair
id: "datapoint_32",
...
data: {
sequence: 10,
product_uom_qty: 4,
}
},
```
`display_type` is definitely not in the data because we considered this
cached record to be complete.
This commit modifies the `StaticList._applyCommands` function to create
datapoints for all records that are not **entirely** loaded via `StaticList._getResIdsToLoad`.
https://github.com/odoo/odoo/blob/00898aef4dbeb469e0cec7eaea387de2755c6426/addons/web/static/src/model/relational_model/static_list.js#L898-L912
opw-3771077This fix ensures that when an order is refunded in the Point of Sale system, the refund payment method and rounding matches the original order exactly. Previously, refunds were being incorrectly rounded even when the original order used multiple payment methods with different rounding rules, causing discrepancies between the original order total and the refund amount.
Original PR description
Current behavior: When you refund an order that was paid with bank and so not rounded, the refund is rounded wich result in a difference between the original order and the refund. This also happens when the original order was paid with multiple payments and one of them was not rounded and the other was. The refund will be rounded as one single payment. This also results in a difference between the original order and the refund. Steps to reproduce: - Setup a rounding method with a precision of 5.0 - Create a product with a price of 138.0 - Open the POS and add the product to the order - Pay the order with 2 payments, one bank of 55 and one cash that will be rounded to 80. - Validate the order - Go in the backend and refund the order - The refund will be rounded to 135.0 opw-3701574 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159129 Forward-Port-Of: odoo/odoo#155619
This fix improves the Point of Sale experience by displaying error messages when data fails to load, instead of leaving the system stuck on a loading screen. Users will now see what went wrong and can take appropriate action, rather than being confused by an unresponsive interface.
Original PR description
Before this commit, if there was an error, the PoS stays on the loading page which was confusing for the user. owp-3834647 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves a system error that occurred in the HR module when an employee had no contracts. The error happened because the system tried to compare a false value with a date, which isn't allowed. The fix adds a check to prevent this comparison from occurring when contract data is missing.
Original PR description
### Before This PR if there the new_hire_field is False(in case of hr_contract for example if there are not contracts), an error appear. ### After THIS PR This Commit will check that the field is not false so the error is not raised --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that when job applicants retake a survey multiple times, all survey responses are properly linked to the applicant's record. Previously, only the first survey response was connected to the applicant, making it impossible to view subsequent attempts. Now all survey retakes will be correctly associated with the applicant, allowing hiring teams to review the latest feedback.
Original PR description
Description of the issue/feature this PR addresses: module: hr_recruitment_survey Current behavior before PR: when retaking the survey, the survey input not map with the applicant id, so if you retake 5 time, only the 1st survey has value of applicant_id Desired behavior after PR is merged: all survey retakes have the same applicant id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where a horizontal scrollbar would unexpectedly appear when a background video and animated elements are used together on a webpage. The problem occurred due to timing issues when the video was loading. The fix ensures the video dimensions are properly recalculated after the video finishes loading, eliminating the scrollbar issue.
Original PR description
When a background video and an animation coming from the left or the right are on a page at the same time, there sometimes is a horizontal scrollbar that appears for no reason. It can happen at any…
When a background video and an animation coming from the left or the right are on a page at the same time, there sometimes is a horizontal scrollbar that appears for no reason. It can happen at any screen size but more frequently near 1000px and below. This issue seems to happen on Chrome only. It seems to be a race condition between the calls to the `_adjustIframe` function in the `backgroundVideo` public widget. Indeed, this function is called when the video is added in the DOM and each time the screen is resized. When an animation is played, it triggers a resize of the window when it is over, which therefore calls `_adjustIframe`. When the animation comes from the right/left of the screen, the animated element is translated from outside the page; the page width is therefore bigger but its overflow is prevented. When the video is loaded, the loading placeholder is removed. Depending on the time it takes to it to fully load, if the animation ends before it, the iframe is adjusted before the placeholder removal, leaving the iframe wrongly adjusted when it is finally removed. Note that it is hypothetical, as everything refreshes when inspecting the DOM, making the scrollbar disappear. But this proves that no element is really overflowing, so it seems to be a value refreshing issue. This commit adds a call to `_adjustIframe` when the video has loaded, to make sure its dimensions are recomputed/refreshed, preventing the scrollbar to appear. Steps to reproduce: - Drop a "Text-Image" snippet. - Set a background video to it. - Add the "Fade In-Right" animation to the image column. - Save and then resize down the screen to 1000px or below. - Refresh. => When the video is loaded, a horizontal scrollbar may appear. If not, refresh until it does. opw-3487117 Forward-Port-Of: odoo/odoo#159193
This fix resolves a system error that occurred when users tried to change the end date while creating a work entry for a newly hired employee who doesn't yet have a contract assigned. The system now handles this scenario gracefully by providing a default value instead of crashing.
Original PR description
This traceback arises when the user changes the date with a new employee of no contract while creating a new Work Entry. To reproduce this issue: 1) Install `hr_work_entry_contract` 2) Open `payroll`…
This traceback arises when the user changes the date with a new employee of no contract
while creating a new Work Entry.
To reproduce this issue:
1) Install `hr_work_entry_contract`
2) Open `payroll` and create a new `Work Entry`
3) Select `Work Entry Type` as `Unpaid` and create a new employee
4) Now try to change the `end date`
Error:-
```
KeyError: False
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1074, in onchange
todo = [
File "addons/web/models/models.py", line 1077, in <listcomp>
if field_name not in done and snapshot0.has_changed(field_name)
File "addons/web/models/models.py", line 1190, in has_changed
return self[field_name] != self.record[field_name]
File "odoo/models.py", line 6669, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1138, in __get__
self.recompute(record)
File "odoo/fields.py", line 1353, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1326, in apply_except_missing
func(records)
File "odoo/fields.py", line 1375, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4982, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 102, in determine
return needle(*args)
File "addons/hr_work_entry/models/hr_work_entry.py", line 84, in _compute_duration
durations = self._get_duration_batch()
File "home/odoo/src/enterprise/saas-17.1/hr_work_entry_contract_planning/models/hr_work_entry.py", line 46, in _get_duration_batch
res.update(super(HrWorkEntry, super_we)._get_duration_batch())
File "addons/hr_work_entry_contract/models/hr_work_entry.py", line 119, in _get_duration_batch
result[work_entry.id] = mapped_contract_data[(date_start, date_stop)][calendar][employee.id]['hours']
```
On the `_get_duration_batch` method, when the user creates a new employee without a contract,
the calendar remains an empty recordset.
which leads to the traceback from the below lines.
https://github.com/odoo/odoo/blob/a277faa2ffab7559fcbad95fcc1e8fd6a26d756b/addons/hr_work_entry_contract/models/hr_work_entry.py#L110-L112
After applying this commit will resolve the issue by making the code more robust
and gives the default value for `work_entry.id`.
sentry-5095168051
Forward-Port-Of: odoo/odoo#159276The Point of Sale numpad was occasionally triggering events when it shouldn't, causing unexpected behavior. This fix adds a validation check to ensure the numpad only processes events when it's properly initialized and ready to receive input. This improves the reliability and user experience of the checkout process.
Original PR description
The numpad in the PoS was sometimes handling events when it was not supposed to, leading to unexpected behavior. This was due to the fact we did not check if there was a buffer holder for the numpad before triggering the event handler. The check is now done by adding a check in the _onKeyboardInput method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159619
This fix corrects the layout spacing in the project task view when task dependencies are enabled. The title field was appearing too far from the left edge because all fields had equal width. The fix adjusts the width of the priority and state fields to restore proper alignment and improve the visual appearance of the task display.
Original PR description
Versions: --------- saas-16.3 Steps to Reproduce: ------------- - open project - open project settings and mark task dependencies - open task Issue: ------ - The title is super far from the left. Cause: -------- - Every field have the same width. Fix: -------- - We fix the width of priority and state. task-3761269 Forward-Port-Of: odoo/odoo#156441
Fixed a bug where the 'propagate_cancel' checkbox in purchase orders was hidden from users, preventing them from controlling whether canceling a purchase order should also cancel related sales order deliveries. Users can now access and modify this setting to manage how purchase order cancellations affect their sales operations.
Original PR description
Activate "Reception Report" feature Create a SO for a storable product, confirm. Create a PO for the same product. Confirm the PO and check the delivery, open the "Allocation" report Assign the Product to the delivery of the SO. Go back to the PO and cancel the order, delivery of the SO will be cancelled. Issue: Currently the user cannot modify this behavior as the `propagate_cancel` checkbox is unaccessible opw-3733512 Forward-Port-Of: odoo/odoo#159782 Forward-Port-Of: odoo/odoo#158587
This fix restores the allocated time label that was missing from the project task portal view when using day-based timesheet encoding. Previously, the label only appeared for non-day encoding methods, causing confusion for users who couldn't see how much time was allocated to their tasks. The fix now displays the label consistently regardless of the timesheet encoding method used.
Original PR description
Versions: ------------ saas-16.4 Steps to Reproduce: --------------- - open project - create a project and allow timesheet - open timesheet and change encoding method to days/half days - create a task in the project and set allocated time - open portal view of the task Issue: ------------ - There is no label for allocated time. Cause: ---------- - Condition was added in this commit 82a85d42c86cffcd6e96b0712c8ff9a221f25d87 to show the label if encoding method is not in days. Fix: -------- - We apply the label for both encoding method of timesheet. task-3761269 Forward-Port-Of: odoo/odoo#156449
This update fixes test failures in the product variants feature that occurred when running tests without demo data. The fix ensures that variant-related tests run reliably in all environments, improving the stability of the product module's testing process.
Original PR description
Some tests on dynamic variants mechanism didn't pass on test without demo data due to odoo/odoo#143543. Forward-Port-Of: odoo/odoo#159818 Forward-Port-Of: odoo/odoo#159709
This fix corrects a bug in how the website editor detects when page options need to reload. A previous update accidentally passed an array instead of properly checking individual option methods, which could cause crashes in customized versions. This fix ensures the reload detection works correctly and prevents potential system failures.
Original PR description
Follow-up of [1]. Commit [2] refactored the way we check if an option update needs to trigger a page reload: if the option is marked as a page option (`data-page-options="true"` on the option's main…
Follow-up of [1]. Commit [2] refactored the way we check if an option update needs to trigger a page reload: if the option is marked as a page option (`data-page-options="true"` on the option's main `<div>`), then it will reload whatever the method used if there is a `reload` parameter. Note that this `reload` parameter does not make much sense anymore, it should be reviewed/removed in master. Problem: [2] made a mistake in its implementation, pushing an array instead of concatenating it. This worked by chance, as instead of asking "does this option method requires a reload", it was asking "does this set of option methods requires a reload"... and in that case, the code is fallbacking on retrieving common parameters, which `reload` likely is without custo. This could have been fixed in master only. Given the very low risk of breaking anything critical updating this code, it was chosen to prevent a potential crash in custo (which could occur as we give a wrong parameter type to a main method) and allow overrides to make `reload` a specific parameter for a specific method without the need of `data-reload` added in the DOM. [1]: https://github.com/odoo/odoo/commit/556ae457b02e9c077d09fa9c3f9f1e6c6e26b345 [2]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af#diff-70f7fe38208aa7fe678f18e329d3c11b70065dee723921352b6005774e8bab53R456 Forward-Port-Of: odoo/odoo#159640
This fix resolves crashes that occurred when checking if an employee is newly hired in the HR module. The issue happened because the system was inconsistent in handling different data types (dates, datetimes, and boolean values) when determining new hire status. After this fix, the newly hired field can be reliably queried without errors.
Original PR description
Description of the issue/feature this PR addresses: - This PR addresses an issue in the `hr_contract` module where the `_compute_newly_hired` method can crash depending on the value type of the…
Description of the issue/feature this PR addresses: - This PR addresses an issue in the `hr_contract` module where the `_compute_newly_hired` method can crash depending on the value type of the `new_hire_field` field. Current behavior before PR: - In an Odoo instance with `hr_payroll` installed, when querying the `newly_hired` field on the `HrEmployeeBase` model, the request fails with an error (refer to issue #154849). - This failure is due to a change in the field used by Odoo to determine if the employee is newly hired, from a Datetime (`created_at`) to a Date (`first_contract_date`). - The request also fails if the employee has never been associated with any contract because the return value is a boolean. Desired behavior after PR is merged: - This PR ensures that the `newly_hired` field can be queried without causing a crash, correctly indicating if an employee is newly hired. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that when approving expense reports from the list view, the system properly validates that all required analytic accounting information is complete, just as it does in the form view. Previously, expense reports could be approved without proper analytic data when using the list view, creating inconsistencies in financial records.
Original PR description
**Steps to reproduce:** - Install Accouting and Expenses - Activate "Analytic Accounting" in Accounting settings - Go to "Accounting / Configuration / Analytic Accounting / Analytic Plans" - Create…
**Steps to reproduce:** - Install Accouting and Expenses - Activate "Analytic Accounting" in Accounting settings - Go to "Accounting / Configuration / Analytic Accounting / Analytic Plans" - Create an analytic plan with the following line: * Domain: Expense * Applicability: Mandatory - Create an analytic account from the plan via "Analytic Accounts" smart button - Create an expense without analytic - Create a report from it - Submit it to manager - Try to approve it => An expected Validation Error will raise: "One or more lines require a 100% analytic distribution." - Go to "Expenses / Expense Reports" (list view) - Select the created expense report - Try to approve it **Issue:** The report will be approved even if there is no analytic configured on it. **Cause:** "validate_analytic" option is not passed in the context when approving the report from list view as it is done in form view. opw-3806787 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160013 Forward-Port-Of: odoo/odoo#159043
This update fixes a display issue in the direct messaging search feature where long user names were not properly wrapped, causing UI problems. The fix ensures that user names that exceed the available space are now truncated appropriately, improving the overall user experience and interface appearance.
Original PR description
**Current behavior before PR:** Long user names in direct messaging search are not wrapped, leading to UI display issues. **Desired behavior after PR is merged:** Resolved the issue where long user names were not properly wrapped in direct messaging search. Now, when a user name exceeds the allotted space, it is truncated. Task-3748791 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#158769
This fix prevents readonly fields from being saved when updating records in paginated list views within forms. Previously, when an automated process tried to update a record on a page the user hadn't viewed yet, readonly field values were incorrectly being sent to the server, causing operation errors. The fix now properly evaluates which fields are truly readonly before saving, preventing these invalid operations.
Original PR description
Have an x2many with several pages containing a field with a readonly modifier (in the view, not in the field definition), e.g. `readonly="1"` in the arch. Have an onchange that returns an UPDATE…
Have an x2many with several pages containing a field with a readonly modifier (in the view, not in the field definition), e.g. `readonly="1"` in the arch. Have an onchange that returns an UPDATE command for a record that isn't in page 1 (so a record we haven't read), with a value for that readonly field. Before this commit, the value was sent in the UPDATE command, even though readonly fields shouldn't be sent.
The difficulty here is that we can't always evaluate those readonly expressions, as they can depend on other fields, which we didn't read if the record is in a page we didn't browse to yet. However, "static" expression like `"1"`, or `"context.get('something')"` can totally be evaluated, and they should. This is what this commit does.
Steps to reproduce the issue:
- Install mrp
- Go to Manufacturing > Products > Bill of Materials
- New:
- Product: quick create "B1"
- Components: two lines: quick create "C1" and "C2" - Save
- Manufacturing > Operations > Manufacturing Orders
- New [in that form view, set the limit of the x2many to 1]:
- Product: "B1"
- Save - Change quantity to 2 - Save => Invalid Operation
opw 3819253
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix corrects how inventory quantities are calculated when unpacking materials in manufacturing operations. Previously, the system was incorrectly tracking reserved units when components were packed and then partially moved, causing inventory counts to be wrong. This ensures accurate inventory visibility and prevents discrepancies in stock levels during multi-step manufacturing processes.
Original PR description
Steps to reproduce: - Install MRP - Enable packages and multi-step routes - Enable two steps manufacturing - Create a component and a product - Create a BOM for the product and add the component - Make an MO for 100 units of the product - Go to the picking and make a move of 20 units of the component with a destination package - Put in pack - Create the backorder and validate the transfer of the remaining components - Go back to the MO Issues: Units reserved is wrong. The problem is when we are unpacking, we were using result package inside the key. But what we want is to remove quantity from the package the quantity originate from. opw-3759006 Forward-Port-Of: odoo/odoo#159810 Forward-Port-Of: odoo/odoo#158166
This fix resolves crashes that occurred when checking if an employee is newly hired in the HR module. The issue happened because the system was not properly handling different data types (dates, datetimes, and empty values) when determining new hire status. After this fix, the newly hired field can be reliably queried without errors.
Original PR description
Description of the issue/feature this PR addresses: - This PR addresses an issue in the `hr_contract` module where the `_compute_newly_hired` method can crash depending on the value type of the…
Description of the issue/feature this PR addresses: - This PR addresses an issue in the `hr_contract` module where the `_compute_newly_hired` method can crash depending on the value type of the `new_hire_field` field. Current behavior before PR: - In an Odoo instance with `hr_payroll` installed, when querying the `newly_hired` field on the `HrEmployeeBase` model, the request fails with an error (refer to issue #154849). - This failure is due to a change in the field used by Odoo to determine if the employee is newly hired, from a Datetime (`created_at`) to a Date (`first_contract_date`). - The request also fails if the employee has never been associated with any contract because the return value is a boolean or none. Desired behavior after PR is merged: - This PR ensures that the `newly_hired` field can be queried without causing a crash, correctly indicating if an employee is newly hired. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug where custom code using the button loading effect feature could cause the system to crash. The fix ensures that if the feature is used in an unexpected way, it will simply do nothing instead of breaking, maintaining system stability for users with customizations.
Original PR description
Follow-up of [1] which changed code in stable in such a way it could break when the function was used in a way it was not intended to in some custom code. Note that the function could also be used by giving a string selector to it, that will not work anymore: but instead of crashing, this commit will just make it do nothing (it is only about adding a button loading effect anyway). [1]: https://github.com/odoo/odoo/commit/8bd51d060a48378652ae10c57a1949c3bb7d78de Forward-Port-Of: odoo/odoo#160178
This update fixes how taxes are calculated on product prices in the online store to match the standard sales process. Previously, the website store used an older tax calculation method that didn't handle all tax scenarios correctly, particularly when taxes were included in prices. Now all tax calculations use a single, more reliable method that properly handles complex tax situations.
Original PR description
Standard `sale` tax flows rely on `_get_tax_included_price_unit`, whereas part of `website_sale` flows do, while another part relies on `_fix_tax_included_price_company`, which doesn't handle some advanced cases (fiscal position mapping of price_included taxes). This commit drops the use of `_fix_tax_included_price_company` in website_sale, to only use the newest API of `_get_tax_included_price_unit`, supposed to handle more cases. Also makes all taxes computation go through a single entry point, `_apply_taxes_to_price`, already used for `combination_info` logic (/shop/product), but not in `_get_sales_prices` (/shop page). opw-3700803 Fixes #155162 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160125 Forward-Port-Of: odoo/odoo#159122