Tuesday, August 6, 2024
41 changes · saas-17.4
Resolved issues and error corrections
This fix prevents work order action buttons from overlapping with the dropdown menu when users start or pause operations. It keeps the manufacturing work order list easier to read and use by recalculating button column widths in the editable view.
Original PR description
Since https://github.com/odoo/odoo/commit/3d9a6acaa73229408093ecc7c29cd9538450c0e7, the width of the wo buttons columns is not correct when pressing start/pause (overlapping with the dropdown menu).  This is due to the removal of the useEffect that now do not recompute the size of the columns each time one is added/modified). This commits adds the modified AutocolumnWidthRenderer to the editable tree view of work orders. task-id: 4074770 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The change ensures the New Password field is clearly visible when administrators change a user's password. This reduces confusion and helps administrators complete password updates more reliably.
Original PR description
Steps to Reproduce : - Go to Settings->User->Select an user - Click on the action menu and `Change Password` Expected Behavior : The `New Password` field should be clearly visible. Task-4072410
This fix ensures the landed costs test always has multi-currency and Euro enabled, regardless of which edition or modules are installed. It prevents false test failures in automated validation without changing business functionality for users.
Original PR description
The test of commit 34a42ddadab15 assumes the multi currency as well as Euro where activated. It's true only in case Enterprise modules are part of the installation. This commit makes sure it's activated in all cases. runbot error 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 fixes an unreliable automated test in the attendance planning view. It removes an unnecessary test step so results stay consistent, helping prevent false build failures without changing user-facing behavior.
Original PR description
The hoot helpers make the time advance more quickly. In AttendanceGanttModel, open ended records have their dateStopField set to the current moment. So, depending on the way time passes, the pills can have different ending columns. Here we remove a useless call to selectGanttRange, so that less time passes and we are sure we stay between 18h and 19h and not after 19h, so that "Attendance 6" ends at 6pm 02 November 2018 (included). Build 66529031
This update fixes unstable Helpdesk automated tests that could produce inconsistent results. It helps maintain confidence in releases by reducing false failures during quality checks, with no expected change for end users.
Original PR description
Builds: 66529036, 66529037, 66529039
This update prevents unnecessary background checks when viewing or editing Helpdesk teams, so the form only performs the check when a feature is newly enabled. It also stabilizes related automated tests, reducing false failures and improving confidence in future Helpdesk changes.
Original PR description
Before this commit, the test checking the reload_context is called only when the user enables for the first time a feature in helpdesk team. The test `reload the page when the feature use_timesheet is enabled in all teams` fails indeterminately because we don't wait enough to reload the page once the user clicks on the arrow right of the pager to get the second record. Moreover, it is not really possible to reproduce a hard reload in HOOT test (unmount and mount a view) and so this test has to be reviewed. This commit changes some conditions to call `check_modules_to_install` only when a feature is enabled on helpdesk team and it also reviews the test failed and updates the tests but also alter some tests to use hooks developed in web module. runbot-70509
Miscellaneous changes
- Updated the PAN field to be readonly in cases where a parent contact is present. - This ensures consistency and prevents accidental modification of inherited PAN information. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175833
Original PR description
- Updated the PAN field to be readonly in cases where a parent contact is present. - This ensures consistency and prevents accidental modification of inherited PAN information. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175833
Add some logs to log relevant information in various websocket scenarios. Like odoo logs for HTTP request, the completion of the operation is logged in INFO level with the execution time. e.g: `2024-08-02 09:32:20,542 1821 INFO ? odoo.addons.hw_drivers.websocket_client: device 'Virtual_Braille_BRF_Printer' action finished - 0.077` Detailed logs of the websocket message were set in DEBUG Replace the PR: https://github.com/odoo/odoo/pull/169525 to only keep the log part Forward-Port-Of: o
Original PR description
Add some logs to log relevant information in various websocket scenarios. Like odoo logs for HTTP request, the completion of the operation is logged in INFO level with the execution time. e.g: `2024-08-02 09:32:20,542 1821 INFO ? odoo.addons.hw_drivers.websocket_client: device 'Virtual_Braille_BRF_Printer' action finished - 0.077` Detailed logs of the websocket message were set in DEBUG Replace the PR: https://github.com/odoo/odoo/pull/169525 to only keep the log part Forward-Port-Of: odoo/odoo#175712 Forward-Port-Of: odoo/odoo#175497
Following odoo/odoo@ce41d1db9753, we should apply the same `invisible` logic for the new `<div class="o_col">` as the inner field, otherwise that element will still be rendered (even if empty) and will induce a shift - producing misalignment between label and its field. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175670
Original PR description
Following odoo/odoo@ce41d1db9753, we should apply the same `invisible` logic for the new `<div class="o_col">` as the inner field, otherwise that element will still be rendered (even if empty) and will induce a shift - producing misalignment between label and its field. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175670
When creating an expense to be paid to the employee, if the employee's contact had a parent_id, then when trying to register a payment for that expense, the bank account of the parent company was used instead. In https://github.com/odoo/odoo/commit/1ed71ba1fa176de9b0100b96f5af7d76c224e1a2 a fix was made to use the employee's bank account. That fix is now being reverted and being replaced with this commit instead. If we're creating an expense to be paid to the employee, we show a warning ban
Original PR description
When creating an expense to be paid to the employee, if the employee's contact had a parent_id, then when trying to register a payment for that expense, the bank account of the parent company was used instead. In https://github.com/odoo/odoo/commit/1ed71ba1fa176de9b0100b96f5af7d76c224e1a2 a fix was made to use the employee's bank account. That fix is now being reverted and being replaced with this commit instead. If we're creating an expense to be paid to the employee, we show a warning banner on the vendor bill and the expense sheet that they're invoicing their own company. task-3955593 Forward-Port-Of: odoo/odoo#175416 Forward-Port-Of: odoo/odoo#167816
## Description On large MOs with many lines, the `onchange` triggered when setting the `lot_producing_id` can be really slow. ## Analysis In `_set_quantity_done`, the `__set__` on `move_line_ids` triggers the computation of fields that depends on it. This necessitates the creation of a trigger tree, to know what fields on what model with what records needs to be recomputed. In this context, because some of the frequent dependencies, `raw_material_production_id` and `production_id` on `stoc
Original PR description
## Description On large MOs with many lines, the `onchange` triggered when setting the `lot_producing_id` can be really slow. ## Analysis In `_set_quantity_done`, the `__set__` on `move_line_ids`…
## Description On large MOs with many lines, the `onchange` triggered when setting the `lot_producing_id` can be really slow. ## Analysis In `_set_quantity_done`, the `__set__` on `move_line_ids` triggers the computation of fields that depends on it. This necessitates the creation of a trigger tree, to know what fields on what model with what records needs to be recomputed. In this context, because some of the frequent dependencies, `raw_material_production_id` and `production_id` on `stock.move` don't have a respective inverse *without* a domain on it, in `_modified_triggers`, we fall back on a generic lookup of cache entries + filtering, which can be costly, as it's `O(n)` in complexity, and `n` can be large, in this case it's over 18k records of `stock.move`, that's done 4 times (the tree has 2 instances for each of the above-mentionned `Many2one`) The process of resolution of the dependencies tree is repeated for each line of the MO, accentuating the bottleneck. ## Solution Adding two `One2many` fields to be the generic inverse of `raw_material_production_id` and `production_id` on `mrp.production`, so the ORM can use those to fall into the fast-path when resolving these dependencies. There are already two `One2many` on this model that are inverse of these `Many2one` (`move_raw_ids` and `move_finished_ids`), but they each have a domain, therefor the ORM cannot use them as an inverse during creation of the trigger tree. ## Benchmarks | | Before | After | |---------|--------|-------| | Timings | 91.8s | 14.1s | ## Reference opw-4003495 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170881
Issue ---- The german translation for some tax lines for Luxembourg have the wrong format. This makes the line get ignored when generating a XML report. Steps ---- - Install `l10n_lu`. - Change the fiscal country to Luxembourg. - Go to Accounting -> Tax Report. - Choose Tax Report (LU) from the Report button above. - Generate a XML report. - The XML report doesn't have the `767` & `768` codes. Cause ---- Corresponding tax lines are mis-formated. opw-4053595 Forwa
Original PR description
Issue ---- The german translation for some tax lines for Luxembourg have the wrong format. This makes the line get ignored when generating a XML report. Steps ---- - Install `l10n_lu`. - Change the fiscal country to Luxembourg. - Go to Accounting -> Tax Report. - Choose Tax Report (LU) from the Report button above. - Generate a XML report. - The XML report doesn't have the `767` & `768` codes. Cause ---- Corresponding tax lines are mis-formated. opw-4053595 Forward-Port-Of: odoo/odoo#175128 Forward-Port-Of: odoo/odoo#174223
When a downpayment was made in the sales app, it was not imported correctly in PoS when importing the order. Steps to reproduce: ------------------- * Create a sale order * Make a downpayment for the sale order (Create invoice -> downpayment) * Pay the downpayment * Open PoS and try to settle the order > Observation: The downpayment doesn't appear in the PoS Why the fix: ------------ Since this PR #148732 the downpayment product has been removed when doing a downpayment in PoS. It
Original PR description
When a downpayment was made in the sales app, it was not imported correctly in PoS when importing the order. Steps to reproduce: ------------------- * Create a sale order * Make a downpayment for the sale order (Create invoice -> downpayment) * Pay the downpayment * Open PoS and try to settle the order > Observation: The downpayment doesn't appear in the PoS Why the fix: ------------ Since this PR #148732 the downpayment product has been removed when doing a downpayment in PoS. It was causing the downpayment line to be filtered out when importing the order in PoS here https://github.com/odoo/odoo/blob/0592aa98bc582dab6ac739a82bf3f6d9ec372ec8/addons/pos_sale/models/sale_order.py#L61 opw-4021708 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173381 Forward-Port-Of: odoo/odoo#172302
This commit is a follow up of its enterprise part. We add the user_context to the the params of the function to have access to the allowed_companies of the current user later on in the process. affected version: 15.0- master task - 361682 https://www.odoo.com/web#id=3631682&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form Forward-Port-Of: odoo/odoo#171839 Forward-Port-Of: odoo/odoo#147768
Original PR description
This commit is a follow up of its enterprise part. We add the user_context to the the params of the function to have access to the allowed_companies of the current user later on in the process. affected version: 15.0- master task - 361682 https://www.odoo.com/web#id=3631682&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form Forward-Port-Of: odoo/odoo#171839 Forward-Port-Of: odoo/odoo#147768
To reproduce the issue: 1) Make an invoice using a tax impacting some tag 2) Add a tanslation to that tag 3) Switch the user language to the one you added a translation for 4) Open the tax report: the line the tag is linked to has a value of 0 ===> It should contain the value you added in 1) l10n_multilang makes the 'name' field of account.account.tag translatable. Because of that, it is important to always check the tags matching a report expression's formula using en_US as the language
Original PR description
To reproduce the issue: 1) Make an invoice using a tax impacting some tag 2) Add a tanslation to that tag 3) Switch the user language to the one you added a translation for 4) Open the tax report: the line the tag is linked to has a value of 0 ===> It should contain the value you added in 1) l10n_multilang makes the 'name' field of account.account.tag translatable. Because of that, it is important to always check the tags matching a report expression's formula using en_US as the language, to make sure the formula of the report expression matches the tag name (since that expression's formula is not translatable). enterprise: https://github.com/odoo/enterprise/pull/65030 Forward-Port-Of: odoo/odoo#173731 Forward-Port-Of: odoo/odoo#170041
This PR bugfix an error: "Error: Finalized Order cannot be modified" during a pos session. Steps to reproduce: 1. Install `pos_loyalty` module 2. Use any loyalty program (in video I used a gift card) on a pos order 3. Paid order but stay on "ReceiptScreen" 4. Click on "Orders" ("TicketButton") 5. Click on "New Order" 6. Click again on "Orders" and select paid order in status "Receipt" 7. "Error: Finalized Order cannot be modified" is shown Video of steps: https://www.loom.com/sha
Original PR description
This PR bugfix an error: "Error: Finalized Order cannot be modified" during a pos session.
Steps to reproduce:
1. Install `pos_loyalty` module
2. Use any loyalty program (in video I used a gift card) on a pos order
3. Paid order but stay on "ReceiptScreen"
4. Click on "Orders" ("TicketButton")
5. Click on "New Order"
6. Click again on "Orders" and select paid order in status "Receipt"
7. "Error: Finalized Order cannot be modified" is shown
Video of steps: https://www.loom.com/share/6ea8c86ebd994ce0958f42b6eb12c5db
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#172582
Forward-Port-Of: odoo/odoo#168142## Description It's really slow to archive a published course with many participants ## Analysis In `_recompute_completion`, we are recomputing the set of resume lines to check against to see if we should add a new resume line upon completion of a course for *each* employee associated with the course. Also the creation of resume lines is not batched. There is also *no* indexes of any sort on the `hr.resume.line` model. ## Solution - Refactor to remove the `search` inside the `for` - B
Original PR description
## Description It's really slow to archive a published course with many participants ## Analysis In `_recompute_completion`, we are recomputing the set of resume lines to check against to see if we…
## Description It's really slow to archive a published course with many participants ## Analysis In `_recompute_completion`, we are recomputing the set of resume lines to check against to see if we should add a new resume line upon completion of a course for *each* employee associated with the course. Also the creation of resume lines is not batched. There is also *no* indexes of any sort on the `hr.resume.line` model. ## Solution - Refactor to remove the `search` inside the `for` - Batch the create - Add missing indexes ## Benchmark Archiving a published course with ~30k participants, with a over 100k resume lines in the database. | No indexes | Before | After | Speed up | |------------|--------|-------|----------| | Timings | 1m39s | 17s | 5.8x | | With indexes | Before | After | Speed up | |--------------|--------|-------|----------| | Timings | 1m39s | 4.14s | 23.9x | ## Reference task-4043098 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173857
### Version: 15, 16, 17, master ### Description of the issue/feature this PR addresses: Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the partner to one with "Consumidor Final" AFIP Responsibility, then "Document Type" field is changed and this is not the desired behavior because that field is readonly when the invoice was posted. Compute method should not overried the docume
Original PR description
### Version: 15, 16, 17, master ### Description of the issue/feature this PR addresses: Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP…
### Version: 15, 16, 17, master ### Description of the issue/feature this PR addresses: Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the partner to one with "Consumidor Final" AFIP Responsibility, then "Document Type" field is changed and this is not the desired behavior because that field is readonly when the invoice was posted. Compute method should not overried the document type if the invoice was posted before. If it does then an incosistency will occurr because the name, document type and sequence will not match. A new sequence non-real will be used. Also the user it is not aware is happening because the field is readonly. [Video](https://drive.google.com/file/d/1D4uqNnXMkguS813NiLl9td4_f_TJ35Xf/view) showing how to replicate the bug: ### Steps to reproduce: 1. Log in with admin on runbot odoo enterprise 16 instance and install l10n_ar_edi (Argentinean Electronic Invoicing) module. 2. Take position on company "Responsable Inscripto" 3. Go to "Accounting / Customers / Invoices" and create a new customer invoice with customer "ADHOC SA" (this partner has "IVA Responsable Inscripto" AFIP Responsibility), with a sale journal "Pre-printed Invoice" AFIP POS System (i.e Ventas Preimpreso), add an invoice line and confirm it.  4. Reset to draft the invoice mentioned in step 3 (now journal and document type are readonly fields), change customer to "Consumidor Final Anónimo" (this partner has "Consumidor Final" AFIP Responsibility) and save. Check that the document type has changed from "(1) FACTURAS A" to "(6) FACTURAS B" and this is not the desired behavior because is a readonly field now because the invoice was posted before.  ### Current behavior before PR: When a customer invoice with customer with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the customer to one with "Consumidor Final" AFIP Responsibility, then "Document Type" field is changed and this is not the desired behavior because that field is readonly when the invoice was posted. ### Desired behavior after PR is merged: When a customer invoice with customer with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the customer to one with "Consumidor Final" AFIP Responsibility, then "Document Type" field is not changed. Ticket Adhoc side: 77058 Task latam: 1235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172003
The WebSocket worker is tied to a specific version. When this version changes, the worker's URL updates, creating a new worker. The old worker remains active as long as clients are connected to it. The updates may take time to propagate, leading to both the old and new workers being active simultaneously. This PR introduces a mechanism to ensure that client code updates are applied quicker. When the worker opens a WebSocket connection (typically after the server comes back online fol
Original PR description
The WebSocket worker is tied to a specific version. When this version changes, the worker's URL updates, creating a new worker. The old worker remains active as long as clients are connected to it. The updates may take time to propagate, leading to both the old and new workers being active simultaneously. This PR introduces a mechanism to ensure that client code updates are applied quicker. When the worker opens a WebSocket connection (typically after the server comes back online following an update), it provides the server with its version. If the version is outdated, the server closes the connection. Consequently, the worker will no longer open new WebSocket connections. Clients connected to an outdated worker will receive a notification prompting them to reload the tab. Additionally, outdated tabs will not be considered for the main tab election process. Forward-Port-Of: odoo/odoo#174962
Current behaviour: --- When sending an email through Email Marketing, the icon is right in the preview, but wrong in the received email. Steps to reproduce: --- 1. Install mass_mailing 2. Create a new mailing 3. Select a template with a twitter icon 4. The icon is the new one 5. Click on Test 6. Open the email 7. Wrong icon Cause of the issue: --- Twitter icons have been overriden in fontawesome_overridden.scss However this css is not loaded when writing the src in fontToImg
Original PR description
Current behaviour: --- When sending an email through Email Marketing, the icon is right in the preview, but wrong in the received email. Steps to reproduce: --- 1. Install mass_mailing 2. Create a new mailing 3. Select a template with a twitter icon 4. The icon is the new one 5. Click on Test 6. Open the email 7. Wrong icon Cause of the issue: --- Twitter icons have been overriden in fontawesome_overridden.scss However this css is not loaded when writing the src in fontToImg in convert_inline.js Fix: --- Same fix as for tiktok, forcing a custom font and changing the icon code to match the font (ie: one icon is F099 in FA but E800 in the custom font) opw-3963437 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173900 Forward-Port-Of: odoo/odoo#170942
### [FIX] hr_holidays: search for leaves in user's tz For the sake of simplicity we'd assume 3 days: Mon, Tue, Wed. Let's also assume that the everything happens in GMT+10 Now if we have a valid leave allocation for Mon and Tue, we should NOT be able to able to take it on Wed. However, because of the way Timestamps are casted to dates it is possible. It happens as follow: user "asking" server for leave on Wed, defines requested day by passing by the datetimes in the context ranging fr
Original PR description
### [FIX] hr_holidays: search for leaves in user's tz For the sake of simplicity we'd assume 3 days: Mon, Tue, Wed. Let's also assume that the everything happens in GMT+10 Now if we have a valid…
### [FIX] hr_holidays: search for leaves in user's tz
For the sake of simplicity we'd assume 3 days: Mon, Tue, Wed.
Let's also assume that the everything happens in GMT+10
Now if we have a valid leave allocation for Mon and Tue, we should
NOT be able to able to take it on Wed. However, because of the way
Timestamps are casted to dates it is possible. It happens as follow:
user "asking" server for leave on Wed, defines requested day by passing by
the datetimes in the context ranging from Tue 21:00 to Wed 09:00
Why such datetime range? Firstly because we have hardcoded devault values
for events that range from 07:00 to 19:00 in local time (ref.1).
Secondly because we're in GMT+10 so this range gets shifted:
07:00 on Wed becomes 21:00 on Tue
19:00 on Wed becomes 09:00 also on Wed
Then because allocations ranges are defined by dates not datetimes,
implicit casting is performed that causes cut-off of the time from the datetime
and in the end instead of checking if leave is allowed on Wed we check if
it is allowed on Tue and Wed.
### [FIX]
Shifting back into the user's timezone before casting.
### [Reproduction of the original issue]
- install hr_holidays
- create employee E
- create & validate new Allocation A (in TimeOff/Allocations):
- of type T (creating new type will help identify the issue)
- for employee E
- valid from Mon to Tue
- Open E's time off (Employee E -> Time Off)
- Switch your browser TZ that is +10
- Attempt to book time off for E on Wed
- BUG: you are allowed to do so
opw-3850159
(ref.1)
calendarEventToRecord from calendar_model
https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/legacy/js/views/calendar/calendar_model.js#L74-L75

