Daily updates from Odoo
Tuesday, March 12, 2024
20 changes · master
Enhancements to existing features
Documents that are only useful for demonstrations have been moved out of the standard Documents setup and into demo data. This keeps regular databases cleaner while preserving example content for demo environments.
Original PR description
Since https://github.com/odoo/enterprise/commit/f3c1cecf1583e0185d1bd75e757ce45b1912299a, some documents are added in Documents data. These documents are not meant to be installed on each databases, and only serve demonstration purposes. This commit therefore moves those documents data to demo data and reorder items in alphabetical order.
This update adjusts how several apps use database indexes to reduce unnecessary storage and improve search behavior where it matters. Helpdesk searches should better support partial text matching, while Knowledge, Marketing Automation, and Subscriptions avoid overly broad indexes that may slow maintenance without clear benefit.
Original PR description
See odoo/odoo#135057 for the core ideas. This just applies them in locations triggering warnings.
This update aligns Belgian payroll accounting tests with a simplified leave duration setup. It reduces reliance on duplicate leave-related fields, helping keep payroll test maintenance simpler and more consistent.
Original PR description
Before this commit, there was way too much fields related to the duration of the leave in `hr_holidays`: - number_of_days - number_of_hours - number_of_days_display - number_of_hours_display - number_of_hours_text - duration_display This commit only adapts the enterprise code to the change that only keeps `number_of_days`, `number_of_hours` and `duration_display` to simplify things.
Appraisal surveys now rely on a shared availability setting to decide when live session options should appear. This keeps appraisal survey screens cleaner and reduces duplicated customization, with no live sessions enabled for appraisals.
Original PR description
Where possible, use the newly introduced `session_available` field to identify whether to show options allows to reduce views overrides. See related COM PR, where this field is an opt-in method based on survey_type, such that no live session is enabled for appraisals. Task-2803327
The Documents app no longer shows the split PDF scissors button in the inspector when viewing documents from the Activity view. This avoids offering an action in a context where it should not be available, making the interface clearer for users managing activities.
Original PR description
Before this commit: - Switch to the Activity view - Schedule an activity for any PDF file and select it - The scissor (split PDF) button is present on the inspector After this commit: - We remove the scissor (split PDF) button from the inspector. Task-3770691
The HR demo data has been adjusted so the Marc Demo manager account no longer receives extra access rights across related apps. Payroll conflict messages were also made clearer by showing the employee name, helping teams identify issues faster.
Expired or refused salary offers no longer show the salary configurator or send by email buttons. This helps prevent users from taking actions that are no longer relevant for inactive offers.
Original PR description
With this commit, when an offer is expired or refused, these buttons : "salary configurator" and "send by email" are hidden. task : 3746557
Several payroll and project messages now use a shared formatting helper instead of manually building lists. This improves consistency and makes translated text read more naturally for users in different languages.
Original PR description
*=hr_payroll_account,project_enterprise,project_holidays This PR replaces a few occurrences of list being manually constructed by making use of the new helper. Task-3506960 Community: https://github.com/odoo/odoo/pull/154395
Code cleanup and technical improvements
This update refreshes how Odoo works with PDF files across delivery, documents, payroll, and signing features. It keeps these workflows compatible with the newer PDF library version without changing the intended user experience.
This pull request updates internal automated tests across several Odoo Enterprise apps so they align with upcoming changes in the shared testing framework. It should not change day-to-day product behavior, but helps keep future upgrades smoother and reduces maintenance risk.
Original PR description
See individual commits. https://github.com/odoo/odoo/pull/157058
Miscellaneous changes
In commit 355250d, the domain was adjusted to automatically select the invoice document type for customers with a RUC and limit others to the "boleta" document type. This generally holds true, except for export invoices requiring the 01 document type. This commit addresses the current restriction, allowing the selection of document type 01 other than "boleta" or "debit note boleta." For this, inherit the compute method, and extend the depends to add the operation type and allow generate invoi
Original PR description
In commit 355250d, the domain was adjusted to automatically select the invoice document type for customers with a RUC and limit others to the "boleta" document type. This generally holds true, except for export invoices requiring the 01 document type. This commit addresses the current restriction, allowing the selection of document type 01 other than "boleta" or "debit note boleta." For this, inherit the compute method, and extend the depends to add the operation type and allow generate invoice for exportation cases. [Odoo PR related](https://github.com/odoo/odoo/pull/154511) Forward-Port-Of: odoo/enterprise#56465
…ct warning * a regular user error can be displayed user-side instead of the redirect warning, in case we don't want to propose to contact the support (in case there's no need) Forward-Port-Of: odoo/enterprise#58308 Forward-Port-Of: odoo/enterprise#56935
Original PR description
…ct warning * a regular user error can be displayed user-side instead of the redirect warning, in case we don't want to propose to contact the support (in case there's no need) Forward-Port-Of: odoo/enterprise#58308 Forward-Port-Of: odoo/enterprise#56935
Steps to reproduce: - Install Accounting and l10n_pe_edi - Switch to a Peruvian company (e.g. PE Company) - Configure Peruvian localization (https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/peru.html) - Create an invoice: * Customer: Comercial Constructora los Patitos S.A. * Operation Type: [0101] Internal sale * Invoice Lines: - Product: Arroz descascarillado (arroz cargo o arroz pardo) - Taxes: 18% - Terms and Conditions: [text containing
Original PR description
Steps to reproduce:
- Install Accounting and l10n_pe_edi
- Switch to a Peruvian company (e.g. PE Company)
- Configure Peruvian localization (https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/peru.html)
- Create an invoice:
* Customer: Comercial Constructora los Patitos S.A.
* Operation Type: [0101] Internal sale
* Invoice Lines:
- Product: Arroz descascarillado (arroz cargo o arroz pardo)
- Taxes: 18% - Terms and Conditions: [text containing several consecutive spaces and/or several lines]
- Confirm the invoice
- Process UBL 2.1
Issue:
The service responds with an error because the <cbc:Note> node doesn't comply with the supported format.
Special characters like '\n' and '\u00A0' are not supported.
opw-3744946
Linked community PR: https://github.com/odoo/odoo/pull/155081
Forward-Port-Of: odoo/enterprise#57268**Issue** website_appointment_tour was not working properly because of some changes done in the mail.py and appointment app. **After this PR** Now the appointment tour is working perfectly as expected. Task-3774280 Forward-Port-Of: odoo/enterprise#57898
Original PR description
**Issue** website_appointment_tour was not working properly because of some changes done in the mail.py and appointment app. **After this PR** Now the appointment tour is working perfectly as expected. Task-3774280 Forward-Port-Of: odoo/enterprise#57898
task-3610704 Forward-Port-Of: odoo/enterprise#52297
Original PR description
task-3610704 Forward-Port-Of: odoo/enterprise#52297
This commit fixes an issue with the comments panel when creating comment. When you have the panel opened and you want to create a comment, after logging your message the temporary box is not removed, leading to issues like boxes not being handled or crashes. This is caused because when syncing the handler and the panel when creating the comment, the insertion function was still the one from the handler meaning that the KnowledgeComment was not using the correct function which led to thos
Original PR description
This commit fixes an issue with the comments panel when creating comment. When you have the panel opened and you want to create a comment, after logging your message the temporary box is not removed, leading to issues like boxes not being handled or crashes. This is caused because when syncing the handler and the panel when creating the comment, the insertion function was still the one from the handler meaning that the KnowledgeComment was not using the correct function which led to those issues. Now when the panel is adding the comment from the handler we change the function so that it uses the correct one. task-3792116 Forward-Port-Of: odoo/enterprise#58253
Forward-Port-Of: odoo/enterprise#58326
Original PR description
Forward-Port-Of: odoo/enterprise#58326
Steps to reproduce: ------------------- 1. Install sale_planning (without demo data) 2. Create a service product with "Plan Services" activated 3. Create an SO with this product and confirm the SO 4. Click on "To Plan" stat button 5. Click on any pill to create a new slot 6. The traceback occurs The traceback also occurs in the following scenario: ------------------- 1. Install sale_planning (without demo data) 2. Open Planning > Schedule > By Role 3. Click on any pill to create a
Original PR description
Steps to reproduce: ------------------- 1. Install sale_planning (without demo data) 2. Create a service product with "Plan Services" activated 3. Create an SO with this product and confirm the SO 4.…
Steps to reproduce: ------------------- 1. Install sale_planning (without demo data) 2. Create a service product with "Plan Services" activated 3. Create an SO with this product and confirm the SO 4. Click on "To Plan" stat button 5. Click on any pill to create a new slot 6. The traceback occurs The traceback also occurs in the following scenario: ------------------- 1. Install sale_planning (without demo data) 2. Open Planning > Schedule > By Role 3. Click on any pill to create a new slot 4. The traceback occurs Fix: ------------------- When there is no demo data/records, the gantt view uses sample data. In which for instance, the role_id field is randomly generated. So when clicking on the pill to create a new slot with the given role_id, the corresponding 'planning.role' record is not found, resulting in a traceback. To fix that, we check if the sample data is enabled, in which case we ignore the "fake" ids given by the sample records. task-3777485 Forward-Port-Of: odoo/enterprise#58096
Steps to reproduce: - - Create an SO with two lines containing the product “Field Service” - Confirm the SO > 2 fsm tasks are created - Open the first task > access catalog via the `Products` smartbutton - Add any product to the SO. - Open the second task > access catalog via the `Products` smartbutton - Add the same product to the SO. - Open the first task > access catalog via the `Products` smartbutton - Try to add more of that product **IMPOSSIBLE : “You can’t edit this product in
Original PR description
Steps to reproduce: - - Create an SO with two lines containing the product “Field Service” - Confirm the SO > 2 fsm tasks are created - Open the first task > access catalog via the `Products`…
Steps to reproduce: - - Create an SO with two lines containing the product “Field Service” - Confirm the SO > 2 fsm tasks are created - Open the first task > access catalog via the `Products` smartbutton - Add any product to the SO. - Open the second task > access catalog via the `Products` smartbutton - Add the same product to the SO. - Open the first task > access catalog via the `Products` smartbutton - Try to add more of that product **IMPOSSIBLE : “You can’t edit this product in the catalog”** Cause of the issue: - The way the catalogue is computed was refactored between 16.4 and 17.0 see: odoo commit bc01c7bcec974ee095f5855f225667645ef40213 The above situtation is not yet handled by this refactoring. In 16.4, since the catalogue was acceced from the task linked to the Field service, the quantities it displayed were computed with respect to that task. However, in 17.0 the quantities appearing in the catalogue are computed from the main SO containing both `Field services` SOL instead of being computed contextually from the task they are linked to. To be more precise: - When clicking on the smart button, the quantities appearing in the calatalogue are computed by the `_get_product_catalog_order_line_info`. This method starts by grouping the SOL referencing each product of the catalogue using the `_get_product_catalog_record_lines`: https://github.com/odoo/odoo/blob/c7f982774654459a2db6decd6ae1948e05e7d622/addons/product/models/product_catalog_mixin.py#L91-L92 https://github.com/odoo/odoo/blob/c7f982774654459a2db6decd6ae1948e05e7d622/addons/sale/models/sale_order.py#L1823-L1829 But here is the problem, since both SOL were able to reference the same product of the catalogue the product of the catalog will be set to 'readOnly' here (because `self` will contain both SOL): https://github.com/odoo/odoo/blob/c91ffa3bdbff845088111bc3036500c2c03fc357/addons/sale/models/sale_order_line.py#L1222-L1227 Hence, we will not be able to edit its value from the catalogue: https://github.com/odoo/odoo/blob/c91ffa3bdbff845088111bc3036500c2c03fc357/addons/product/static/src/product_catalog/order_line/order_line.xml#L18-L20 Fix: - As discussed with the PO of the Field Service module (see conversation of the ticket), the catalogue should be computed contextually using the task from which we access it and not from all tasks referring to that product in the main SO. Doing so will solve the problem since only one SOL will be associated to that product of the catalogue and the product will be set to `'readOnly' : False`: https://github.com/odoo/odoo/blob/c91ffa3bdbff845088111bc3036500c2c03fc357/addons/sale/models/sale_order_line.py#L1212-L1216 opw-3748833 --- Forward-Port-Of: odoo/enterprise#57561
**Step to reproduce:** - Insert a view using /item list or /item kanban in knowledge - Open dropdown on any of the view - Click within that view anywhere outside dropdown - you notice that dropdown did't close **Issue:** Dropdown did't close when clicking within the embedded view. **Technical Reason:** There is a function called onWindowClick in the dropdown.js file, inside which we get different values in 'this.ui.activeElement' and 'this.nyActiveEl', so the dropdown doesn't
Original PR description
**Step to reproduce:** - Insert a view using /item list or /item kanban in knowledge - Open dropdown on any of the view - Click within that view anywhere outside dropdown - you notice that dropdown…
**Step to reproduce:** - Insert a view using /item list or /item kanban in knowledge - Open dropdown on any of the view - Click within that view anywhere outside dropdown - you notice that dropdown did't close **Issue:** Dropdown did't close when clicking within the embedded view. **Technical Reason:** There is a function called onWindowClick in the dropdown.js file, inside which we get different values in 'this.ui.activeElement' and 'this.nyActiveEl', so the dropdown doesn't close. **Before this commit:** When we insert an embedded view, and the user opens any dropdown and after that, if the user clicks within the embedded view that dropdown is not closing. **After this commit:** Removing the condition related to 'this.ui.activeElement' and 'this.myActiveEl' means that now, In the embedded view, when opening the dropdown menu, clicking within that view close the dropdown. task-3717014 Forward-Port-Of: odoo/enterprise#57471 Forward-Port-Of: odoo/enterprise#56366