Daily updates from Odoo
Wednesday, February 28, 2024
24 changes · 17.0
Resolved issues and error corrections
This fix resolves an issue where users couldn't select an approver when creating a new approval request. The approver field was incorrectly locked as read-only when no approver was initially selected. Now users can properly add and select approvers when setting up approval requests.
Original PR description
steps to reproduce: 1. Go to approvals with no rights 2. create a new approval request 3. add an approver -> the approver cannot be selected because the line is readonly expected behavior: the approver can be selected Explaination of the issue: The field can_edit_user_id is set to False when no user is selected because when you add a line no user is selected by default. behavior after the fix: the approver can be selected task-3602617
This fix ensures that the headers in Kenya payroll Excel reports now display in the user's local language instead of English. The translation strings were added to the payroll system's language files, improving the user experience for non-English speaking users in Kenya.
Original PR description
the headers of the xlsx report were not translated this commit fixes that by adding the missing translations into the controller task-3718923
This fix corrects an issue where the rental duration shown on product pages didn't match the date range selected in the rental search filter. When customers select a rental period and view a product, the duration text now accurately reflects their selected dates, improving the shopping experience and reducing confusion.
Original PR description
Issue: ====== Duration of rental product doesn't correspond to the range displayed in the daterange picker. Steps to reproduce the issue: ============================= - Install rental and ecommerce - Go to website/shop and add `rental search` snippet and save the page. - Select a period in the rental search and click on any product displayed. - The range is equal the the range selected but the duration in words isn't correct. Solution: ========= We call `_get_combination_info` with the `start_date` and `end_date` in the context to get the corrent `duration` and `unit`. opw-3601959 Forward-Port-Of: odoo/enterprise#57173 Forward-Port-Of: odoo/enterprise#52687
This fix resolves a confusing error that occurred when creating a helpdesk team. Users could delete team members and switch assignment methods, but then be unable to save because the system required members even though the form didn't allow entering them. The fix automatically provides a default member value when needed, so the form behaves consistently with what users see on screen.
Original PR description
**Current behavior:** When creating a new helpdesk team, if you have selected Random or Balanced as an Assignment Method and delete the default user in the avatar selection box then switch to the…
**Current behavior:** When creating a new helpdesk team, if you have selected Random or Balanced as an Assignment Method and delete the default user in the avatar selection box then switch to the Manual assignment method option, you will simultaneously be unable to assign a user (as the selection box disappears) and required to provide at least one user before being saving. **Expected behavior:** The form should not require a value for a field when the UI does not permit one to be entered. **Steps to reproduce:** 1. In the Helpdesk app, go to configuration -> Helpdesk Teams 2. Create a new team, select either Random or Balanced as the Assignment Method, delete the default value, then switch back to Manual assignment 3. Try to save the record **Cause of the issue:** member_ids is a required attribute of the helpdesk.team model despite the form view hiding the selection box when the Manual assignment option is selected (implying it is not required). **Fix:** Create an _onchange() method which populates the member_ids field with a default value when the user switches to Manual assignment with no member_ids assigned. opw-3672587 Forward-Port-Of: odoo/enterprise#57608 Forward-Port-Of: odoo/enterprise#55767
This update corrects a configuration issue in the HR Payroll Holidays module where its test class was incorrectly inheriting from an invoicing test class, even though the module doesn't use accounting features. This fix ensures the module's tests run properly without unnecessary dependencies.
Original PR description
This fixes an issue with the common test class in hr_payroll_holidays which is set to inherit from the invoicing test common class while the module does not depend on the account module. Forward-Port-Of: odoo/enterprise#57202
This update fixes a test failure in the report editor that occurred when running without demo data. The test was crashing because it expected an image to be set on a partner record, but this requirement wasn't essential to what the test was actually checking. By removing this unnecessary dependency, the test now runs reliably in all environments.
Original PR description
Before this commit, the test test_add_non_searchable_field crashed in no-demo mode because an image was not set on a partner, and that had only an effect on a sanity check in the business code rather than an effect on the relavance of the test After this commit, the test doesn't crash in demo mode. runbot-error-57397 runbot-error-57430 runbot-error-57432 runbot-error-57822 runbot-error-58218 Forward-Port-Of: odoo/enterprise#57559
This update fixes how the system checks user permissions to access addenda fields in Mexico EDI. Previously, only admin users could access addendas, but the permission check was too restrictive. The fix now properly checks if a user has the actual permission to view addendas, rather than requiring them to be an administrator, allowing authorized non-admin users to access this feature.
Original PR description
Fix https://github.com/odoo/enterprise/commit/b9120ba7292a2d9cdb636bf302b22901bf0ca08f prevents an error poping when a user with no read rights would access the addenda field. This was prevented by checking if the user is admin, which is by default the only group that can read addendas (ir.ui.views). But when the website module is installed, some new permissions rules are added for the ir.ui.view model. This means that on db's with website installed, a non admin user could access the addenda field without errors, while now they cannot anymore if they are not admins. This fix check if the user has or has not right to ir.ui.views instead of checking if he is admin. Forward-Port-Of: odoo/enterprise#57600 Forward-Port-Of: odoo/enterprise#56376
This fix corrects how lunch breaks are accounted for when automatically generating work entries from employee attendance records. Previously, lunch time was not being deducted from total work hours, which could result in inaccurate work entry records. This ensures employees' actual working hours are correctly calculated.
Original PR description
When generating work entries based on attendances, lunch time was not being taken into consideration, we fix this issue in the version where lunch time was introduced Forward-Port-Of: odoo/enterprise#57217
This fix prevents users from saving approval requests with a start date that occurs after the end date. Previously, the system would accept invalid date combinations without warning. Now, the system will display an error message if users attempt to save an approval with impossible dates, ensuring data integrity and preventing scheduling errors.
Original PR description
Steps to reproduce the bug: - Go to Approvals - Create a new approval request - Set the start date after the end date - Save - the record is saved without any error or chenge in the dates Expected behavior: The system should not allow to save the record with the start date after the end date or it should show an error message Fix: Add constrains on the date fields to avoid saving the record with the start date after the end date and raise a ValidationError if the user tries to save the record with the start date after the end date task-3650931 Forward-Port-Of: odoo/enterprise#55851
Fixed an issue where file attachments added to HR Appraisals email templates were not being sent with appraisal emails. When users send appraisal emails using a template with attachments, those files will now be properly included in the message.
Original PR description
**Current behavior:** Modifying an email template associated with the Appraisals app will not result in that attachment being sent when a message is composed using that the template. **Expected…
**Current behavior:** Modifying an email template associated with the Appraisals app will not result in that attachment being sent when a message is composed using that the template. **Expected behavior:** The attachment(s) of a certain template will be sent when an email is triggered that references that template. **Steps to reproduce:** 1. Modify an HR Appraisals email template so that it has some file attachment 2. In the Appraisals app, create a new appraisal that will use the modified email template 3. Send the email, observe in the chatter sidebar or in the list of emails in settings that the attachment linked to the relevant template was not sent **Cause of the issue:** The attachment_ids field of the request.appraisal model was not passed as a kwarg to the action_invite() method, which is where the email gets composed and posted. **Fix:** Add the missing attachment_ids argument to this method. opw-3644820 Forward-Port-Of: odoo/enterprise#57402 Forward-Port-Of: odoo/enterprise#55977
This update removes print-related styling rules from the backend system that were only needed for survey frontend pages. By isolating these styles to just the survey module where they're actually used, the change prevents unintended formatting effects across the rest of Odoo's backend interface.
Original PR description
PURPOSE ======= The survey addon assets contain some global rules for print mode, that are present in the global backend stack. In Odoo 15.2, we put these rules in `survey_templates_results.scss`.…
PURPOSE ======= The survey addon assets contain some global rules for print mode, that are present in the global backend stack. In Odoo 15.2, we put these rules in `survey_templates_results.scss`. Then, in later versions of Odoo we updated it wih more 'print mode' global rules. As these rules are specific to the survey addon, we don't want them to affect the (whole) Odoo backend. HOW TO FIX ========== It seems rules defined in `survey_templates_results.scss` are not used in survey backend views, but specific to frontend views. `survey_templates_results.scss` is also part of the `survey.survey_assets` bundle. This bundle is loaded only for the following frontend views: - Survey: main page (take survey) - Survey: custom 403 page - Survey: void content - Survey: login required - Survey: expired - Survey: Access Code page - Survey: print page - Survey: result statistics page Among them, views that are not intended to be printed are not negatively impacted by the css rules for print mode. A solution would therefore be to remove `survey_templates_results.scss` from the backend stack. see https://github.com/odoo/odoo/commit/03641610c2b4a6b832ea87795fd21e1d7af10b59 see https://github.com/odoo/odoo/pull/135683 see https://github.com/odoo/odoo/pull/146812 task-3666858 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#148296
This fix allows Romanian companies without a country code prefix on their VAT or company ID to generate valid CIUS-RO e-invoices. Previously, the system would either block the export or create XML that failed validation. The solution adjusts how tax scheme identifiers are handled for Romanian partners without prefixed VAT numbers, ensuring compliance with Romanian tax requirements while meeting CIUS-RO validation standards.
Original PR description
Previously, when exporting CIUS-RO XML and the supplier (company) or customer doesn't have a country code prefix on either their VAT or company ID, an error will be thrown preventing the user from…
Previously, when exporting CIUS-RO XML and the supplier (company) or customer doesn't have a country code prefix on either their VAT or company ID, an error will be thrown preventing the user from generating the XML. But after allowing the XML generating process, the XML is then rejected by the validator because of `BR-CO-09` rule: ```xml <assert id="BR-CO-09" flag="fatal" test="( contains( ' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH EL ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ',substring(cbc:CompanyID,1,2) ) )">[BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’.</assert> ``` In Romania however, there are multiple types of "Tax IDs", and it is perfectly valid in Romania to have a Tax ID without RO (country code prefix) in front of them. They are not a subject to paying VAT, and it should still be possible to generate CIUS-RO XML with their tax identifications. This commit aims to fix this behavior by applying some special treatment to Romanian partners when generating the XML: by modiying the TaxScheme ID. The error only raises when the detected ID is 'VAT'. This commit also fixes and clean some of the irrelevant constraints and tests previously written in `l10n_ro_edi`. task-id: 3649426
This update removes redundant code that was causing duplicate warning messages when products are added to sales orders. The fix ensures warning notifications only appear when necessary, improving the user experience by eliminating unnecessary duplicate alerts.
Original PR description
This is a fixup of: https://github.com/odoo/odoo/pull/149155 Warning is duplicated: https://github.com/odoo/odoo/blob/8ccde3f101cdb6ca41fe29cc5b4252f13745774a/addons/sale/models/sale_order_line.py#L1223-L1232 In the case where some products are already added to the SO before selecting the catalog, the warning props will always be loaded. However, since the warning props is a String but sale_line_warn can be false, it only need no be added if sale_line_warn is set. opw-3631511
This fix resolves an issue where users received a false warning about duplicate serial numbers when performing internal transfers of tracked products between warehouses. The system was incorrectly checking for serial number conflicts across all locations without excluding the source location, causing valid transfers to be blocked. Now the validation properly excludes the source location, allowing transfers to proceed smoothly.
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- Tracked by “SN”
- Update the qty to 1 in “WH/stock” with “SN1”
- Create an internal transfer:
- Location: wh/Stock
- Dest location: wh2/stock
- Mark as todo
- Try to select SN1 in the `stock.move`
Problem:
A warning is triggered:
`Existing Serial numbers. Please correct the serial numbers encoded: (001) exists in location WH/Stock`
We do a search to find all the quants in every location to verify if the same serial number is not being used, but we do not exclude the source location.
opw-3734300
Forward-Port-Of: odoo/odoo#154747
Forward-Port-Of: odoo/odoo#154626This fix resolves an issue where form field labels were being compressed to just one or two characters when long filenames were uploaded to attachment fields. The problem occurred because the grid layout was forcing labels to shrink to accommodate unbreakable text in adjacent columns. The fix adjusts the CSS grid configuration to allow better text wrapping and prevent label compression.
Original PR description
Since Odoo v16, we also use grid in the form layout (inner group). In a group we use the CSS `grid-template-columns` with the value of: * `fit-content(150px)`: for the first column (TLDR: col max…
Since Odoo v16, we also use grid in the form layout (inner group).
In a group we use the CSS `grid-template-columns` with the value of:
* `fit-content(150px)`: for the first column (TLDR: col max 150px)
* `1fr`: for the second column (TLDR: take the "remaining" max space)
```css
.o_form_view .o_inner_group {
grid-template-columns: fit-content(150px) 1fr;
}
```
These rules at the first glance seem correct.
But due to "big word"/language, some unbreakable text is overflowing, to avoid this, we have added the `text-break` BS class.
So now all text can be "squash"/wrap if there is no space available.
The problem is when we have a text be too long and unbreakable in the second column, the label (first column) is squashed to see only one or two characters.
In our case, the bug happens when we upload a file with a big filename to an "Attachement" (`many2many_binary`) field.
On the `many2many_binary` field there is a custom CSS rules:
```css
.o_attachment .caption {
white-space: nowrap;
}
```
that force the text to not wrap on the next line, and so the grid takes the width of the file name as its min value for the width of the second column, and "squash"/wrap the first column.
This commit fixes the issue by allowing the second column to be smaller than the `max-content` width using the css `minmax(0, 1fr)`.
Steps to reproduce:
* Open "Marketing automation" app
* Create a New campaign ("New" button)
* Click on "ADD NEW ACTIVITY"
* Select the "Mail Template" field
* Create and edit a "Mail Template"
* Click on the "Options" tab
* Upload an attachment with a long name => BUG, all labels (first column) are "squashed"
Note:
* the `text-break` class is equivalent to:
```css
.text-break {
word-wrap: break-word !important;
word-break: break-word !important;
}
```
* when we use `Xfr` (X a positive numeric value `1fr` in our case) outside a `minmax()` notation, the GRID specs[1] specifies that it should be converted to `minmax(auto, Xfr)`.
* also the `auto`[2] in the case of `minmax(auto, Xfr)`the value represents the largest minimum size (in our case, the file name).
[1]: https://www.w3.org/TR/css-grid-2/#valdef-grid-template-columns-flex
[2]: https://www.w3.org/TR/css-grid-2/#valdef-grid-template-columns-auto
task-3644267
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#155420This fix prevents orders from being captured twice in the Point of Sale system, a problem that occurred when quantity rounding differences appeared (especially with scale-based inputs). The system now uses a more reliable comparison method that focuses on payment amounts and product details rather than exact quantities, making duplicate orders much less likely to occur.
Original PR description
Before this commit, it was possible to capture an order twice due to the rounding difference in quantity, especially when users use a scale. With this commit, it uses a more relaxed condition and remove the quantity from the orderline comparison. Given that the system checks the payments and with the same product and price units, it's unlikely that two orders will have the same payment amount. opw-3735436 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155513
This update fixes a bug that prevented repair orders from printing when using the German DIN 5008 document layout. The issue was caused by a reference to a field that no longer exists in the system. With this fix, users can now successfully create and print repair orders with the DIN 5008 layout without encountering errors.
Original PR description
### Steps to reproduce * install `l10n_din5008_repair` * set the document layout to din5008 * create a Repair order and attempt to print it You should be met with a traceback. opw-3718479 Forward-Port-Of: odoo/odoo#153648
This fix resolves an error that occurred when assigning tasks to employees who don't have access to certain documents. Previously, the system would block task assignments in these cases, but since users can now see their assigned tasks regardless of document access, this restriction has been removed. This allows managers to assign onboarding tasks to new employees without permission issues.
Original PR description
How to reproduce: - Install hr with demo data - Create a user without access to hr and turn it into an employee - Create a user for Abigail - Assign Abigail as manager of the new user - Click on…
How to reproduce: - Install hr with demo data - Create a user without access to hr and turn it into an employee - Create a user for Abigail - Assign Abigail as manager of the new user - Click on "onboarding plan" in the chatter of the new user - Then in the dialog, click on "Schedule" button You get the error "Assigned user test has no access to the document and is not able to handle this activity." because the new user has no access to the record employee on which those activities are scheduled. As activities for which the user has no access to the underlying record are now displayed in the systray (with no access to the record), we remove the check that prevent assigning an activity to a user on a record he has no access to. Technical note: before odoo/odoo#149965, activities scheduled manually were created with the flag "automated" set to True and when this flag is set the check that ensures that the user has access to the record is skipped. With odoo/odoo#149965, as the "automated" flag is set to False when scheduling activities manually, an error is trigerred if the user has no access to the underlying record. Here we always skip that test and mark the method as deprecated because the user can see the activity no matter the access he has on the underlying record. Task-3598836
The spreadsheet module has been updated to the latest version (17.0.13) with several important fixes and enhancements. This update addresses data filter migration issues, improves keyboard navigation when working with cell ranges, adds a new INT function for calculations, and optimizes performance. These changes ensure spreadsheets work more reliably and provide users with better functionality.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/ed67be7d1 [REL] 17.0.13 https://github.com/odoo/o-spreadsheet/commit/895edf0f0 [FIX] Migration: Propagate datafilter correction on every version Task: 3728009 https://github.com/odoo/o-spreadsheet/commit/b16809114 [FIX] migration: Fix migration steps Task: 3771209 https://github.com/odoo/o-spreadsheet/commit/fd9e140a7 [IMP] cssPropertiesToCss: don't use `Object.entries()` https://github.com/odoo/o-spreadsheet/commit/df828b3d1 [FIX] selection_inputs_manager: arrow keys when broken ranges https://github.com/odoo/o-spreadsheet/commit/799b7575e [IMP] formula: add INT function Task: 3756478
This update fixes a reliability issue in the messaging system where channel subscriptions weren't being properly updated when users quickly joined and left channels. The fix replaces a complex, delayed update method with a more direct approach that immediately tracks channel additions and removals, making the system more responsive and dependable.
Original PR description
Before this PR, the `bus subscription is refreshed when channel is left` test was sometimes failing. This actually reveals a real issue: if a channel is joined a leave very quickly, the bus subscription is not updated. This occurs because we rely on the last subscription made and the one that should be made to detect if channels differ. Since the `updateBusSubscription` method is debounced, we can miss information. This PR replaces the complicated `updateBusSubscription` method by a `onAdd/onDelete`. This is much more reliable and more efficient since there is no need to walk through every channel to detect changes. This PR also remove a test that was redundant that the failing one. fixes runbot-55292,57645,56232
This fix resolves an issue where kanban views with progress bars were displaying incorrect aggregate values (showing 0) after filtering records. The problem occurred when grouping by date, datetime, or many-to-one fields. The fix ensures aggregate values are correctly calculated and displayed in filtered kanban views.
Original PR description
Before this commit, in a kanban view grouped by a date(time) field, with progressbars and an aggregate field, after clicking on a bar to filter records, the aggregate value was always 0. This was due…
Before this commit, in a kanban view grouped by a date(time) field, with progressbars and an aggregate field, after clicking on a bar to filter records, the aggregate value was always 0. This was due to a mismatch when trying to find the value of the aggregate in the web_read_group result, as when grouped by a date or datetime field, the key is `fieldname:granularity`, and we were looking for the fieldname only. This commit fixes the issue. It also fixes the mocked version of read_progress_bar in the MockServer, s.t. we can correctly reproduce the scenario in tests, as in the previous version, keys in the returned object weren't computed the same way as in the real read_progress_bar (e.g., "14,Mitchel", instead of "Mitchel"). A similar fix has been done in [1]. This allows us to introduce a test when grouped by many2one, which doesn't work as of 17.0. [1] fd759f18d056844c486a68d0c394df5a03e789f0 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-pr Forward-Port-Of: odoo/odoo#155524
This fix corrects the alignment and display of invoice totals in the Argentine localization module. When invoices contain large amounts, the total line was not properly aligned on printed invoices. The fix adjusts the column layout to ensure totals display correctly regardless of amount size.
Original PR description
Steps to reproduce: [l10n_ar] - create an invoice with an invoice line having a big amount - confirm - print invoice Issue: The alignment of total is not correct Solution: In l10n_ar, we need more cols to be able to display the correct information. In the base report, the difference is not important visually (the line total is slightly longer) opw-3670830 Forward-Port-Of: odoo/odoo#152682
This update fixes a bug in the Point of Sale module where tax amounts were being incorrectly calculated multiple times when taxes had multiple distribution lines. The fix ensures that tax base amounts are counted only once per tax, resulting in accurate financial reporting and correct tax calculations in sales details reports.
Original PR description
Before this commit, if a tax had multiple distribution lines, the base amount was calculated for each line. This resulted in the base amount being multiplied by the number of distribution lines. This issue has been resolved by ensuring the base amount is counted only once for each tax and line. opw-3696800 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154783 Forward-Port-Of: odoo/odoo#152823
This update corrects the phone country codes for the Democratic Republic of the Congo (CD) and the Republic of the Congo (CG), which were previously assigned to the wrong countries. The fix ensures that customers and contacts in these countries will have the correct phone code associated with their location, improving data accuracy in the system.
Original PR description
Phone codes for the Democratic Republic of the Congo (CD) and The Republic of the Congo (CG) are the wrong way around, and ought to be reversed. This commit is based on a commit that was not merged in v14.0 in this PR: https://github.com/odoo/odoo/pull/133287 Forward-Port-Of: odoo/odoo#155557