Daily updates from Odoo
Wednesday, February 26, 2025
46 changes · 18.0
Enhancements to existing features
This change removes accounting tax code hooks that are no longer needed after a related enterprise change was reverted. It simplifies internal maintenance without changing day-to-day accounting workflows for users.
Original PR description
The code has been introduced initialy by: https://github.com/odoo/odoo/commit/4cbd6cc52cb96cc20d41974a37410a37fd9902f5 ...but since the override has been reverted in: https://github.com/odoo/enterprise/commit/4f77e313ee9e97164f3ffe0e492f8f036fa53c50 ... those hooks are no longer necessary. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Call invitations in Odoo Discuss are now automatically removed after 30 seconds if the recipient does not respond. This prevents unanswered calls from ringing indefinitely and reduces interruptions for busy users.
Original PR description
Before this PR, rtc invitations were only canceled when the user clicked on the decline button. Sometimes, users are busy and having this call invitation that keeps ringing forever is cumbersome. This PR removes this invitation after 30s. task-4345479 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
The Luxembourg payroll module has been updated with the official 2025 figures for tax credits and withholding tax rules. This helps ensure payroll calculations remain aligned with the latest government requirements for Luxembourg employees.
Original PR description
Update the official numbers of the Luxembourg payroll rules for 2025. task-4577491
Resolved issues and error corrections
Several spreadsheet dashboards now include missing or misplaced formulas, so totals and metrics display correctly. This improves reliability for invoicing, timesheets, warehouse valuation, and ecommerce reporting without changing workflows.
Original PR description
All these issues were spotted using the new irregularity map feature (task 4357729) Task: 4387232 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Deleting a product attribute value that is not used by any product now removes it instead of simply archiving it. This keeps product configuration data cleaner and avoids leaving unnecessary inactive values in the system.
Original PR description
**Avoid archive attribute value when is not been used** Impacted versions: - 18.0 and later ### Steps to reproduce: 1. Create a new attribute with attribute values (ex: value 1) 2. Delete the attribute value 3. Confirm that the attribute value still exists (archived instead of deleted) ### Current behavior: - Attribute value is being archived ### Expected behavior: - Attribute value must be deleted Task: [4551094](https://www.odoo.com/odoo/my-tasks/4551094)
The restaurant point-of-sale test was updated to check for the bill's unique code and portal link instead of relying on a QR code check. This helps keep automated testing aligned with what customers and staff actually see, reducing false failures in quality checks.
Original PR description
In this commit: === - Updated tour test to verify the presence of both the unique code and portal URL instead of a QR code check. runbot: 111424
The Point of Sale screen saver now blocks certain user actions, such as clicks, from reaching the active sales screen behind it. This prevents accidental actions like adding products when a user wakes or interacts with the screen saver.
Original PR description
When the user is on the screen saver, we do not want to propagate some events like click so that his click does not do something unexpected in the POS (like adding a product or something). This commit adds a check in the onAlive method of the pos app to stop the event propagation of some events when the screen saver is active. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an error when users create an exchange return from a receipt that has no origin reference. Odoo now uses a safe blank fallback, allowing the return process to complete normally instead of showing a traceback.
Original PR description
Currently, a traceback is occurring when the user tries to create an exchange return without giving the origin value in picking. To reproduce this issue: 1) Install `purchase_stock` 2) Create a stock…
Currently, a traceback is occurring when the user tries to create an exchange return without giving the origin value in picking. To reproduce this issue: 1) Install `purchase_stock` 2) Create a stock picking with operation type as `receipts` and don't give the `origin` value 3) Add a product in operation that contains vendor records in the product 4) `Validate` the product and click the `return` button to open a wizard 5) Update the qty to return and click the `Return for Exchange` button Error:- ``` TypeError: sequence item 0: expected str instance, bool found ``` This traceback occurs from the line below because we are getting the origin value as False from the procurements. https://github.com/odoo/odoo/blob/949ed6f30f539dd787594511751bda0e714a5409/addons/purchase_stock/models/stock_rule.py#L119 The origin value of this procurement is directly taken from the origin value of picking. The above traceback occurs because the user didn't provide the origin value in picking. We can resolve this issue by providing a fallback value of an empty string if there is no origin in picking. sentry-6316652948
Point of Sale receipts no longer show lot or batch information twice when an order includes lot-tracked products. This keeps receipts clearer for customers and avoids confusion at checkout.
Original PR description
Before this commit, when validating an order containing a product tracked by lot, the lot information would appear twice on the receipt. opw-4509159 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Canceling a signed Mexican payment from the electronic invoice cancellation table now also cancels the related payment record. This prevents payments from incorrectly remaining posted after their accounting entry has been canceled, improving consistency for Mexican electronic invoicing workflows.
Original PR description
Since Odoo 18.0, account.payment no longer inherits from account.move. As a result, canceling a payment with `_l10n_mx_edi_cfdi_move_post_cancel` does not automatically cancel the associated payment record. Steps to reproduce: - Ensure the Mexican localization is installed and properly configured. - Generate an invoice and sign it with the government (CFDI). - Create and sign a payment for the invoice. - Cancel the payment from the CFDI table. Current behavior: - Odoo cancels the move, but the related payment remains posted. Expected behavior: - The payment should also be canceled when the move is canceled. This fix ensures that the associated payment is canceled correctly. opw-4528910
This fixes an issue in Sales Loyalty where a loyalty card could not be used unless it had an associated rule. Businesses can now honor valid loyalty cards more reliably, reducing checkout or order processing friction for customers and staff.
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 fixes a crash that could happen when opening a vendor bill using cash rounding by tax after taxes were removed. Users can now continue editing these bills without being blocked by an error.
Original PR description
The Error is reproducible in the runbot here is an attached video with the steps: https://drive.google.com/file/d/1W1ZJG7aYueFa8Y24LSZlsil0caZB9mE5/view?usp=sharing This happens because of : 1- cash rounding is enabled in the settings of accounting 2 - cash rounding by tax is chosen 3 - opening a vendor bill 4 - putting a decimal price and removing taxes 5- then choosing cash rounding by tax The Error : File "/home/odoo/odoo/odoo/addons/account/models/account_move.py", line 1570, in _compute_tax_totals move.tax_totals = self.env['account.tax']._get_tax_totals_summary( File "/home/odoo/odoo/odoo/addons/account/models/account_tax.py", line 2090, in _get_tax_totals_summary max_subtotal, max_tax_group = max( ValueError: max() arg is an empty sequence opw-4558251 (related to ticket)
Public visitors can no longer see the option to add reactions to portal chatter messages. This prevents an error that occurred when logged-out users tried to react to customer reviews or similar messages.
Original PR description
Since [this commit], the backend chatter can be used on the portal. Public users were able to attempt adding reactions to messages, which led to an error. This commit hides the add reaction button for public users to prevent this issue. Steps to reproduce the issue: 1. Install website_sale module. 2. Go to a website page product. 3. Open the edit mode, click on the product. 4. Activate the Rating option and save the page. 5. Scroll down the product page and add a customer review. 6. Log out and go to the product page. 7. Try to add a reaction to the review. => Traceback. [this commit]: https://github.com/odoo/odoo/commit/368eb78a9cedfce0802b64fd2782e1c018541e40 opw-4436633
Invoices now display product serial numbers whenever serialized products are included, regardless of the viewer's user group. This ensures customers and staff can see the required product identification details on invoice documents.
Original PR description
Problem: The Serial Number of a product is not being displayed on an invoice. The Serial number should be displayed on the invoice if there is a product tracked by Serial Number in the invoice. The groups is preventing the display of this Serial Number section: https://github.com/odoo/odoo/blob/d99e44f22634ac589a940d85fab84ca2b2e85332/addons/stock_account/views/report_invoice.xml#L5 Steps to reproduce: -Make a SO of a product with a serial number -Deliver it -Create an invoice -Preview it and the Serial Number of the product won't be displayed Fix: The groups tag was removed so that everyone can see the Serial Number of the product being bought. opw-4489382
This fix ensures quality checks are triggered correctly when warehouse receipts are created and validated through the barcode app. It prevents missed or duplicate checks, helping teams keep inventory validation aligned with required quality controls.
Original PR description
The Error is reproducible in the runbot here is an attached video with the steps: https://drive.google.com/file/d/1W1ZJG7aYueFa8Y24LSZlsil0caZB9mE5/view?usp=sharing
This happens because of :
1- cash rounding is enabled in the settings of accounting 2 - cash rounding by tax is chosen
3 - opening a vendor bill
4 - putting a decimal price and removing taxes
5- then choosing cash rounding by tax
The Error :
File "/home/odoo/odoo/odoo/addons/account/models/account_move.py", line 1570, in _compute_tax_totals
move.tax_totals = self.env['account.tax']._get_tax_totals_summary(
File "/home/odoo/odoo/odoo/addons/account/models/account_tax.py", line 2090, in _get_tax_totals_summary
max_subtotal, max_tax_group = max(
ValueError: max() arg is an empty sequence
opw-4558251 (related to ticket)This update corrects how pickup delivery configuration rules are checked so they respond to the right setup changes. It helps prevent incorrect validation behavior when businesses configure in-store pickup options for online sales.
The message reaction menu now uses an X icon instead of a trash icon when removing a reaction. This better communicates that only the reaction is being removed and makes the button behavior feel clearer and less alarming.
Original PR description
Before this commit, icon to remove a message reaction in message reaction menu was trash rather than "X". This gave a wrong impression that this button has more implication that it really is. This commit replaces it with a "X". Also adapt slightly the style to have reduced visibility on item hover and full visibility when the button is hovered. This makes it more natural to click on the button. Task-4589558 Before  After 
This fix restores the ability to drag and drop fields in Odoo Studio even when those fields are present only because they are used in view rules or expressions. It helps users adjust Studio layouts more reliably without fields becoming unexpectedly locked in place.
Original PR description
this follows commit 0f9d262fb1de2ea4355fc3a6f6d0152e67ccd37e which forgot a few things to enable drag/dropping for fields that are in the view but because of their automatic addition by ir.ui.view when the field is used in an expression. opw-4578365
Removing a Studio-created field from employee contracts no longer causes salary contract calculations to crash. This keeps contract management stable while still allowing more deliberate custom extensions.
Original PR description
…cies Add a boolean field on hr.contract via studio. Then remove that field from the model. That last operation crashes because _compute_final_yearly_costs has a dynamic depends on it which take many fields of the model. While we don't want to exclude every custom fields (starting with "x_") to continue to allow sufficient extension points we do exclude studio fields specifically, because those are not meant to be used in a complex compute method. After this commit, there is no crash opw-4503855
Several spreadsheet dashboards now include missing or corrected formulas, ensuring totals and tables display the right business information. This improves reliability for CRM, purchasing, stock, and subscription reporting dashboards without changing user workflows.
The Belgian payroll individual account report now separates account lines by payroll structure. This helps businesses review employee payroll details more accurately when multiple structures apply.
This fix improves the Manufacturing Planning Schedule so quantities stay accurate when users switch between days, weeks, months, or years. It reduces misleading totals caused by period changes, helping planners make better replenishment decisions, though very large planning ranges may take longer to calculate.
Original PR description
Context: the MPS only creates records when numbers have been manually input. If the number input is superior to the `max_to_replenish_qty`, the leftover is reported to the next period via…
Context: the MPS only creates records when numbers have been manually input. If the number input is superior to the `max_to_replenish_qty`, the leftover is reported to the next period via computation, meaning no record is created. This means that every time the MPS is opened or refreshed, the computation happens. Issue: with the inclusion of the period switcher, some issues have been revealed concerning quantity computation and period switching. Solution: to be sure that numbers are accurate, the MPS will compute in 2 steps using 2 date ranges: - the `shown_date_range`: it's the one the user sees, the number of period shown is defined in the settings - the `default_date_range`: it's the one selected in the settings it uses the start and end of the `shown_date_range` to build itself E.g. 1: if your `shown_date_range` is month with 6 periods to show and your `default_date_range` is days, the MPS will calculate everything day per day before doing sums for each month. Meaning it will do ~180 computations, one for each day. E.g. 2: if your `shown_date_range` is 12 weeks and your `default_date_range` is in years, the MPS will calculate everything on 2 years (the current year and the next) in case the `shown_date_range` is straddling 2 years. Once the computation is done, it will insert the yearly `forecast_ids` (date == 01/01/2025) and place it in week 1 of 2025 (30/12/2024 to 05/01/2025), all other weeks should show zero. Pros: - it's precise Cons: - it's potentially very slow in extreme cases: if you want to show 4 years and your default period is in days, this means the MPS will calculate quantities for 1461 days before summing them in 4 years. This should be alleviated with task 4370071 where the default period type is not a general setting anymore but defined separately on each MPS product record. - manual input, when not in the default period type, can be displaced to a previous shown period or absorbed in the sum of the previous default period. This is most often because weeks are one of the 2 period types and how they never fit neatly because the Gregorian Calendar is the drunk way of keeping time with some month having 30 days, some having 31 and then there's February who changes its mind once every 4 years. task 4381366
Opening the “Info and tag” panel from a document preview no longer triggers an error when the selected document is not available on screen. This keeps the Documents workflow stable and avoids interruptions for users managing document information.
Original PR description
### Issue: - When we select a document and click on the "Info and tag" button, a traceback is thrown. ### Steps to reproduce: - Open the documents app - Preview a document - Click on the "Info and tag" in the "Action" dropdown menu - a traceback is thrown ### Solution: - When we click on the "Info and tag" button, `onToggleChatter` is called, in it we try getting the element of the selected document and scrolling to it, if the `querySelector` returns null, and we try to call `scrollIntoView` on it, a traceback is thrown. - we fixed this by adding the optional chaining operator `(?.)` to safely call scrollIntoView only if querySelector returns an element. - although not directly related to the issue, we also added a small check to disconnect any previous `MutationObserver` before creating a new one. OPW-4586089
The bank reconciliation manual operation tab has been adjusted to make information easier to scan. Extra spacing was removed and related details were grouped more compactly, improving usability for accounting teams.
Original PR description
This commit will do a backport of: https://github.com/odoo/enterprise/commit/eaf8361f44208346c20e4c50c2d9914ab2d4f3f5 and also remove some margin to have a more compacted view and will put most of the information in one div. task:4542756
The Sign module's automated check was updated to match the current completion message shown after signing a document. This prevents false test failures and helps keep the signing workflow reliable for users.
Original PR description
Before this commit, the runbot would fail with Script Timeout when executing the `shared_sign_request_tour` tour. The main problem was the title of the modal being changed from "All done!" to "It's signed!" without updating the tour itself. The secondary problem was the limitation added in the tour of clicking a button inside a modal: this one is not allowed anymore. After this commit, we removed the 'Download button' trigger in the tour as it is not allowed anymore and updated the string for the correct modal title in the tour, from "All done!" to "It's signed!". runbot-98514
Twitter account metric and stream refresh failures caused repeated error-level logs when the external service returned authorization-related responses. The change downgrades these messages to warnings, reducing unnecessary terminal and monitoring noise while still keeping administrators informed.
Original PR description
Currently, the error message occurs when failed to fetch the account metrics.
```
Error Message: Failed to fetch the account (2) metrics: '{\n \'title\':
\'Unauthorized\',\n \'type\': \'about:..
```
This error message occurs when fetching social stream posts and refreshing statistics, so replace a logger error message with a logger warning message at [1], [2] to prevent more error logs in a terminal.
link [1]: https://github.com/odoo/enterprise/blob/6e581b9dbf0c141e212f1641fc9cb37a05140cff/social_twitter/models/social_live_post.py#L48
link [2]: https://github.com/odoo/enterprise/blob/af2db721417794ccda73ab83da388a782c94a911/social_twitter/models/social_stream.py#L91
sentry-4536687715Followup report title and columns were not added to `.pot` file for translation
Original PR description
Followup report title and columns were not added to `.pot` file for translation
Code cleanup and technical improvements
This update simplifies internal tests for website tour behavior so they wait for tours to finish in a more direct way. It does not change user-facing features, but helps developers maintain test coverage more reliably and clearly.
Original PR description
In this commit, we adapt the unit tests to use macro.isComplete. In all these tests, what we want to verify in the end is that the macro or tour has performed as expected. This allows to remove all await advanceTime() or await animationFrame() and makes the tests much clearer. 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
Miscellaneous changes
**Problem**: When focusing on an empty button (`<a>` tag with `btn` class) and pressing backspace, any visible content before it gets deleted. This happens because buttons are not considered as visible content when handling deletions. **Solution**: Modify `oDeleteBackward` to detect elements with the `btn` class. When deleting such an element, update the selection to avoid deleting preceding content. **Steps to Reproduce**: 1. Open the website builder. 2. Add some content with a button
Original PR description
**Problem**: When focusing on an empty button (`<a>` tag with `btn` class) and pressing backspace, any visible content before it gets deleted. This happens because buttons are not considered as visible content when handling deletions. **Solution**: Modify `oDeleteBackward` to detect elements with the `btn` class. When deleting such an element, update the selection to avoid deleting preceding content. **Steps to Reproduce**: 1. Open the website builder. 2. Add some content with a button. 3. Insert a form just before the button. 4. Press backspace while focusing on the button. 5. The form gets deleted along with the button. opw-4280705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198298 Forward-Port-Of: odoo/odoo#196781
Steps: - Set domain of an embedded action to false - this override the default value - Try to use the embedded action Actual result: - Error due to invalid domain Expected result: - Embedded action work and use empty domain as default opw-4529210 opw-4563505 Forward-Port-Of: odoo/odoo#196919
Original PR description
Steps:
- Set domain of an embedded action to false
- this override the default value
- Try to use the embedded action
Actual result:
- Error due to invalid domain
Expected result:
- Embedded action work and use empty domain as default
opw-4529210
opw-4563505
Forward-Port-Of: odoo/odoo#196919Versions -------- - saas-17.4+ Steps ----- 1. Create a new product with a lot of variants; 2. publish it to the website; 3. edit the website home page to add a product carousel; 4. set it to display newest products & hide variants. Issue ----- Fewer than 16 products are displayed in the carousel. Cause ----- Unlike the other product filters handled in https://github.com/odoo/odoo/pull/189040, the "Newest Products" filter is defined in `data/data.xml`, and stored as a record.
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Create a new product with a lot of variants; 2. publish it to the website; 3. edit the website home page to add a product carousel; 4. set it to display…
Versions -------- - saas-17.4+ Steps ----- 1. Create a new product with a lot of variants; 2. publish it to the website; 3. edit the website home page to add a product carousel; 4. set it to display newest products & hide variants. Issue ----- Fewer than 16 products are displayed in the carousel. Cause ----- Unlike the other product filters handled in https://github.com/odoo/odoo/pull/189040, the "Newest Products" filter is defined in `data/data.xml`, and stored as a record. This means it doesn't use the `_get_products` method to perform the search, instead using the `_prepare_values` method from the `website` module. For obvious reasons, the method defined in `website` doesn't take the `hide_variants` parameter into account to get the correct amount of search results: https://github.com/odoo/odoo/blob/0f64298c871ffea088a4fe6255d19852c8348159/addons/website/models/website_snippet_filter.py#L102-L108 Instead it passes 16 `product.product` records to the `_filter_records_to_values` override in `website_sale`, where duplicate templates are filtered out, resulting in fewer than 16 product templates: https://github.com/odoo/odoo/blob/0f64298c871ffea088a4fe6255d19852c8348159/addons/website_sale/models/website_snippet_filter.py#L73-L76 Solution -------- When calling `super()._prepare_values` for stored `product.product` filters, temporarily square the usual limit for the search, and filter reduce to size later. This may still be inadequate when working with products with dozens of variants, but should cover most normal use cases without requiring drastic changes to filter templates or search domain in stable. On master, we could add a new filter specifically for `product.template`. opw-4302856 Forward-Port-Of: odoo/odoo#195857
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e; `res.users.settings` will be opened which is an inappropriate behavior. Whenever a User is created that user will be reflected within that menu. There's no meaning of having `New` button when no user is created to handle. Solution: ----------- Some users do not have a user settings yet, so it is a p
Original PR description
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e;…
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e; `res.users.settings` will be opened which is an inappropriate behavior. Whenever a User is created that user will be reflected within that menu. There's no meaning of having `New` button when no user is created to handle. Solution: ----------- Some users do not have a user settings yet, so it is a perfectly valid use case to create one. We should not artificially prevent acceptable behavior in technical/admin menus. Steps to reproduce: ------------------------ 1. Create a database in version 16.0. 2. Go to `User Settings`. 3. Click On `New` button. Try making changes and save. 4. An Invalid Field `User` error will Occur. This is because there's a many2One field i.e; `user_id` within the tree and form views which is basically an existing user. The `New` button will open a form view with no User which is a must. And will cause the Invalid field error when trying to save any change. Ref: https://github.com/odoo/odoo/blob/16.0/addons/mail/views/res_users_settings_views.xml#L24 Ref Screenshot:  Co-Authored By - @seb-odoo Forward-Port-Of: odoo/odoo#196844 Forward-Port-Of: odoo/odoo#193400
- Fix for following runbot error : https://runbot.odoo.com/odoo/runbot.build.error/111599 - Remove useless steps in `tip_screen_tour` so that it run successfully. The tour was always failing except when adding `step_delay`. - The step `TipScreen.isShown()` was failing. This was due because the previous step (validate payment) was not doing anything. This was caused by the fact that the order was syncing two times (syncAllOrders) with too short a time interval, causing the second call to `syncA
Original PR description
- Fix for following runbot error : https://runbot.odoo.com/odoo/runbot.build.error/111599 - Remove useless steps in `tip_screen_tour` so that it run successfully. The tour was always failing except when adding `step_delay`. - The step `TipScreen.isShown()` was failing. This was due because the previous step (validate payment) was not doing anything. This was caused by the fact that the order was syncing two times (syncAllOrders) with too short a time interval, causing the second call to `syncAllOrders` filtering out our order (see `syncingOrders` set in `syncAllOrders` method). - The first call to `syncAllOrders` was triggered by going back to the floorscreen, and I've removed it so now the validate payment and next steps are correctly executed. runbot error: 111599 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199187
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state: https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move exceeds its `product_uom_qty`, extra moves will be created, confirmed and merged back to the move in order to update its `product_uom_qty`:
https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1885-L1890 https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1823-L1832 However, the action confirm of this extra move will trigger the same override of the `_action_confirm` that creates a quality check and it will even be called on the original move that was already confirmed and already created its QC since the extra move was merged into it: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
As a result we end up with an extra quality check creation.
### Fix:
We avoid quality check creation during extra move confirmation.
Enterprise: https://github.com/odoo/enterprise/pull/76301
opw-4266053
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#197122
Forward-Port-Of: odoo/odoo#192034At confirmation page, we wait 500 ms before printing the order. That led to some problems when the user did not have a good network connection since the order was not yet initialized that the order would be printed and thus leading to an error. Here, if the order is not initialized yet, we reset a timeout to print the order runbot-error: 111762 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199050
Original PR description
At confirmation page, we wait 500 ms before printing the order. That led to some problems when the user did not have a good network connection since the order was not yet initialized that the order would be printed and thus leading to an error. Here, if the order is not initialized yet, we reset a timeout to print the order runbot-error: 111762 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199050
Before this commit: =================== - when creating a discount and loyalty program type coupon with rules for minimum quantity and purchase equals 1, along with a specific product reward, `multiple reward order lines` were erroneously generated if the coupon balance exceeded 1. - upon refreshing the page, the reward line quantity would increment incorrectly. After this commit: ================== - with this commit, only one reward order line is created per coupon application, a
Original PR description
Before this commit: =================== - when creating a discount and loyalty program type coupon with rules for minimum quantity and purchase equals 1, along with a specific product reward, `multiple reward order lines` were erroneously generated if the coupon balance exceeded 1. - upon refreshing the page, the reward line quantity would increment incorrectly. After this commit: ================== - with this commit, only one reward order line is created per coupon application, and the coupon now correctly applies only once, resolving the previous inconsistencies. task - 3869549 Forward-Port-Of: odoo/odoo#196109 Forward-Port-Of: odoo/odoo#162359
Before this commit: ========== - The floating order dialog title was not translated due to the use of `title.translate` in the .js file. After this commit: ========== - The floating order dialog title will be translated. task-4576073 Forward-Port-Of: odoo/odoo#198490
Original PR description
Before this commit: ========== - The floating order dialog title was not translated due to the use of `title.translate` in the .js file. After this commit: ========== - The floating order dialog title will be translated. task-4576073 Forward-Port-Of: odoo/odoo#198490
Following the ticket opw-4523417 there is a lack of logging related to printing in hw_drivers module which makes it difficult to analyse the issued on the client's side, especially on Windows IoT This PR adds 1) some logs upon receiving of a printing request via longpolling route 2) some logs when the methods of printing are being called 3) some logs when these methods have finished their job Since for printing the Odoo database isn't notified of a succeful printing this is very much ne
Original PR description
Following the ticket opw-4523417 there is a lack of logging related to printing in hw_drivers module which makes it difficult to analyse the issued on the client's side, especially on Windows IoT This PR adds 1) some logs upon receiving of a printing request via longpolling route 2) some logs when the methods of printing are being called 3) some logs when these methods have finished their job Since for printing the Odoo database isn't notified of a succeful printing this is very much needed Forward-Port-Of: odoo/odoo#197823 Forward-Port-Of: odoo/odoo#197687
Forward-Port-Of: odoo/odoo#197707 Forward-Port-Of: odoo/odoo#197127
Original PR description
Forward-Port-Of: odoo/odoo#197707 Forward-Port-Of: odoo/odoo#197127
Starting from January 6th, 2025, USPS _silently_ migrated to a new developer portal (devloper`s`.usps.com instead of developer.usps.com). See: https://developer.usps.com/getting-started. The new portal also introduces new base URL for their endpoints (See: https://developers.usps.com/sites/default/files/2024-10/USPS%20API%20Cloud%20Enrollment.pdf). Users who registered after this date didn't manage to use Odoo shipping connector for USPS since it used the old endpoints. This commit updat
Original PR description
Starting from January 6th, 2025, USPS _silently_ migrated to a new developer portal (devloper`s`.usps.com instead of developer.usps.com). See: https://developer.usps.com/getting-started. The new portal also introduces new base URL for their endpoints (See: https://developers.usps.com/sites/default/files/2024-10/USPS%20API%20Cloud%20Enrollment.pdf). Users who registered after this date didn't manage to use Odoo shipping connector for USPS since it used the old endpoints. This commit updates the used endpoints so that it's compatible with the new portal. opw-4576028 Forward-Port-Of: odoo/enterprise#80152
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it takes the same VAT as the closest parent with VAT) 3. In Accounting > Reporting > Tax Report 4. Select only the company with a different VAT. The button to export an XML is not enabled. 5. Select the parent company and the company without VAT. The button to export an XML is not enabled. **Issue:
Original PR description
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it…
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it takes the same VAT as the closest parent with VAT) 3. In Accounting > Reporting > Tax Report 4. Select only the company with a different VAT. The button to export an XML is not enabled. 5. Select the parent company and the company without VAT. The button to export an XML is not enabled. **Issue:** In some Tax Reports and EC Sales Reports with branch companies, the additional buttons are not enabled properly, even when all companies with the same VAT are selected. **Expected behavior:** If all branches with the same VAT are selected, export buttons should be available. **Cause of the problem:** In the tax report handler and EC sales report handler, `_custom_options_initializer()` calls the function `_enable_export_buttons_for_common_vat_groups_in_branches()`, which should enable the buttons if branches with the same VAT are selected. When extending `_custom_options_initializer()`, the call to super happens before extra buttons are added. These additional buttons are not included in the call to `_enable_export_buttons_for_common_vat_groups_in_branches()`. **Fix:** Instead of calling the function in _custom_options_initializer, add an option key to check and enable export buttons. This check is now done in `get_options()`, using the same logic previously applied in `_enable_export_buttons_for_common_vat_groups_in_branches`. As `get_options()` is called after the custom options initializer, all buttons are enabled if all branches with the same VAT are selected. task-4061157 Forward-Port-Of: odoo/enterprise#79227
…emplate context if mail_notification_light is customized Steps to reproduce : ---- - customize mail_notification_light template with a field from record (with Studio or with inherited template) - confirm a Hr Appraisal or send a Hr Appraisal Survey Error before this commit : ---- - RPC error odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'record' Template: mail.mail_notification_light Explanation : ---- We add the record in the template
Original PR description
…emplate context if mail_notification_light is customized Steps to reproduce : ---- - customize mail_notification_light template with a field from record (with Studio or with inherited template) - confirm a Hr Appraisal or send a Hr Appraisal Survey Error before this commit : ---- - RPC error odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'record' Template: mail.mail_notification_light Explanation : ---- We add the record in the template context, therefore any field from the record can be called Forward-Port-Of: odoo/enterprise#74943
…2025 Forward-Port-Of: odoo/enterprise#80030
Original PR description
…2025 Forward-Port-Of: odoo/enterprise#80030
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state: https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move exceeds its `product_uom_qty`, extra moves will be created, confirmed and merged back to the move in order to update its `product_uom_qty`:
https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1885-L1890 https://github.com/odoo/odoo/blob/607d63fd4d9c07bac9cb68b2d31d86551e93d5b1/addons/stock/models/stock_move.py#L1823-L1832 However, the action confirm of this extra move will trigger the same override of the `_action_confirm` that creates a quality check and it will even be called on the original move that was already confirmed and already created its QC since the extra move was merged into it: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
As a result we end up with an extra quality check creation.
### Fix:
We avoid quality check creation during extra move confirmation.
Community: https://github.com/odoo/odoo/pull/192034
opw-4266053
---
Forward-Port-Of: odoo/enterprise#78949
Forward-Port-Of: odoo/enterprise#76301This traceback arises when the user tries to change the orders from one stage to another. after deleting the last stage in another tab. To reproduce this issue:- 1) Install `pos_restaurant` 2) Duplicate the tab and open the preparation display in one tab 3) In another tab delete the last stage(`complete`) for the above preparation display 4) In the first tab click any product of an order from the `ready` stage 5) Now click the `ready` icon of that order 5) At the terminal you will
Original PR description
This traceback arises when the user tries to change the orders from one stage to another. after deleting the last stage in another tab. To reproduce this issue:- 1) Install `pos_restaurant` 2)…
This traceback arises when the user tries to change the orders from one stage to another.
after deleting the last stage in another tab.
To reproduce this issue:-
1) Install `pos_restaurant`
2) Duplicate the tab and open the preparation display in one tab
3) In another tab delete the last stage(`complete`) for the above preparation display
4) In the first tab click any product of an order from the `ready` stage
5) Now click the `ready` icon of that order
5) At the terminal you will see a traceback
Error:-
```
IndexError: list index out of range
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, 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 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.1/pos_preparation_display/models/preparation_display_orderline.py", line 51, in send_stricked_line_to_next_stage
next_stage_id = stage_ids.ids[current_stage_index + 1]
```
When the user clicks on the current stage icon it is supposed to go to the next stage with the help of the current stage index + 1.
But, because the user deleted the next stage it leads to an index error
After applying this will resolve the issue by preventing the user to modify stages
when there is an active session for that preparation display. Which making the code more robust
sentry-5056416790
Forward-Port-Of: odoo/enterprise#59415Outgoing emails now contain more message IDs in references to help thread formation. This is notably due to parent_id being the first thread message, hence often technical, and this cause issues in multi odoo communications. This increases a bit query counters when sending emails. Indeed when preparing outgoing emails we now have to search for messages, and check for subtype details, which means additional queries. See community PR for more details. Task-4559249 Forward-Port-Of: odoo/e
Original PR description
Outgoing emails now contain more message IDs in references to help thread formation. This is notably due to parent_id being the first thread message, hence often technical, and this cause issues in multi odoo communications. This increases a bit query counters when sending emails. Indeed when preparing outgoing emails we now have to search for messages, and check for subtype details, which means additional queries. See community PR for more details. Task-4559249 Forward-Port-Of: odoo/enterprise#79309 Forward-Port-Of: odoo/enterprise#79048