Daily updates from Odoo
Monday, January 15, 2024
28 changes
9 changes
Enhancements to existing features
Appointment visibility rules were tightened so internal users only see appointment types and slots they are allowed to access, while appointment users can read all published appointment types. This reduces accidental over-access and makes appointment listings rely on consistent permission checks.
Original PR description
Purpose ======= Improve the appointment types and slots access rules as the internal users had, by default, higher access than the appointment users. Specifications ============== Create an access…
Purpose ======= Improve the appointment types and slots access rules as the internal users had, by default, higher access than the appointment users. Specifications ============== Create an access rule to restrict the internal user access to only have read access on the: - published appointment types - resource based appointment types - user based appointment types, if there is no staff user or if the user is in the staff users. The same logic is applied for the appointment slot. The appointment users now have read access on every published appointment types. Cleaning the fetching of the appointment types by the "_fetch_and_check_private_appointment_types" method to make use of the ACLs. Cleaning the "_prepare_appointments_cards_data" method in website_appointment to avoid filtering the data twice (indeed most of the filtering is already done by the "_fetch_and_check_private_appointment_types" method). In the appointment_hr module, due to the new rule, the staff_user_bxls internal user no longer had read access to the test_apt_type. Setting the 'is_published' to True for the user to have a read access. This generates a few more queries when calling _get_appointment_slots() with this appointment type. Task-3544915 Co-authored-by: amdi-odoo <amdi@odoo.com> Co-authored-by: jeh-odoo <jeh@odoo.com>
Planning views now show only shifts and projects relevant to the active company, reducing cross-company clutter and potential confusion. Material resources are easier to understand because their default role appears beside the material name, and the public wizard has a cleaner resource display without the tooltip.
Original PR description
Before this commit: - tooltip was there for resource in public wizard - in shift template project_id field was company dependent - all shifts and projects were visible for all companies - in progress bar default role was not visible next to material name IMP After this commit: - Removed the tooltip for resource within the wizard. - In the shift template made the 'project_id' field independent of the company - Only shifts and projects with either no associated company or same company are visible within that particular company. - The progress bar will now display the default role for materials next to the material name in muted. task- 3459979
Employees can now request time off even when the related leave has already been paid. This removes an unnecessary restriction because payroll officers will handle any leaves marked to defer during their normal payroll process.
Original PR description
Since the payroll officer will need to resolve all 'to defer' leaves, there is no point anymore to keep the restriction. task-3599267
The shop floor app now makes manufacturing priorities and worker assignments easier to see, and lets users open related manufacturing orders from work orders. This helps production teams quickly identify urgent work, know who is assigned, and navigate more efficiently.
Original PR description
This pr is a back to basics and has several points that are detailed in the task and the commits. odoo: https://github.com/odoo/odoo/pull/145267 task-id: 3624567
Odoo Studio now lets users control whether 'View' buttons appear in editable list views. This makes it easier to configure list behavior directly in Studio when records can be edited from the top or bottom of the list.
Original PR description
This commit adds the open_form_view attribute support in the sidebar of the List editor. The option is only visible when edition is enabled on the view (top or bottom). A test has also been added to the list view tests. task-3605574
Mexican electronic invoicing for Point of Sale now follows the updated refund flow where each refund is tied to a single original order. This improves invoice consistency and reduces errors when issuing refunds and global invoices.
Original PR description
In the corresponding community pr we adapt pos such that only items from 1 order can be refunded in any one order. In this commit we adapt the l10n_mx_edi_pos module acordingly. https://github.com/odoo/odoo/pull/125780 Task: 3376828
The Field Service task planning view now shows only the current user when viewing “my tasks” in Gantt mode. This removes unnecessary rows for other users, making scheduling simpler and easier to read.
Original PR description
In the tasks gantt view of the field service app, there is a line for every registered user in the DB, because the _group_expand_user_ids method selects every user in the DB. What we want now is to have a single line for the current user. The _group_expand_user_ids was edited so that only the current user is returned if the tasks gantt view is in FSM mode and that the search mode is "my tasks" only. task-3621032
Appointment availability slots are now automatically updated when eligible staff members or resources change. This avoids blocking configuration changes and helps keep booking options consistent for customers and schedulers.
Original PR description
Before, there was a constraint raising when changing staff_users on an appointment_type if the ones restricted to slots were not in staff_users anymore. Instead of raising, and in order to have a similar behavior for resources, when changing a staff_user or a resource, synchronize the slots to match that user / resource domain. The fields of restricted users / resources fields are made into computed stored fields depending on the appointment values. A test is added to ensure this behavior. Task-3549573
Code cleanup and technical improvements
This update aligns several Enterprise modules with a new internal data-saving approach so reports and searches use the latest information correctly. It also makes analytic distribution easier to search and group, improving consistency in accounting, budgeting, manufacturing, localization, and project-related views.
Original PR description
### [REF] *: change compatible with the new flush strategy In the community PR, we changed the way to flush pending updates. Now, _search() doens't flush anymore, then we need to update some code to be correct. ### [IMP] core: adapt _read_group*() methods with SQL._metadata We don't need to manually returns fields used in a SQL expression with the way to flush. Metadata is glued to the SQL expression generate by _field_to_sql(). ### [REF] *: analytic_distribution become searchable and groupable In the community PR, analytic_distribution become searchable and groupable. Change some unnecassry _search() usage to search()/ _read_group(). https://github.com/odoo/odoo/pull/144747 https://github.com/odoo/upgrade/pull/5469 https://github.com/odoo/documentation/pull/7194
19 changes
Enhancements to existing features
This update enhances the appointment booking interface with multiple usability improvements including better calendar event creation, improved form layouts, and refined access controls. Users will experience a smoother booking process with automatically set event durations, cleaner menus, and improved visual organization across appointment management screens.
Original PR description
Purpose ======= Improve the appointment general UI. Specifications ============ - Automatically set the calendar event duration to the related appointment type duration when creating a calendar event…
Purpose ======= Improve the appointment general UI. Specifications ============ - Automatically set the calendar event duration to the related appointment type duration when creating a calendar event and there's the appointment_type_id in the context. - Improve the gantt booking form view. - Only allow appointment admins to reorder the appointment type in the list and kanban views. - Improve the resource list and form views. - Move the Share Links menu under Reporting. - Change the calendar template to prevent displaying 'OdooBot' as the sender when recieving a calendar event invitation. - Improve the action helper for the Invitations menu and create an action helper for the appointment type questions answers list view. - Change the location placeholder and the avatars_display description in the appointment type form view. - Align the '+X' with the many2many element names at display. - Removing the 'Appointment' tags from the search tags as events generated through a type can already be found otherwise. - Open the gantt form view instead of the gantt planning view when creating an event by clicking on a gantt cell. - Fix the reserved capacity field display in the gantt form view. - Create an access rule to restrict the internal user access to show the open appointment types or the ones where they are staff users, with only read access. Task-3544915
The Open and Rename actions for embedded views in Knowledge articles have been moved from the top of the article to a cog menu. This change improves the article layout by preventing these actions from interfering with the article content and future comment features.
Original PR description
This commit moves the embedded actions `Open` and `Rename` to the cog menu of the embedded views so that it doesn't interfer with either the top of the article or, in later versions, with comments. task-3635780 Forward-Port-Of: odoo/enterprise#53852 Forward-Port-Of: odoo/enterprise#52758
Resolved issues and error corrections
This fix resolves a crash that occurred when generating consolidation reports for accounts with names longer than 40 characters. The issue was caused by outdated code that referenced a deprecated configuration option. The fix updates the code to use the current option name, allowing consolidation reports to work properly regardless of account name length.
Original PR description
[FIX] account_consolidation: prevent too-long account name Issue: Requesting consolidation report for consolidation name that is more than 40 characters resulted in runtime error Steps to reproduce: 1- Install consolidation app 2- create a new consolidation with a name longer than 40 characters 3- click the smart button "Consolidated Balance" Solution: Issue was that while generating the consolidation report for long name we needed to check if it is to be exported to pdf or xml or just a normal request and no export. This was done by checking the options dictionary but using a key named 'print_mode' this key no longer exists and has been replaced with 'export_mode'. opw-3629651
This update fixes an issue where fields in worksheet templates weren't appearing in the correct position after being moved in the design editor. The fix allows worksheet reports to properly handle invisible fields marked with boolean values, ensuring they don't appear in the final report while maintaining the correct layout of visible fields.
Original PR description
… only boolean invisible On a worksheet template, click on Design Template. You arrive in studio, editing the form view for the template Add some fields before the already existing comments field.…
… only boolean invisible On a worksheet template, click on Design Template. You arrive in studio, editing the form view for the template Add some fields before the already existing comments field. Remove the comment field. Rename the last added field. Move that field on top of the other added fields. Before this commit, the moved field was never at the desired spot. This is because of the `def normalize` in web_studio. When it tries to determine simple xpath for the operations, it gets lost when a field is replaced by other stuff. Specifically, it can't really handle emptying a node from existing fields and filling that with new things. This is a limitation that could be fixed at the cost of heavy work and potential bugs created by an hypothetical fix. Considering the sensitivity of the `normalize` function, This commit proposes to handle things differently in worksheet. It now supports having an invisible field in the form view, that will have the consequence of not putting the field in the QWeb report for that template model. For simplicity's sake, it only supports Boolean values. opw-3601040 Forward-Port-Of: odoo/enterprise#54111
This update fixes a bug in the year picker functionality within the Documents Spreadsheet module. The fix ensures that users can properly select and filter data by year when working with spreadsheets, improving the reliability of date-based filtering features.
Original PR description
Enterprise counterpart of https://github.com/odoo/odoo/pull/148619 Task: 3668916 Forward-Port-Of: odoo/enterprise#53962 Forward-Port-Of: odoo/enterprise#53905
When users duplicate an article that contains a kanban view with custom stages, those stages were not being copied to the new article, resulting in an empty embedded view. This fix ensures that all kanban stages are properly transferred when an article is copied, maintaining the same structure and organization in the duplicate.
Original PR description
When the user copies an article, the stages set on the article items of the article will not be transposed to the new article. As a result, the embedded view will not have any stage set. To fix that issue, we will properly copy the stage of the article to the new article. Step to reproduce the issue: 1. Create an article 2. Insert a kanban view with /kanban 3. Create a few stages 4. Click on the "Create a Copy" button of the dropdown item => The embedded view will not have any stage set TO BE: The embedded view should have the same stages as the original article. task-3349324 Forward-Port-Of: odoo/enterprise#41967
Fixed a bug in the bank reconciliation widget where clicking on amount fields in the Manual Operations tab would lose focus after switching between lines. The fix ensures that input fields are properly focused after the interface updates, improving the user experience when manually reconciling bank transactions.
Original PR description
There is a problem in the "Manual Operations" of the bank reconciliation widget with the focus of the clicked fields on line change. Consider the following situation in the bank reconciliation…
There is a problem in the "Manual Operations" of the bank reconciliation widget with the focus of the clicked fields on line change. Consider the following situation in the bank reconciliation widget: The "Manual Operations" tab is already visible, a line is selected and we click on the amount field of a different line. Then the line should change and the corresponding input of the field should be focussed in the "Manual Operations" tab. (The problem may happen with other columns / fields too.) But currently it can happen that the field is not properly focussed. The issue is that the focusing happens before the "Manual Operations" tab is "patched". After the "patching" the focus is lost. This commit corrects this issue by executing the focussing after the "patching". Reproduce 1. Go to bank reconciliation widget (with the default company). The first bank statement line should be selected: It has amount "$ 96.67" and label: "R:9772938 10/07 AX 9415116318 T:5 BRT: 100.00 C/ croip" (or similar). (I think it should always fail if the "Taxes" field is visible on some of the lines on right) 2. Ensure that nothing is selected in the "Match Existing Entries" tab. 3. Click on some line on the right. The "Manual Operations" tab should be selected now. 4. Ensure there is no focus on the "Amount" field in the "Manual Operations". 5. Click on the debit field of some other line. 6. For a short moment (before the line is changed) the "Amount" field is focused. 7. The line is changed and the "Amount" field is not focused. Forward-Port-Of: odoo/enterprise#52388
The Knowledge app previously had an automatic text selection feature that made editing document titles difficult. When users clicked on the title field, all text would be selected, and clicking again to reposition the cursor would re-select everything. This fix removes that automatic selection, allowing the title field to work like any other text field in Odoo, making it easier for users to edit titles without relying on keyboard shortcuts.
Original PR description
In Knowledge, the system automatically selects the entire text of the title field when the user clicks on the field. When the user clicks on the field again to reposition the cursor or selects a portion of the text, the system will re-select the entire text which prevent people from easily editing the title field. Users are required to utilize the left or right arrow keys on their keyboard to move their cursor or employ keyboard shortcuts to select a specific portion of the text which is not convenient. To enable text selection, we will disable the magic selection. The title field will now behave like any other text field of Odoo. task-3676051 Forward-Port-Of: odoo/enterprise#54027
This fix resolves an issue where users couldn't open a spreadsheet when they had multiple documents selected at the same time. Previously, a blank preview screen would appear instead of the spreadsheet. The fix ensures the correct document is identified and opened, improving the user experience when working with multiple files.
Original PR description
How to reproduce: - select multiple documents along with a spreadsheet. - try to open the spreadsheet. - Blank preview screen appears. Technical reason: - The document which we try to open/preview is passed under the `mainDocument` key. Ref: https://github.com/odoo/enterprise/blob/16.0/documents/static/src/views/kanban/documents_kanban_model.js#L27 After this commit: We are able to open the spreadsheet. task-3508537 Forward-Port-Of: odoo/enterprise#54196 Forward-Port-Of: odoo/enterprise#49092
When users make changes in Web Studio that cause errors on the server, they will now see a clear error message instead of a silent failure. Previously, errors were hidden and users had no feedback about what went wrong. This fix helps users understand and resolve issues when editing views.
Original PR description
Forward-Port-Of: odoo/enterprise#54135
Fixed an issue where auditing consolidation report amounts that were calculated from multiple journal lines would only show the first set of related transactions. The fix ensures that all underlying transactions are now properly displayed when users drill down into consolidated amounts, improving transparency and accuracy of financial audits.
Original PR description
When an amount in the consolidation report was computed from multiple consolidation.journal.line objects, auditing it didn't work well: only the move lines corresponding to the first of those journal lines were shown. This is due to https://github.com/odoo/odoo/blame/16.0/addons/web/static/src/search/search_arch_parser.js#L134 . Passing a default value for a filter consisting in a list of ids worked by chance and only in certain contexts in older versions. In 16.0, it does not anymore. This case is currently unsupported by the web framework (it will be on future versions; a task has been created for master) ; the alternative is here to directly rely on a domain on the action. OPW 3662905 Forward-Port-Of: odoo/enterprise#54217
This fix restores the proper behavior of the year picker component in date filters, which was accidentally broken in a previous update. Empty date filter values will now correctly bypass the filter instead of incorrectly filtering on the current year, ensuring more accurate data filtering for users.
Original PR description
The YearPicker component was mistakenly broken during a fix in PR #123245 due to a lack of tests. This commit reintroduces the intended behaviour. Task: 3668916 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#148762 Forward-Port-Of: odoo/odoo#148619
This fix resolves a crash that occurs when loading demo data in the Point of Sale system after installing Indian localization. The issue happened because a required company state wasn't set before demo data was processed. The fix ensures the proper sequence of initialization so demo data loads successfully without errors.
Original PR description
To reproduce: - Install POS with demo data - Install Indian localization(l10n_in) - Open POS terminal - Click on the load demo data - Traceback thrown Fix: The issue occurs when the demo data executes the closing of the sessions. The l10n_in _post method checks for a company state that is not yet set at that point. The quick fix here is to set the state before loading the onboarding data. It is important to note that this issue only arises when loading demo data on a DB that doesn't contain demo data. 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
This fix resolves an access permission error that occurred when users tried to import or edit tax records in multi-company Point of Sale setups. The issue happened because the system was checking Point of Sale order data across companies without proper permissions. The fix ensures these permission checks are performed consistently, allowing tax imports to work smoothly regardless of how many companies use the POS system.
Original PR description
Support ticket number: #3632037 On Odoo v14.0 **Description of the issue/feature this PR addresses:** When a user try to import (to edit) some `account.tax`, some verification are done on…
Support ticket number: #3632037 On Odoo v14.0 **Description of the issue/feature this PR addresses:** When a user try to import (to edit) some `account.tax`, some verification are done on `pos.order.line`. The search is done in `sudo` but the read is executed with the current logged user. So `pos.order.line` from others companies are check with a user who don't have access to these companies. And the `AccessError` exception is triggered. This PR aims to fix the permission issue by adding a `sudo()` for the read on `pos.order.line`. **How to reproduce:** - Multi-company environment (2 is enough); - POS available on at least 2 companies; - Open a session and do some POS (with lines of course) on company 1 (do not close the session); - Open a session and do some POS (with lines of course) on company 2 (do not close the session); - Then do an import of some account.tax (to maybe rename them); - You should have the AccessError exception (about multi-company). **Current behavior before PR:** During the import (update) on `account.tax`, some verification are done to ensure no open session are related. In case of multi-company, we have an `AccessError`. **Desired behavior after PR is merged:** The verification should be done in `sudo()` as the search is `done` in `sudo()`. This bug has been introduced by: https://github.com/odoo/odoo/commit/0d220a7b42c8675b53a59779496953e2a70343a4 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#145565
This update fixes two problems with recurring event deletion in Microsoft Calendar integration. First, it prevents accidental deletion of recurring events when synchronization is active, which was causing unwanted email notifications on Microsoft's side. Second, it ensures that when synchronization is turned off, deleting events in Odoo no longer removes them from Microsoft Calendar.
Original PR description
Before this commit, deleting recurrent events from Odoo in list view mode was allowed with the synchronization active, which could trigger to spamming emails on Microsoft side. Additionaly, deleting events with the synchronization off was also deleting events on Microsoft, which should not happen. After this commit, the deletion of recurrent events is not allowed anymore when the synchronization is active by triggering an UserError message. Also, when the synchronization is off, deleting events in Odoo don't also delete events on Microsoft side. Task-id: 3563501 Forward-Port-Of: odoo/odoo#144004
This fix resolves an issue where module imports were being blocked by access control restrictions. The system now properly bypasses these permission checks during module installation, ensuring that modules can be imported successfully regardless of user access levels. This improves the reliability of the module installation process.
Original PR description
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
This update improves the performance when deleting accounting records related to inventory transactions. By adding a database index, the system can now process these deletions much faster, reducing wait times for users performing inventory operations.
Original PR description
The index is needed to be able to unlink/delete lines because of the check of foreign keys.
This fix resolves payment processing failures in the Adyen payment module that were caused by overly strict address validation. Previously, the system would reject payments when address details like street numbers couldn't be extracted or were missing, even though Adyen could process them. The fix now sends "Unknown" for optional missing address fields instead of blocking the payment, allowing Adyen to handle the validation instead. This improves payment success rates for customers with non-standard address formats.
Original PR description
Commit https://github.com/odoo/odoo/commit/ceb8b785fba1055deeff8d9075ccc707f2317278 introduced a mechanism to throw an error if some address fields were empty. The mechanism was introduced to prevent…
Commit https://github.com/odoo/odoo/commit/ceb8b785fba1055deeff8d9075ccc707f2317278 introduced a mechanism to throw an error if some address fields were empty. The mechanism was introduced to prevent us from sending `False` as an address detail to Adyen when it was not set since it might negatively affect the fraud check score. It however caused some payments not to go through because it relied on Odoo's utils to extract the house number from the address, which would fail in some circumstances (e.g., when the number is placed before the street name). In some other cases, empty address details that were previously accepted by Adyen caused the error to be thrown. With this commit, we now pass `Unknown` instead of `False` or empty string for the address details that are not set and that are not required by Adyen in practice, unlike what is stated in AVS documentation. This delegates the responsibility to block the payment to Adyen as the address check and the related error are removed from Odoo. Forward-Port-Of: odoo/odoo#149225 Forward-Port-Of: odoo/odoo#147960
Fixed a display issue where the rating modal title was invisible when adding or editing course reviews on website slides. The title text was white on a white background, making it unreadable. The fix adds proper styling to ensure the title has good contrast and is clearly visible to users.
Original PR description
How to reproduce: 1. Go to website slides. 2. Open any course. 3. Add review or Edit the review. The title of the modal should be visible but it is not because the text has the same color as the background (white). Technical note: the modal is defined in a dark zone where the text color is white. The modal title uses the h5 tags that automatically inherit its color from its parent, so the title is white as well. To solve the problem we add the class "bg-white" on the modal div to indicate that the background of the modal is white so that the color of the h5 has a good contrast on a white background (here black). Task-3640496 Forward-Port-Of: odoo/odoo#146687