Monday, March 11, 2024
31 changes · 17.0
Enhancements to existing features
A new warning has been added to the payroll dashboard that alerts users when time off requests are affected by changes to allocation amounts. When an allocation's number of days is modified after time off has been taken against it, the dashboard now displays a warning and provides a convenient link to view all affected leaves grouped by employee.
Original PR description
When a time off for a few days is taken using a certain allocation but then the number of days of the allocation is changed, there should be a warning on the dashboard of payroll to show the leaves affected. The warning redirects the user to a list of leaves concerned and grouped by employees. Task: 3729563
This update improves how error messages are displayed when bank account synchronization encounters issues. Instead of always showing a generic redirect warning that suggests contacting support, the system can now display specific user-friendly error messages when appropriate. This gives users clearer guidance on what went wrong without unnecessary support escalation.
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#57090 Forward-Port-Of: odoo/enterprise#56935
This update improves how the social media module retrieves information about social posts, making it significantly faster. Instead of looking up data through multiple linked records, the system now uses a more direct approach, which reduces the number of database queries and improves overall performance for all social media features.
Original PR description
This commit improves the '_get_social_stream_post' method to make it use a complete domain instead of relying on pathing through the stream, then the account, then the media (= 3 records fetch), to get the media type. This will save a lot of requests as it is a central method used in the controllers of all social media implementations. Forward-Port-Of: odoo/enterprise#58286
Resolved issues and error corrections
A warning message now appears when users open multiple room booking views in different browser tabs using the same browser profile. This prevents confusion caused by bookings from other rooms appearing in the wrong view. Users are prompted to close extra tabs or use different browser profiles to view multiple rooms simultaneously.
Original PR description
Purpose: ------- If you open different frontend room booking views using the same browser profile, all rooms will receive and handle all bus notifications, which leads to rooms views showing bookings created for other rooms. This is due to the bus service using a single websocket connection that is shared across the different tabs. A simple workaround to display several frontend rooms views using one device consists in using different browser profiles. This commit adds a warning at the top of the frontend view when several tabs are detected, that asks the user to close the other tabs . Task-3698135
This fix allows Peruvian export invoices to use document type 01, which was previously restricted. The system now correctly recognizes export transactions and permits the appropriate document type selection, ensuring compliance with Peru's electronic invoicing requirements for international sales.
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)
This fix resolves an issue where Peruvian electronic invoices (UBL 2.1) were being rejected during validation due to improper handling of special characters like line breaks and non-breaking spaces in invoice notes. The system now properly formats these characters to comply with Peru's EDI requirements, allowing invoices with multi-line terms and conditions to process successfully.
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/155081Fixed an issue where payroll reports would display in English even when employees had no language preference set. The system now correctly uses the database's default language instead of always falling back to English. This ensures payroll documents print in the appropriate language for your organization.
Original PR description
**Current behavior:** If a payslip report is printed for an employee with no set language, it will be printed in English. **Expected behavior:** The primary fallback language should be that of the database before going to the base level default of English. **Steps to reproduce:** 1. Activate spanish and spanish MX languages on the DB, set all users' language to Spanish 2. Deactivate the default English language pack 3. In the Nómina (Payroll) app, go to `Recibos de nómina` -> `Todos los recibos de nómina`, then select any report and click the Imprimir (Print) button 4. Observe some sections are in English **Cause of the issue:** When an employee's language is not set, English is used as a default. **Fix:** Look to use the environment's language if the Employee's is False. Ammended to fix other situations in hr_payroll where an employee language is accessed without using `env.lang` as a primary fallback. opw-3747839
The appointment booking tour feature was not functioning correctly due to recent changes in the mail and appointment systems. This fix restores the tour to work as intended, ensuring customers can properly experience the guided appointment booking process.
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
Fixed a crash that occurred when users clicked on scheduling slots in the planning view without demo data installed. The issue happened because the system was trying to reference non-existent role records. The fix ensures the system properly handles sample data by ignoring temporary IDs when demo data is not available.
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. 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
This fix resolves a problem where temporary comment boxes were not being properly removed when creating comments in the Knowledge panel, which could cause the application to crash or behave unexpectedly. The issue was corrected by ensuring the panel uses the correct function when adding comments, preventing boxes from being mishandled.
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
This update fixes the payroll system to properly track additional fields on employee payslips that were previously not being monitored. By ensuring all relevant payslip data is tracked, the system now provides more complete and accurate payroll records for auditing and compliance purposes.
This fix corrects the Swiss Balance Sheet report structure to properly display account groupings for the 2900-2999 account range. Previously, accounts 2992-2999 were not shown as a separate category under "Profit or loss for the year." The update enables proper grouping so Swiss companies can now see the complete and correctly organized financial structure in their balance sheet reports.
Original PR description
Currently in Odoo on the Swiss Balance Sheet: 1. Reserven und Jahresgewinn oder Jahresvelust (Main Group) (Reserves and profit or loss for the year) 1.1 Gesetzliche Reserven (Legal Reserves) (2950) 1.1.1 Accounts 2900-2991 What they expect for CH: 1. Reserven und Jahresgewinn oder Jahresvelust (Main Group) (Reserves and profit or loss for the year) 1.1 Gesetzliche Reserven (Legal Reserves) (2950) 1.1.1 Accounts 2900-2991 1.2 Test: Jahresgewinn oder Verlust (Profit or loss for the year (Annual profit and loss) 1.2.1 Accounts 2992-2999 opw-3668192 Forward-Port-Of: odoo/enterprise#58178
This fix resolves an issue where users were unable to refund Point of Sale orders in Mexico. The problem occurred because a validation check was running before order items were properly copied to the refund, causing an incorrect error message. Now the validation correctly waits until the refund order contains items before checking.
Original PR description
Current behavior: When trying to refund a pos order you had an error saying you can't refund the order. Steps to reproduce: - Create a pos order - Validate the order - Go in the backend without closing the session - Try to refund the order This was happening because here (https://github.com/odoo/odoo/blob/c1b86a946d74ea6fbd1d1932da5221ec770ed3a8/addons/point_of_sale/models/pos_order.py#L1050) we trigger this constrains (https://github.com/odoo/enterprise/blob/cc86cdefb375c60b0d1f26e747bb5c2bc3b7f9e3/l10n_mx_edi_pos/models/pos_order.py#L269) but at this point in the code the lines aren't copied in the refund order and so it is triggering the error. To fix it we make sure to check that the order contains atleast one order line. opw-3750165
This fix resolves a bug that prevented users from resetting debit or credit values to zero when importing opening balances for accounts. It also enables the creation of opening balances for accounts that use foreign currencies, which was previously not supported.
Original PR description
Allow the user to set back the debit or credit to 0. It's a bug introduced by https://github.com/odoo/odoo/commit/c3793357d823273cb4297b0eb31308ad73a9dff8 Allow to create an opening balance for an account having a foreign currency. opw: 3665557 Forward-Port-Of: odoo/enterprise#58392 Forward-Port-Of: odoo/enterprise#56520
This update fixes a problem with the mobile menu where clicking on links to different sections of the same page (anchor links) was causing unexpected scrolling behavior. Users will now be able to navigate smoothly between different sections on a page using the mobile menu without experiencing erratic scrolling.
Original PR description
This commit addresses the erratic behavior of the mobile menu, specifically when clicking on menu items linked to anchors instead of navigating to different pages. The issue occurs in mobile view and can be reproduced by following these steps: 1. Create a page longer than the height of the screen with 3 blocks. 2. Add 3 links to target different sections on the page. 3. Create 3 menu items linked to the newly created anchors (/#...). 4. Save to apply the modifications. 5. Switch to mobile view. 6. Open the hamburger menu. 7. Click on the first menu item, then the second, then the third, and again on the first one. Upon reproducing these steps, the scrolling event would pass through all the anchors, causing unexpected behavior. This commit introduces fixes to ensure proper navigation when clicking on menu items in mobile view, resolving the described issue. opw-3652930
This fix addresses a restriction in Peru's tax document type selection that was preventing export invoices from using document type 01. Previously, the system only allowed "boleta" document types for certain customers, but export refunds require the 01 document type. This change restores the ability to select document type 01 for export transactions while maintaining the existing rules for other invoice types.
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 "credit note boleta." [Enterprise PR related](https://github.com/odoo/enterprise/pull/56465) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update allows regional localization modules to customize how invoice notes are formatted in electronic documents. Previously, certain special characters in invoice notes could cause issues in specific regions like Peru. Now, localization modules can override the note formatting to ensure compliance with regional requirements.
Original PR description
In UBL 2.0, the Note node can contain the narration field of an invoice. Its content can be some complex HTML. Some localization (e.g. l10n_pe) doesn't support special characters like '\n' or '\u00A0'. This fix allows the localization modules to format the value used by Note node. opw-3744946 Linked enterprise PR: https://github.com/odoo/enterprise/pull/57268 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug where free product rewards were not working correctly in Next Order Coupon loyalty programs. Customers can now properly receive free products as rewards when using these coupons, improving the loyalty program functionality and customer experience.
Original PR description
Before this commit, the free product reward feature in a Next Order Coupon program was not functioning as expected. This commit fixes this issue, ensuring that free product rewards are correctly applied in Next Order Coupon programs. opw-3703485 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155400 Forward-Port-Of: odoo/odoo#153268
This fix resolves a crash that occurs when modifying depreciation entry dates for assets in the accounting module. The issue happened when sorting newly created entries, which wasn't properly handled in version 17.0. Users can now successfully adjust depreciation dates without encountering errors.
Original PR description
To reproduce: - Install account_accountant - Create an asset (monthly for example) - Compute Depreciation - Modify the date of the first entry to 2 months later - Modify the date of the second entry to 1 month later (so same month) => Traceback The problem is that sorted does not work with ids of NewId. We should look at its _origin. There is a PR that would try to fix it in general, but it's in master (and is not sure to be merged https://github.com/odoo/odoo/pull/155850) The problem only began to occur in 17.0 because of the changes of the onchange function. opw-3759153 (in chatter) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix corrects a bug in the manufacturing module where unbuilding a production order was using the originally planned component quantities instead of the actual quantities that were consumed. Now when you unbuild a manufacturing order, the system correctly reflects the actual components used rather than the planned amounts, ensuring accurate inventory tracking.
Original PR description
Step: * Create BoM A: product A - qty 1, bom line: product = Component X, qty = 20 * Create MO with Bom A and produced_qty = 1: + on components: To Consume = 20, Consumed = 15 + Unbuild MO, check Unbuild, check Product Moves of Unbuild, check line product Component X has Quantity = 20, in fact quantity must = 15 **I consumed a smaller quantity of components than planned, but when I unbuild MO, move lines of unbuild has quantity done = quantity planned, not the actual quantity consumption. I think this is a bug** Note: A test was added in `17.0` as the issue only appears from this version onwards. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152805
This update enhances the HR Contract module to properly track additional fields on employee contracts. By capturing more field changes, the system now maintains better audit trails and ensures all important contract modifications are recorded for compliance and record-keeping purposes.
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 ensures that scheduled actions (crons) are properly logged when run manually through the user interface, not just when executed automatically. This helps identify and prevent issues where the same scheduled action runs multiple times simultaneously, such as mass emails being sent twice, by providing better visibility into when and how these actions are executed.
Original PR description
The INFO "Starting job x" and "Job x done" logs are only logged for the automatic executing of the cron by the cron worker. When running the cron manually via its form view, no INFO was logged. The technical support is reporting problems where a cron server action is running twice at a same moment leading to problems such as mass-mailing sending emails twice. There is a mutual exclusion mechanism for cron workers but no exclusion mechanism seems in place for http worker vs cron worker. Logging the "run manually" actions will help us figuring out the problems. --- **[[FIX] base: concurrent cron worker and manual run](https://github.com/odoo/odoo/pull/154763/commits/3b74c9af776311e38a1712ab64cb42cd25188db4)** It is possible for a cron to be executed twice at a same moment if the cron is currently being executed by a cron worker and that a user click on the "run manually" button from its form view. Forward-Port-Of: odoo/odoo#156914 Forward-Port-Of: odoo/odoo#154763
This fix resolves an error that occurred when guest (public) users attempted to make payments through the Xendit payment system after entering their email address. The issue prevented public users from completing donation payments and other transactions, which is now corrected to ensure a smooth payment experience for all users regardless of account status.
Original PR description
When there's a payment that involves public user, an error will occur when they've input the email. An example is as you can see on the task when user wants to send donation as a public user task-3789416 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed a bug where saving custom snippets from event pages would preserve hidden branding markers, making the snippets impossible to remove and breaking page content when reused. The fix now cleans these internal markers before saving snippets, ensuring they work properly when added to other pages.
Original PR description
Steps to reproduce the bug: - Go to an event "Introduction" page - Enter edit mode - Click on the pre-existing "Introduction" title (note that it cannot be removed because of the way the page is built, we might want to improve that in master) - Save it as a new custom snippet - Go to your homepage - Drop that new custom snippet that was saved => It cannot be removed, the rest of the content is kinda broken as wells, etc etc. This is because the original branding was saved with the snippet. Indeed the event pages are made in such a way those pre-defined titles are snippets but which are "editable root elements", i.e. elements whose ancestors cannot be edited since themselves or their neighbors contain dynamic elements. opw-3633326 Forward-Port-Of: odoo/odoo#157189 Forward-Port-Of: odoo/odoo#157110
This fix prevents a system error that occurred when users pressed Enter while editing fields in the Accounting reconciliation module. The issue was caused by duplicate update requests being sent simultaneously, which could delete records unexpectedly. The fix ensures only one update is processed per keystroke, making the application more stable and reliable.
Original PR description
Steps to reproduce ================== In 16.4: - Go to Accounting > Reconcile 8 items - Click on the first line on the right - Edit the label and then press Enter - Switch to another line => Odoo…
Steps to reproduce ================== In 16.4: - Go to Accounting > Reconcile 8 items - Click on the first line on the right - Edit the label and then press Enter - Switch to another line => Odoo Server Error Cause of the issue ================== When pressing Enter, two events are triggered: keydown and change. In the useInputField hook, there is a listener for both of those events, and they both end up calling `record.update` with the current value from the input. In the relational model, the update is locked inside a mutex. So the first update (triggered by the keydown) does an onchange. This onchange deletes the current records (Command.CLEAR) and returns new records. Once this is done, the mutex is released. The second update (triggered by the change event) then tries the same update. Since the value was obtained when queuing for the mutex, it uses the old (now deleted) record. Solution ======== If the keydown handler was called and it was dirty at the time, isDirty would be reset to false. So we can simply check if the field is still dirty in the "change" handler. This was initially done in https://github.com/odoo/odoo/pull/154991 but got lost in a conflict resolution. opw-3726818 Forward-Port-Of: odoo/odoo#157105