Forward-Port-Of: odoo/odoo#175567
Forward-Port-Of: odoo/odoo#172748Versions -------- - 17.0+ Steps ----- 1. Go to Website / Shop; 2. click on a product; 3. click on the phone icon to get mobile view; 4. open the editor; 5. click on the product image; 6. set Layout / Image Zoom to Both; 7. save. Issue ----- Clicking on the product image doesn't zoom it. Cause ----- Commit 75cb82490200 improved zoom features. In the `_startZoom` function it added a comment to an early return, explaining zoom-on-hover should be ignored on mobile: https://
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Go to Website / Shop; 2. click on a product; 3. click on the phone icon to get mobile view; 4. open the editor; 5. click on the product image; 6. set Layout /…
Versions -------- - 17.0+ Steps ----- 1. Go to Website / Shop; 2. click on a product; 3. click on the phone icon to get mobile view; 4. open the editor; 5. click on the product image; 6. set Layout / Image Zoom to Both; 7. save. Issue ----- Clicking on the product image doesn't zoom it. Cause ----- Commit 75cb82490200 improved zoom features. In the `_startZoom` function it added a comment to an early return, explaining zoom-on-hover should be ignored on mobile: https://github.com/odoo/odoo/blob/75cb824902000b2c05716c8992ec486cf7102cea/addons/website_sale/static/src/js/website_sale.js#L490-L495 The issue is that this function also handles zoom-on-click, which gets skipped as well with the early return. This early return didn't fire in the editor before commit 55f182291164, because it checked the value of `config.device.mobile`, which was `undefined`. After this commit, it checks `uiUtils.isSmall()` instead, which does return true in the editor, fully disabling the ability to zoom-on-click: https://github.com/odoo/odoo/blob/55f1822911641a63309078dbc6dadf0c9fdc0796/addons/website_sale/static/src/js/website_sale.js#L341-L343 Solution -------- Move the check on `uiUtils.isSmall()` from the early return to the `salePage.dataset.ecomZoomAuto` check, so that only zoom-on-hover gets skipped on mobile. opw-3880081 Forward-Port-Of: odoo/odoo#170747
Versions -------- - 15.0+ Steps ----- 1. Have an employee on a 40 hour/week work schedule; 2. for a past week, create a sick leave for monday & tuesday; 3. create 8 hour timesheets for the remaining weekdays; 4. switch the employee's work schedule to 35 hour/weeks; 4. navigate to the week with the leaves in Timesheets. Issue ----- The hours displayed next to the employee name shows -11:00, ignoring the the timesheets created by the leaves. Cause ----- `resource.calendar.leav
Original PR description
Versions -------- - 15.0+ Steps ----- 1. Have an employee on a 40 hour/week work schedule; 2. for a past week, create a sick leave for monday & tuesday; 3. create 8 hour timesheets for the remaining…
Versions -------- - 15.0+ Steps ----- 1. Have an employee on a 40 hour/week work schedule; 2. for a past week, create a sick leave for monday & tuesday; 3. create 8 hour timesheets for the remaining weekdays; 4. switch the employee's work schedule to 35 hour/weeks; 4. navigate to the week with the leaves in Timesheets. Issue ----- The hours displayed next to the employee name shows -11:00, ignoring the the timesheets created by the leaves. Cause ----- `resource.calendar.leave` records have a `calendar_id` field which is inialized to the resource's calendar, and updates if the resource changes, but not when the resource's calendar changes. As a consequence, the `_work_intervals_batch` method used for this calculation gets called on the employee's new calendar, which is no longer related to the calendar associated with their leaves. Solution -------- Replace the `onchange_resource` method with a compute method which updates the leave's field if the employee's calendar changes. opw-3693131 Forward-Port-Of: odoo/odoo#172346 Forward-Port-Of: odoo/odoo#169291
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175603 Forward-Port-Of: odoo/odoo#175206
Original PR description
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175603 Forward-Port-Of: odoo/odoo#175206
When User opens an appointment with resource that does not have Opening Hours, a traceback will appear. Steps to reproduce the error: - Go to 'Appointments' > Configuration > Resources > Create a new Resource without opening hours (ex. court) > Save - Create new Appointment > Availability on: resources > Resource: court > Save - Click on Go to website or Preview Traceback: ``` AttributeError: 'bool' object has no attribute 'upper' File "odoo/http.py", line 2232, in __call__
Original PR description
When User opens an appointment with resource that does not have Opening Hours, a traceback will appear. Steps to reproduce the error: - Go to 'Appointments' > Configuration > Resources > Create a new…
When User opens an appointment with resource that does not have Opening Hours,
a traceback will appear.
Steps to reproduce the error:
- Go to 'Appointments' > Configuration > Resources >
Create a new Resource without opening hours (ex. court) > Save
- Create new Appointment > Availability on: resources > Resource: court > Save
- Click on Go to website or Preview
Traceback:
```
AttributeError: 'bool' object has no attribute 'upper'
File "odoo/http.py", line 2232, in __call__
response = request._serve_db()
File "odoo/http.py", line 1807, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1827, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1805, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1812, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1950, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/enterprise/saas-17.2/appointment/controllers/appointment.py", line 210, in appointment_type_page
return self._get_appointment_type_page_view(appointment_type, page_values, state, **kwargs)
File "home/odoo/src/enterprise/saas-17.2/website_appointment/controllers/appointment.py", line 108, in _get_appointment_type_page_view
return super()._get_appointment_type_page_view(appointment_type, page_values, state, **kwargs)
File "home/odoo/src/enterprise/saas-17.2/appointment/controllers/appointment.py", line 228, in _get_appointment_type_page_view
slots = appointment_type._get_appointment_slots(
File "home/odoo/src/enterprise/saas-17.2/appointment/models/appointment_type.py", line 798, in _get_appointment_slots
self._slots_fill_resources_availability(
File "home/odoo/src/enterprise/saas-17.2/appointment/models/appointment_type.py", line 1183, in _slots_fill_resources_availability
availability_values = self._slot_availability_prepare_resources_values(
File "home/odoo/src/enterprise/saas-17.2/appointment/models/appointment_type.py", line 1369, in _slot_availability_prepare_resources_values
resources_values.update(self._slot_availability_prepare_resources_leave_values(resources, start_dt_utc, end_dt_utc))
File "home/odoo/src/enterprise/saas-17.2/appointment/models/appointment_type.py", line 1422, in _slot_availability_prepare_resources_leave_values
unavailabilities = appointment_resources.sudo().resource_id._get_unavailable_intervals(start_dt_utc, end_dt_utc)
File "addons/resource/models/resource_resource.py", line 152, in _get_unavailable_intervals
resources_unavailable_intervals = calendar._unavailable_intervals_batch(start_datetime, end_datetime, resources, tz=timezone(calendar.tz))
File "odoo/tools/_monkeypatches_pytz.py", line 129, in timezone
return original_pytz_timezone(name)
File "__init__.py", line 183, in timezone
if zone.upper() == 'UTC':
```
https://github.com/odoo/odoo/blob/6cb52b4a02a7b3236c20863b177bfaadf474651d/addons/resource/models/resource_resource.py#L147 Here, when the user does not select Opening Hours in resource,
"calendar.tz" will be False.
So, it will lead to the above traceback.
sentry-5475389977
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#169038### Steps to reproduce * Switch to a Branch Company * Create a new expense * Try changing the account on the expense You should see that you cannot select accounts from the parent company. ### Cause This occurs because we limit the domain to taxes of the current company, without considering the parent opw-4013699 Forward-Port-Of: odoo/odoo#172391
Original PR description
### Steps to reproduce * Switch to a Branch Company * Create a new expense * Try changing the account on the expense You should see that you cannot select accounts from the parent company. ### Cause This occurs because we limit the domain to taxes of the current company, without considering the parent opw-4013699 Forward-Port-Of: odoo/odoo#172391
### Steps to reproduce * install `l10n_sa` * create a new invoice and add a line with a product and a custom label. * print the invoice You will see in the 'Description' column that the product's display name is shown instead of the label you set opw-4071925 Forward-Port-Of: odoo/odoo#175697 Forward-Port-Of: odoo/odoo#175025
Original PR description
### Steps to reproduce * install `l10n_sa` * create a new invoice and add a line with a product and a custom label. * print the invoice You will see in the 'Description' column that the product's display name is shown instead of the label you set opw-4071925 Forward-Port-Of: odoo/odoo#175697 Forward-Port-Of: odoo/odoo#175025
Prior to this commit, when adding a balancing line, it was incorrectly checked with the session currency instead of the company currency. opw-3985175 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170359
Original PR description
Prior to this commit, when adding a balancing line, it was incorrectly checked with the session currency instead of the company currency. opw-3985175 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170359
Prevent the activity button from overlapping the "See results" button in the ungrouped kanban mode on small screen sizes. Prevent the stats text (registered, completed, passed) from overlapping the separator and the other stats text on medium and larger screen sizes. Task-4061131 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173639
Original PR description
Prevent the activity button from overlapping the "See results" button in the ungrouped kanban mode on small screen sizes. Prevent the stats text (registered, completed, passed) from overlapping the separator and the other stats text on medium and larger screen sizes. Task-4061131 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173639
__Current behavior before commit:__ If `crm` is installed `test_import_multiple_invoices` will fail because the crm demo data are changing the email of the partner `base.res_partner_12` (i.e. Azure Interior)(see [crm_lead_demo.xml][1]). `partner` will therefore be `False`. __Description of the fix:__ Getting `partner` from the `base.res_partner_12` external id so this test does not depend on modifications from other modules. __Steps to reproduce the issue:__ Run: ```sh ./odoo/odoo-bin
Original PR description
__Current behavior before commit:__ If `crm` is installed `test_import_multiple_invoices` will fail because the crm demo data are changing the email of the partner `base.res_partner_12` (i.e. Azure…
__Current behavior before commit:__
If `crm` is installed `test_import_multiple_invoices` will fail because the crm demo data are changing the email of the partner `base.res_partner_12` (i.e. Azure Interior)(see [crm_lead_demo.xml][1]). `partner` will therefore be `False`.
__Description of the fix:__
Getting `partner` from the `base.res_partner_12` external id so this test does not depend on modifications from other modules.
__Steps to reproduce the issue:__
Run:
```sh
./odoo/odoo-bin -d test-17 -i crm,l10n_es --test-tags .test_import_multiple_invoices --addons-path=./enterprise,./odoo/addons
```
You will get:
```log
odoo.addons.l10n_es_edi_facturae.tests.test_edi_xml: FAIL: TestEdiFacturaeXmls.test_import_multiple_invoices
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/l10n_es_edi_facturae/tests/test_edi_xml.py", line 283, in test_import_multiple_invoices
self.assertRecordValues(moves, [
File "/home/odoo/src/odoo/odoo/tests/common.py", line 659, in assertRecordValues
self.fail('\n'.join(errors))
AssertionError: The records and expected_values do not match.
==== Differences at index 0 ====
---
+++
@@ -1 +1 @@
-partner_id:14
+partner_id:False
==== Differences at index 1 ====
---
+++
@@ -1 +1 @@
-partner_id:14
+partner_id:False
```
opw-4009379
[1]: https://github.com/odoo/odoo/blob/1c8e2555366fe6e6b0d74d6db71a29d09bd5f06a/addons/crm/data/crm_lead_demo.xml#L606
Forward-Port-Of: odoo/odoo#175601
Forward-Port-Of: odoo/odoo#173863Steps to reproduce: - My user > Preferences - Set notifications to 'Handle in Odoo' - Lunch > Configuration > Alerts - Add all locations to any alert - Debug mode > Scheduled Action - Manually run your alert An error occurs when trying to access the message thread because none was given. It is expected for messages of type user_notification not to have a thread, but this is never checked on the js side of things. This is because we assume information on the origin should be passed wh
Original PR description
Steps to reproduce: - My user > Preferences - Set notifications to 'Handle in Odoo' - Lunch > Configuration > Alerts - Add all locations to any alert - Debug mode > Scheduled Action - Manually run your alert An error occurs when trying to access the message thread because none was given. It is expected for messages of type user_notification not to have a thread, but this is never checked on the js side of things. This is because we assume information on the origin should be passed when sending the notification, which in this case we did not provide. opw-4057887 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174394
- Added Taxes for TDS sale type - Add the withholding control account - Added wizard for creating withholding(TDS) entries for invoice/bill and customer/vendor payment. - Also while creating a withholding(TDS) entry for an invoice/bill it will reconcile the withholding entry. Task - 3326777 Forward-Port-Of: odoo/odoo#168005
Original PR description
- Added Taxes for TDS sale type - Add the withholding control account - Added wizard for creating withholding(TDS) entries for invoice/bill and customer/vendor payment. - Also while creating a withholding(TDS) entry for an invoice/bill it will reconcile the withholding entry. Task - 3326777 Forward-Port-Of: odoo/odoo#168005
**Steps to reproduce:** - Install Accounting - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account (e.g. Test Account) - Go to "Accounting / Accounting / Miscellaneous / Journal Entries" - Create a journal entry: * Journal Items: ------------ Account | Debit | Credit -------------------------------------------- Test Account | $0.00 | $410.34 [any] | $410.34 | $0.00 - Post the journal e
Original PR description
**Steps to reproduce:** - Install Accounting - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account (e.g. Test Account) - Go to "Accounting / Accounting /…
**Steps to reproduce:**
- Install Accounting
- Go to "Accounting / Configuration / Accounting / Chart of Accounts"
- Create an account (e.g. Test Account)
- Go to "Accounting / Accounting / Miscellaneous / Journal Entries"
- Create a journal entry:
* Journal Items:
------------
Account | Debit | Credit
--------------------------------------------
Test Account | $0.00 | $410.34
[any] | $410.34 | $0.00
- Post the journal entry
- Go to "Accounting / Accounting / Management / Automatic Transfers"
- Create an automatic transfer:
* Origin Accounts: Test Account
* Automated Transfer:
-----------
Percent (%) | Destination Account
-----------------------------------------------
15.00 | [any]
42.50 | [any, but a different one]
42.50 | [any, but a different one]
- Activate the automatic transfer
- Compute transfer
**Issue:**
A UserError is raised while trying to create a journal entry because of a $0.01 difference between the total credit and the total debit.
**Cause:**
When the amounts of each line are computed from the percentage, they are not rounded.
These amounts are used to create the journal entries generated by the automatic transfer.
However, each created journal entry line is rounded, which can generate a rounding difference.
**Solution:**
Directly round the amounts when they are computed from the percentage to be sure that the amounts used for the computation and the ones that will be set in the journal entries are the same.
opw-3998808
Forward-Port-Of: odoo/enterprise#67956
Forward-Port-Of: odoo/enterprise#67644### Main Issue: When creating a sales order that triggers a delivery via Sendcloud, the delivery address on the label may be incorrect. It is due to a limited regex when trying to extract the house number from the 'street' field of the partner. ### Main change: Updated the regex pattern used to extract house numbers from postal address lines to increase accuracy and cover more address formats. ### Before: - Regex Pattern: `([1-9]+\w*)` - Explanation: This pattern captures one or more d
Original PR description
### Main Issue: When creating a sales order that triggers a delivery via Sendcloud, the delivery address on the label may be incorrect. It is due to a limited regex when trying to extract the house…
### Main Issue:
When creating a sales order that triggers a delivery via Sendcloud, the delivery address on the label may be incorrect. It is due to a limited regex when trying to extract the house number from the 'street' field of the partner.
### Main change:
Updated the regex pattern used to extract house numbers from postal address lines to increase accuracy and cover more address formats.
### Before:
- Regex Pattern: `([1-9]+\w*)`
- Explanation: This pattern captures one or more digits (not starting with zero) followed by any number of word characters (letters, digits, or underscores).
### After:
- Regex Pattern: `(\d+[-\/]?\d* ?[a-zA-Z]?\d*)(?![a-zA-Z])`
- Explanation: This improved pattern captures a broader range of house number formats, including those with dashes, slashes, spaces, and letters.
### Examples of the Differences:
"Friedrichstr. 13/1"
Before: '13'
After: '13/1'
"Rue du pont 11 A"
Before: '11'
After: '11 A'
"Place Albert 1er 15B"
Before: '1er'
After: '15B'
"123-456 Main Street"
Before: '123'
After: '123-456'
"789 C Oak Avenue"
Before: '789'
After: '789 C'
[opw-4042552](https://www.odoo.com/odoo/project/49/tasks/4042552)
Forward-Port-Of: odoo/enterprise#67344
Forward-Port-Of: odoo/enterprise#67286This commit's purpose is to disable the helpdesk ticket creation command when there are no teams available for the current connected user. Currently, using this command this way will create a new ticket without any team attached, rendering it useless. step to reproduce: - install helpdesk application - open helpdesk - open confifuration menu, select helpdesk team - select 'customer care' - activate the livechat option and saves - leave helpdesk - change from the current active company
Original PR description
This commit's purpose is to disable the helpdesk ticket creation command when there are no teams available for the current connected user. Currently, using this command this way will create a new…
This commit's purpose is to disable the helpdesk ticket creation command when there are no teams available for the current connected user. Currently, using this command this way will create a new ticket without any team attached, rendering it useless. step to reproduce: - install helpdesk application - open helpdesk - open confifuration menu, select helpdesk team - select 'customer care' - activate the livechat option and saves - leave helpdesk - change from the current active company to any other company that doesn't have any helpdesk team with the livechat feature enabled - open the discuss app and select the 'general' discussion - type /helpdesk your_ticket a new ticket will be created without any team linked to it. source of the issue: when a team has the livechat option enable, the command is added to the livechat regardless of the connected user's access right to the team. solution: Only add the command to the list of livechat command if the user has access to at least one team with the livechat feature enable. affected version : 15.0 - master task - 3631682 https://www.odoo.com/web#id=3631682&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form Forward-Port-Of: odoo/enterprise#66009 Forward-Port-Of: odoo/enterprise#53510
To reproduce the issue: 1) Make an invoice using a tax impacting some tag 2) Add a tanslation to that tag 3) Switch the user language to the one you added a translation for 4) Open the tax report: the line the tag is linked to has a value of 0 ===> It should contain the value you added in 1) l10n_multilang makes the 'name' field of account.account.tag translatable. Because of that, it is important to always check the tags matching a report expression's formula using en_US as the language
Original PR description
To reproduce the issue: 1) Make an invoice using a tax impacting some tag 2) Add a tanslation to that tag 3) Switch the user language to the one you added a translation for 4) Open the tax report: the line the tag is linked to has a value of 0 ===> It should contain the value you added in 1) l10n_multilang makes the 'name' field of account.account.tag translatable. Because of that, it is important to always check the tags matching a report expression's formula using en_US as the language, to make sure the formula of the report expression matches the tag name (since that expression's formula is not translatable). community: https://github.com/odoo/odoo/pull/170041 Forward-Port-Of: odoo/enterprise#66946 Forward-Port-Of: odoo/enterprise#65030
Redirect the user to reauthorize their consent directly from Odoo in a seamless manner if we receive a consent-expired error using the reauthorization endpoint (https://documentation.ibanity.com/ponto-connect/2/api/curl#reauthorization-request). Task: 3208460 Odoofin PR: https://github.com/odoo/odoofin/pull/255 Forward-Port-Of: odoo/enterprise#66483 Forward-Port-Of: odoo/enterprise#56901
Original PR description
Redirect the user to reauthorize their consent directly from Odoo in a seamless manner if we receive a consent-expired error using the reauthorization endpoint (https://documentation.ibanity.com/ponto-connect/2/api/curl#reauthorization-request). Task: 3208460 Odoofin PR: https://github.com/odoo/odoofin/pull/255 Forward-Port-Of: odoo/enterprise#66483 Forward-Port-Of: odoo/enterprise#56901
This commit add a csrf verification to the public /document/upload route This is change remains stable compliant due to not modifying the template. No module update is require for this change to work. This commit will break some custom implementation that call directly to the route. Forward-Port-Of: odoo/enterprise#67651 Forward-Port-Of: odoo/enterprise#67119
Original PR description
This commit add a csrf verification to the public /document/upload route This is change remains stable compliant due to not modifying the template. No module update is require for this change to work. This commit will break some custom implementation that call directly to the route. Forward-Port-Of: odoo/enterprise#67651 Forward-Port-Of: odoo/enterprise#67119
Steps ----- [Planning] - Create a shift from 1 July 2024 -> 31 July 2024 and chose the option to repeat it every month. Save it. 1st issue: no shift is created in September. 2nd issue: November shift ends in December and overlaps with December shift. Cause ----- - The 1st issue is caused by the first day of the September shift being on a weekend. In case the first day is not a working day, a shift will only be generated if the first day of the original shift was outside working days.
Original PR description
Steps ----- [Planning] - Create a shift from 1 July 2024 -> 31 July 2024 and chose the option to repeat it every month. Save it. 1st issue: no shift is created in September. 2nd issue: November shift…
Steps ----- [Planning] - Create a shift from 1 July 2024 -> 31 July 2024 and chose the option to repeat it every month. Save it. 1st issue: no shift is created in September. 2nd issue: November shift ends in December and overlaps with December shift. Cause ----- - The 1st issue is caused by the first day of the September shift being on a weekend. In case the first day is not a working day, a shift will only be generated if the first day of the original shift was outside working days. https://github.com/odoo/enterprise/blob/079b0ba241b8b4f7fbd74775e5fc43b27ca3c8fd/planning/models/planning_recurrency.py#L104-L107 - The 2nd issue happens because the length of all the repeated shifts is the same than the original shift. In the case of a longer original month, this will create overlapping generated shifts when we get to shorter months. Introduced by 079b0ba241b8b4f7fbd74775e5fc43b27ca3c8f Fix ----- - Consider a shift with any day (and not just the starting one) outside of working days as being outside working days. - Adapt the length of the generated shifts in case of a monthly recurrence. Take the minimum between the original shift duration in days and the number of days in the month. opw-3996123 Forward-Port-Of: odoo/enterprise#66408
Fix singleton error Steps: - Go to follow-up report - Select 2 partners in the list view - Select "Print Customer Statements" in the action menu -> Singleton error opw-4075655 Forward-Port-Of: odoo/enterprise#67610
Original PR description
Fix singleton error Steps: - Go to follow-up report - Select 2 partners in the list view - Select "Print Customer Statements" in the action menu -> Singleton error opw-4075655 Forward-Port-Of: odoo/enterprise#67610
The cancel_shipment method name is incorrect, due to the leading _ which causes it to not be picked up when cancelling a picking. This means that starshipit packages do not get archived automatically when cancelling then in Odoo, as you would expect them to be. Task id # 4074169 Forward-Port-Of: odoo/enterprise#67927
Original PR description
The cancel_shipment method name is incorrect, due to the leading _ which causes it to not be picked up when cancelling a picking. This means that starshipit packages do not get archived automatically when cancelling then in Odoo, as you would expect them to be. Task id # 4074169 Forward-Port-Of: odoo/enterprise#67927