Friday, June 21, 2024
35 changes · 17.0
Resolved issues and error corrections
This update prevents India E-Waybill stock calculations from being repeatedly triggered during manufacturing operations, avoiding memory errors and improving reliability. It also makes E-Waybill stock move prices and taxes manually editable and hides an unusable document type option on invoice E-Waybills.
Original PR description
opw-3950052 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures stock moves no longer keep outdated reservation dates when the related picking type reservation method is changed. This helps prevent incorrect reservation behavior and misleading forecast information for inventory users.
Original PR description
Do a modification of the picking type reservation method will not remove the reservation date on stock.move. It could create issue on the reservation or the forecast report where the reservation date is used without doing a check on the picking type reservation method. Clean the data when we update the reservation method 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
Partner suggestions now appear much faster when using @ mentions in busy chat channels. This prevents the interface from freezing and makes conversations smoother for users in larger groups.
Original PR description
Before this PR, searching for a partner using a mention ("@") could take up to 18 seconds on a channel with 200 members. As a result, the UI would freeze while waiting for the search function to return partners to display.
After this PR, trying to mention a partner on the same channel only takes 80ms.
Most of the time was consumed by the `sortPartnerSuggestions` function, specifically by the `discuss.members` compare function that looped over every channel member twice per comparison.
The rest of the time was consumed by owl's `reactive` (~1/3 of the time).
To solve this issue, this PR focuses on two points:
- Providing a set of member partner IDs to the compare functions to speed up membership tests.
- Removing unnecessary reactive callbacks by using `toRaw` (searching partners is not coupled to rendering).When an Indian E-way bill is submitted with zero distance, Odoo now reads the government portal's returned distance and updates the bill automatically. This keeps shipment records aligned with the official portal and avoids manual correction or mismatched transport details.
Original PR description
**Before this PR**: While creating the E-way bill, when sending a request with the distance set to "Zero," the government portal updates the distance based on their own database and sends it back in the response as an alert in the format " , Distance between these two pincodes is \d+, ". However, the Odoo system did not update the distance field with this value. **After this PR**: The Odoo system now correctly parses the alert from the government portal response and updates the distance field on the E-way bill with the computed distance. **task**-3961833
Resetting and reposting accounting moves with deferred entries could fail when part of the deferral period was locked. The fix keeps reversal entries properly linked and uses the correct accounting date, preventing errors and keeping deferred accounting records consistent.
Original PR description
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to…
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to 31/12/23 4. Reset the move to draft - The deferral moves of 2024 are deleted. - The deferral moves of 2023 are still linked to the move - The reversed deferral moves of 2023 are created but not linked to the move and they are dated on the 1st January (first day after the lock date) 5. Post the move again A traceback is raised because of an assert that verifies that we shouldn't regenerate deferral entries if a move already has them. Solution: --------- 1. The generated reversal of the deferrals of 2023 should be linked to the move. 2. Now that this is done, we can remove the assert because all deferral entries will cancel out each other (i.e. the aggregation will result in no deferral entries). 3. When reverting, we will now use the accounting date instead of the first day after the lock date (if there is one) opw-3861179 https://github.com/odoo/enterprise/pull/61928
This fix ensures purchase orders choose the vendor linked to the specific product variant being sold, such as different vendors for different colors. It prevents orders for variant-specific purchases from being grouped under the wrong supplier, helping businesses avoid incorrect procurement and supplier communication.
Original PR description
### Steps to reproduce: - Enable multi-step routes in the settings - Go to Invertory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a product: - Routes: MTO + Buy route -…
### Steps to reproduce: - Enable multi-step routes in the settings - Go to Invertory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a product: - Routes: MTO + Buy route - Variants: Color > Black, White - In the purchase tab of the product create two lines with: - Vendor 1 sells the Black variant - Vendor 2 sells the White variant - Create and confirm a sale order with 2 lines: - 1 x Black variant - 1 x White variant ### Expected behavior: Two purchase order should be created: - 1 x Black variant sold by Vendor 1 - 1 x White variant sold by Vendor 2 ### Current behavior: Only one purchase order is created so that Vendor 1 as the seller of both procurements even thought vendor 2 is the only real potential seller of the white variant. ### Cause of the issue: Running the procurements of both lines of the Sale order will trigger the `_run_buy` method which will determine the seller by "default": https://github.com/odoo/odoo/blob/3383d5bd68bfc13b7881f72e5adbb7c27a6df30e/addons/purchase_stock/models/stock_rule.py#L70-L72 using the `_prepare_sellers` method. However, it relies solely on the `seller_ids` field of the `product.template` model https://github.com/odoo/odoo/blob/3383d5bd68bfc13b7881f72e5adbb7c27a6df30e/addons/product/models/product_product.py#L633-L634 Since both variants have the same template they will therefore both be associated with the same default seller. opw-3940786 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures warehouse storage capacity limits are correctly checked when putaway rules assign products to locations. It prevents incoming stock from being placed in a location when the move would exceed that location's configured maximum quantity.
Original PR description
**Current behavior:** Having a storage location with a storage category that has a max quantity acting on some productA, and a putaway rule that will move product from an intermediary location to the…
**Current behavior:** Having a storage location with a storage category that has a max quantity acting on some productA, and a putaway rule that will move product from an intermediary location to the location with the category: Creating a move for productA into the intermediary location that won't hit the cap applied on the second location, then creating an additional move (separate picking) with a demand that exceeds the cap will result in the cap not getting respected during the quant move process. **Expected behavior:** The second move will not get assigned via putaway rule to the second location, as its quantity is too large. **Steps to reproduce:** 1. Create a storage category with a capacity: `product: productA` `quantity: 5` 2. Create an internal location: `parent location: WH/STOCK` `storage category: from step 1` 3. Create a putaway rule: `product: productA` `src location: WH/STOCK` `dest location: from step 2` `storage category: from step1` 4. Create a receipt picking with a move for productA that will not exceed the storage categ. cap -> confirm the picking 5. Create another receipt picking with a move for productA that exceeds the storage categ. cap -> confirm -> fill out the quantity -> validate 6. Go to the storage location and view its quants, see it's more than the max capacity **Cause of the issue:** During the picking assignment, the current/pending quantity of the proposed location gets calculated. Prior to the 7dda6bb refactor on the `qty_done` field, this current/pending quantity was stored in the method in a local variable, coincidentally also called qty_done. It got changed to quantity in this commit, which is also the name of one of the method arguments that represents the quantity value of the current move line which is being validated. Thus, the incoming quantity becomes the current quantity in the location which, of course, does not validate the defined cap. **Fix:** Rename the local variable. opw-3926597
The project now uses Werkzeug versions that better match Ubuntu Noble and Debian Bookworm. This helps avoid warning messages on newer Python versions and keeps deployments smoother on supported operating systems.
Original PR description
Adapt [werkzeug version for Ubuntu Noble](https://packages.ubuntu.com/noble/python3-werkzeug) mainly to avoid deprecation warnings in python 3.12. While at it, adapt for Bookworm as it provides [python 3.11](https://packages.debian.org/bookworm/python3).
The customer portal now only shows the “Quotations to review” alert when there is at least one quotation needing attention. This avoids confusing customers with an alert that points to zero pending quotations.
Original PR description
Problem --- Since the [portal redesign](https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8), made the "Quotations to review" button in the portal an alert, it no longer makes sense to display it when there are 0 quotes to review opw-3991880
Repair orders for consumable kit products can now be completed without triggering an error when the kit is expanded into its components. This prevents failed repair workflows for businesses that use kit-based products and ensures the repair process can finish normally.
Original PR description
**Steps to reproduce the bug:** - Create a consumable product “Kit 1” with the following BoM: - component: X1 - Create a repair order to repair one unit of Kit 1: - Don’t add any part - confirm and…
**Steps to reproduce the bug:**
- Create a consumable product “Kit 1” with the following BoM:
- component: X1
- Create a repair order to repair one unit of Kit 1:
- Don’t add any part
- confirm and Start the repair
- try to end the repair
**Problem:**
A traceback is triggered:
“raise ValueError("Expected singleton: %s" % self)
Value Error: Expected singleton: stock.location()
“
When the "action_repair_end" is called, a move is created with the kit
product, and then we attempt to confirm it:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L80
Since the product is a kit, it is exploded into two moves with products
“X1” and “X2”. We then try to assign them a “repair” picking_type_id:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L74
So, the write method is used and since the “picking_type_id” is in the
vals, and the product in the move (X1) is not the same as the one in the
repair order, we consider this product a “Part” of the repair.
Therefore, we try to use its location_id and location_dest_id, which we
fetch based on the “repair_line_type” that will be False because it is
not a part of the repair but rather the product to be repaired:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L93-L94
The first error is triggered during the “should_by_pass” check because
there is no location set in the move:
https://github.com/odoo/odoo/blob/c7b947364d34cc6ccfb1eb7a2c16b6bba226d8e7/addons/stock/models/stock_move.py#L1051-L1052
If we fix this error, we will still encounter an error because both
moves will be confirmed. However, we will return to the first loop to
continue calling the “_trigger_scheduler” function for the first move
with the “Kit” product, which will be already deleted because it was
exploded, resulting in a user error:
“odoo.exceptions.MissingError: Record does not exist or has been deleted.
(Record: stock.move(253,), User: 1)
“
opw-[3942297](https://www.odoo.com/web#id=3942297&view_type=form&model=project.task)Razorpay payments now avoid creating extra saved payment methods when a customer pays a duplicated quotation using an already saved method. This keeps customer payment records cleaner and prevents confusion from duplicate entries.
Original PR description
Steps: - Install sale and razopay app. - Set-up razorpay provider. - Create quotation. - Pay that quotation via razorpay and save payment details. - Duplicate that quote and pay it via already saved method. Issue: - Creating duplicate token when paying via token. Cause: - Since [PR] we are creating token in odoo when razorpay give token_id in notification_data and tokenization is enabled on razorpay and in some case when we pay quote via token it return token in notification_data and since we forgot to check if transaction is already connected to token or not it always create new token :( Fix: - Add condition to check if transaction is connected to token or not and only create token if transaction is not connected to token. Additionally pass entity_data in token creation method so it pass proper data when we don't find `id` in `notification_data`. [PR]: https://github.com/odoo/odoo/pull/159250
This fixes an inventory packaging issue where putting selected serial-tracked product lines into a package incorrectly packed every line. Warehouse users can now package only the items they chose, reducing fulfillment errors and manual corrections.
Original PR description
Steps to reproduce: - Create a serial number tracked product. - Activate "Packages" setting from the "Inventory" app configuration. - Create a receipt order with a stock move of that product. - Mark it as to-do and generate serial numbers. - Click on "Detailed Operations" smart button. - Select some of the move lines and click on "Put in Pack". Expected behavior: - Only the selected move lines are put in a package. Current behavior: - All of the move lines are put in a package. Task-3857396 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue where loyalty rewards could consume all available points instead of only the required batch amount. This prevents customers from losing extra points and keeps reward values aligned with the program rules, except for eWallet and gift card cases where full balance behavior remains appropriate.
Original PR description
To recreate the bug: 1- Create a loyalty program with a reward of $ per point and a fixed required ammount 2- Test the loyalty and see the reward and point consumed 3- We see that whenever we have an ammount of point superior to the required ammount, it get consumed totally and the reward is that total*($ per point) We have 2 problems her. First is the total consumption and second is the fractional reward and consumtion. If a we have a 3$ per 2 points and we have a total of 5 points, we should at max use 4 with reward of 6$. I also checked the functionality of the feature in sales module and it was the same. So I changed it so that it use always required ammount, except in the case of ewallet or gift card. opw-3922835
Invoice Analysis now handles credit notes so their margins offset the related invoices instead of showing an incorrect positive margin when totals cancel out. This improves the accuracy of profitability reporting for refunds and credit notes.
Original PR description
### Steps to reproduce the issue: 1. Create a product with a purchase price and a sales price 2. Create an invoice with the product 3. Create a credit note with the product 4. Go to Invoice Analysis…
### Steps to reproduce the issue: 1. Create a product with a purchase price and a sales price 2. Create an invoice with the product 3. Create a credit note with the product 4. Go to Invoice Analysis (Pivot view) 5. Tick the margin option in Measures 6. Set the filters to only have the invoice and the credit note in the analysis 7. The margin is positive while the total is null ### Explanation: The calculation of `price_margin` in `account.invoice.report` is set to 0 if `move_type` is different from `'out_invoice'` or `'out_receipt'`. Credit notes are categorized as `'out_refund'`. https://github.com/odoo/odoo/blob/4c8f7c90119caa8fd0d74eb14c4b3496165d4286/addons/account/report/account_invoice_report.py#L109-L112 ### Suggested fix: The credit note and the invoice's margins should cancel each other. The current calculation of `price_margin` is subtracting `product.product.standard_price` from `account.move.line.balance` regardless of its value which could be negative, as in the case of `'out_refund'` type `account.move`, thus adapating the value using the sign of line.balance. opw-3862493
When multiple invoices are sent through Peppol and some fail because required information is missing, their status is now updated correctly instead of staying queued. This helps users see which invoices were skipped due to errors and prevents misleading processing states.
Original PR description
- Create several invoices that would throw an error when generating UBL (e.g. recipient bank is missing) - Send those invoices at once - Peppol state is stuck in `queued` because of the error, even though they should be `skipped` This is because we don't update peppol state when errors happen. This commit extends `_hook_if_errors` to update peppol state. opw-3958334 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Expense claims entered in a different currency now use a more precise exchange rate. This reduces rounding differences for high-value expenses in weaker currencies and helps keep approved expense accounting entries closer to the expected company-currency amounts.
Original PR description
Summary ----- When creating an expense in a currency different from the company's currency, the exchange rate is rounded to 6 decimal places. If the rate and the expense amount are high enough, the…
Summary
-----
When creating an expense in a currency different from the company's currency, the exchange rate is rounded to 6 decimal places. If the rate and the expense amount are high enough, the rounding error affects the expense amount in the company's currency and later, in the journal entries created after the expense is approved.
Steps to Reproduce
-----
1. Set a strong currency for the company (e.g., USD)
2. Add a weak currency in the currencies (e.g., IQD)
3. Create an expense with a high amount (e.g., 1,000,000 for the IQD/USD pair)
4. Set the weak currency for the expense
5. Observe the overly rounded amount in the weak currency
Cause
-----
The error comes from the exchange rate being rounded too much and too early.
Fix
-----
Modify "digits" attribute of the "currency_rate" field to increase precision.
Note
-----
Some inaccuracy remains, but expenses rarely exceed 1000 USD for companies using weak currencies, so the number of issues should be reduced.
opw-3684727Events with the same name now get separate website submenu pages instead of accidentally sharing the first event's edited Introduction page. This prevents content from one event appearing on another, improving reliability for event website management.
Original PR description
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the `Introduction` page by adding a new block under the event name for example - Save it and go back to backend - Create a new event with same name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button Issue: ------ The second event will have the edited `Introduction` page from the first event. Cause: ------ The event_page route used to resolve event pages expects URLs to match view names which is not necessarily the case for the returned url of `new_page`. Solution: --------- Ensure the URL is unique by using the view key (who is unique) as last part of the URL. opw-3945840 X-original-commit: af46b92 Forward-Port-Of: #169770
This update removes a previously added loyalty program view change because it is not needed in Odoo 17. It helps avoid unnecessary duplicate rendering behavior while keeping gift card and e-wallet setup aligned with the current version.
Original PR description
This reverts commit ac93012e3cf954b5b3bcd4475b63ab027d461355. The gift card/ewallet programs were created without rewards or rules, and the issue is not present in 17 so no need to keep this forward-ported commit. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The live chat window can now be closed without causing an error if its related chat session or member record was deleted elsewhere. This prevents customers or operators from seeing a crash in an uncommon but disruptive scenario.
Original PR description
When user tries to close chat window when current channels/members are deleted. Steps to reproduce error: - Activate 'im_livechat' and 'website' module - Open the 'website' module and clicked Contact…
When user tries to close chat window when current channels/members
are deleted.
Steps to reproduce error:
- Activate 'im_livechat' and 'website' module
- Open the 'website' module and clicked Contact us menu
- Open chat-bot and start conversation
- Duplicate the tab and Go to the Settings>Technical>Channels/Members in second tab
- Delete the current channels/members from second tab
- Go to the first tab and close chat window
- Error will be generated
sentry traceback-
```ValueError: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5830, in ensure_one
_id, = self._ids
ValueError: Expected singleton: discuss.channel.member()
File "odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "odoo/http.py", line 1732, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1960, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/mail/models/discuss/mail_guest.py", line 40, in wrapper
return func(self, *args, **kwargs)
File "addons/im_livechat/controllers/main.py", line 286, in visitor_leave_session
member.sudo()._rtc_leave_call()
File "addons/mail/models/discuss/discuss_channel_member.py", line 297, in _rtc_leave_call
self.ensure_one()
File "odoo/models.py", line 5833, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
Here at [1] member got empty value when current channels/members are deleted from 'discuss.channel.member' model by user.
This commit resolved the above issue by calling '_rtc_leave_call()' method when a member is available.
[1]-https://github.com/odoo/odoo/blob/952ebac37dc65b3fd62ae211cee1fd45fa63cd47/addons/im_livechat/controllers/main.py#L284-L286
sentry-4719812967
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixes an issue where uploaded PDF attachments on newly created invoices showed an empty preview when Document Digitalization was disabled. The invoice view now refreshes after uploads so users can immediately see the PDF preview.
Original PR description
**Steps to reproduce:** - Install Invoicing - Go to "Invoicing / Configuration / Settings" - Deactivate "Document Digitalization" - Create an invoice - Upload a PDF via paperclip button or drag and drop in the chatter **Issue:** The preview box appears but it is empty. **Cause:** In "onUploaded" function of Chatter component, the parent view is not reloaded once the attachment is uploaded because "hasParentReloadOnAttachmentsChanged" property is False. This property depends on "post_refresh" option. **Solution:** Add "post_refresh" option for "message_ids" field in the view as it is done when "account_invoice_extract" module is installed. opw-3887671 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update moves certain sales report changes out of the standard Point of Sale module and into the specialized blackbox certification module. This helps avoid forcing Point of Sale upgrades on customized databases while keeping certification-related changes available where needed.
Original PR description
This is a partial revert of commit f5b1c9f1f966f4eec0a4000ee768f2782fd9a98f. The commit link to the certification of blackbox was changing the sale report to comply to the certification. For this to work, the module point_of_sale has to be upgraded which is not doable for some databases due to customization etc. The idea of this commit is to revert the changes and put them in the blackbox module. Enterprise PR: odoo/enterprise#64999 Original Community PR: odoo/odoo#148155 Original Enterprise PR: odoo/enterprise#53654 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now save Peppol invoicing settings even when the endpoint field is left empty. This prevents an unexpected error and makes the configuration flow more reliable for companies using Peppol e-invoicing.
Original PR description
This traceback arises when the user doesn't give the Peppol endpoint and tries to save it. To reproduce this issue: 1) Install `account_peppol` 2) create a `Belgium` company and switch to that company. 3) Activate `Use PEPPOL Invoicing` in invoice settings 4) Change the Peppol EAS as `0201 - Codice Univoco Unità Organizzativa iPA` 5) Remove the `Endpoint` and try to save it. Error:- ``` TypeError: expected string or bytes-like object ``` When the user makes the `endpoint` as empty its value is `False`. which leads to the above traceback, as the `endpoint` is used to match the `endpoint_rule`. https://github.com/odoo/odoo/blob/c6c0f6ea677f5cb5935d6a3766bca5990539d17a/addons/account_peppol/models/res_company.py#L113-L114 After applying this commit will resolve this issue by giving a `fallback value` and make code more robust. when thepeppol_endpoint is not given by the user. sentry-5121223884
This fix stops Odoo from reserving inventory when a lot-tracked product is added to a delivery that is already marked as done. It keeps on-hand and reserved quantities accurate, reducing confusion and avoiding incorrect stock availability figures.
Original PR description
### Steps to reproduce: - Create a product SP tracked by lots - Click on "on hand" and create a lot with 10 units on hand - Create and validate picking for 1 x any other product - Unlock the delivery - Add a line (stock move) for 1 x SP - Click on the list icon of the line and set your lot - Save the picking - Go to the on hand quantity of SP #### > 1 unit was reserved even though the move is 'done' ### Cause of the issue: Creating the stock move line associating the lot to the stock move will update the reserved quantity of stock quants independently of the state of the move created: https://github.com/odoo/odoo/blob/347c7e21002313da155ebf872853078de23b38fe/addons/stock/models/stock_move_line.py#L337-L343 https://github.com/odoo/odoo/blob/347c7e21002313da155ebf872853078de23b38fe/addons/stock/models/stock_move.py#L1525-L1528 opw-3906472 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Indian e-waybill stock flow now updates the unit price only when a stock move changes out of pending status, instead of recalculating it during every stock cost change. This avoids memory errors and timeouts in large databases using FIFO or average costing, making stock operations more reliable.
Original PR description
Since the compute depends on `standard_price`, the computed field `ewaybill_price_unit` is computed each time the stock change when in FIFO or in AVCO. Since this field is on `stock.move`, if the database is large, it can create an error during any process with stock moves (Memory Error or timeout). To avoid that, the compute field is replaced by an override on the write, since the compute was needed to only update `ewaybill_price_unit` before the move is changed from `pending` to another state. opw-3950052
The employee attendance kiosk now uses smaller profile images to reduce loading time. This should make the check-in experience quicker and smoother, especially on slower networks or devices.
Original PR description
In this commit, used `avatar_512` that will help to decrease load time on kiosk mode of hr attendance. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where deferred accounting entries were not properly handled when a lock date was set and a move was reset to draft and reposted. The system now correctly links reversal entries to the original move and uses the proper accounting date, preventing errors when reposting moves with deferred expenses or income.
Original PR description
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to…
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to 31/12/23 4. Reset the move to draft - The deferral moves of 2024 are deleted. - The deferral moves of 2023 are still linked to the move - The reversed deferral moves of 2023 are created but not linked to the move and they are dated on the 1st January (first day after the lock date) 5. Post the move again A traceback is raised because of an assert that verifies that we shouldn't regenerate deferral entries if a move already has them. Solution: --------- 1. The generated reversal of the deferrals of 2023 should be linked to the move. 2. Now that this is done, we can remove the assert because all deferral entries will cancel out each other (i.e. the aggregation will result in no deferral entries). 3. When reverting, we will now use the accounting date instead of the first day after the lock date (if there is one) opw-3861179 https://github.com/odoo/odoo/pull/164316
This update fixes an issue where the Recurring Revenue field was displaying in reports even when the feature was disabled in settings. Now the field will only appear when the Recurring Revenue feature is actually enabled, ensuring a cleaner and more accurate user experience that matches the configured settings.
Original PR description
**Before this PR:** Some fields are associated with groups in XML files, but they are visible even though the groups are disabled. (Recurring Revenue is not ticked in settings, i.e., the feature is not activated). **After this PR:** recurring_revenue fields in the measure will only be visible when it is ticked in settings, i.e., only when the feature is activated. Task-3810415 Forward-Port-Of: odoo/enterprise#60228
This fix resolves an issue where warehouse staff couldn't open certain pickings in the Barcode app. The problem occurred when a product had both a kit bill of materials and product packaging configured. The barcode system now properly loads all required packaging information upfront, allowing these pickings to be processed without errors.
Original PR description
**Current behavior:** A picking with a move for a product with kit BOM that also has some product packaging can be un-openable in Barcode. **Expected behavior:** Any picking should be able to be…
**Current behavior:** A picking with a move for a product with kit BOM that also has some product packaging can be un-openable in Barcode. **Expected behavior:** Any picking should be able to be processed in Barcode. **Steps to reproduce:** *Enable product packagings* 1. Create a storable product with a kit BOM and a product packaging 2. Make some picking that has a move for the new product, confirm it so the moves for the kit components are created 3. Add stock move lines for each of the moves, fill out their `qty_done` field with the required amount 4. Save the picking record, go into Barcode 5. Try to open the picking -> trace back **Cause of the issue:** The Barcode client tries to read the package record of the BOM product/product template but it was never fetched into the barcode cache. **Fix:** Ensure any packaging record that could have an attempted access is fetched by the barcode client `onWillStart()`. opw-3895426 Forward-Port-Of: odoo/enterprise#64750 Forward-Port-Of: odoo/enterprise#64024
The rental schedule gantt view was only showing rental products that had existing orders, instead of displaying all available rental products. This fix ensures that when the total number of rental products is below the system limit, all products are displayed in the schedule view, providing users with a complete view of their rental inventory.
Original PR description
**Steps to reproduce:** - Install Rental module - Check gantt view in Rental > Schedule **Current behavior before PR:** We are just showing the products that has orders. This is happening because in…
**Steps to reproduce:** - Install Rental module - Check gantt view in Rental > Schedule **Current behavior before PR:** We are just showing the products that has orders. This is happening because in those commit https://github.com/odoo/enterprise/pull/37757/commits/0c2f235d4876467df287f30ab3cb09785603cd7f https://github.com/odoo/enterprise/pull/37757/commits/836909419893b522890776d3ec2f16476ae21108 we introduced the group limit and get_gantt_data and rental_schedule has not get adapted with this new behaviour. So what is happening is that '_read_group_product_ids' https://github.com/odoo/enterprise/blob/17.0/sale_renting/report/rental_schedule.py#L20 is not called as there is a limit so https://github.com/odoo/enterprise/blob/17.0/web_gantt/models/models.py#L76 This computes to be False so https://github.com/odoo/odoo/blob/17.0/odoo/models.py#L2745:L2754 '_read_group_fill_results' will not get called to call '_read_group_product_ids' **Desired behavior after PR is merged:** After override 'get_gantt_data' we are now checking if all products count is more than the limit we just return the products that already have orders. **Other solution:** We might just remove the group_limit https://github.com/odoo/enterprise/blob/17.0/sale_renting/report/rental_schedule_views.xml#L54 and just go with the '_read_group_product_ids'. opw-3959031
This fix corrects multiple issues in the Spanish VAT Record Books (Libros Registro de IVA) report that was generating incorrect tax information. The report now properly handles credit notes, withholding taxes, intra-European transactions, and complex tax combinations on invoices, ensuring accurate tax reporting for Spanish companies.
Original PR description
**Steps to reproduce:** - Install l10n_es_reports - Switch to a Spanish company (e.g. ES Company) - Create some invoices/bills and credit notes using different types of taxes - Go to "Accounting /…
**Steps to reproduce:** - Install l10n_es_reports - Switch to a Spanish company (e.g. ES Company) - Create some invoices/bills and credit notes using different types of taxes - Go to "Accounting / Reporting / Statement Reports / Tax Report" - Select "Generic Tax Report" - Click on "VAT Record Books (XLSX)" to download the report **Issues:** 1) Credit notes appear as positive in the report 2) Withholding taxes (having type "Retencion") are not handled. They should appear in the dedicated column. 3) Intra-European bills have a tax that is reverted. So the tax amount should be 0, but it is not reverted in the report. 4) If an invoice has 2 lines that use 2 different taxes of type "Recargo de Equivalencia", one of them will not appear in the report. 5) Advanced combinations of taxes on several invoice lines are not supported. **Solution:** This fix changes the way of generating the Libros Registro de IVA report. Before this fix, the report was generated based on the tax lines. One line of the report was corresponding to a regular tax line, which didn't support advanced combinations of taxes on several invoice lines. This fix analyzes the taxes repartition on the invoice lines and tries to respect it when generating the report. A line of the report corresponds to a combination of taxes of different type: (IVA + surcharge tax + withholding tax) **Limitation:** Having 2 taxes of the same type on the same invoice line is not supported. The total and the tax amount will be correct but not the tax rate because a report line has only one column to display each type of tax. opw-3844967
This fix restores the default recipient addresses in follow-up email templates. Previously, when users cleared the "To (Partners)" field in a template and saved it, the addresses would not reappear when reopening the follow-up report. The fix reintroduces the default value logic to ensure recipient addresses are properly populated.
Original PR description
### Steps to reproduce the issue: 1. Go to _Accounting > Customers > Follow-up Reports_ select one of the reports 2. Click on "Follow up" 3. Open the template in the Content Template field 4. Empty the To (Partners) field in this template 5. Save and close 6. Close the Follow Up and reopen it 5. There is no address in the field ### Explanation: With previous fix, we removed the `default_get` value but did not add a default one in the compute. ### Suggested fix: The default value will be the same as the one previously in `default_get`. The purpose is to restore the previous workflow and then add the template's values. opw-3878125 Forward-Port-Of: odoo/enterprise#65038 Forward-Port-Of: odoo/enterprise#64902
This fix prevents customers from booking appointments on dates that have all-day events synced from Google Calendar. Previously, all-day events were incorrectly excluded from availability checks, allowing double-bookings. The fix adjusts how the system searches for conflicting events to properly include all-day events that overlap with requested appointment times.
Original PR description
Versions -------- - 15.0+ Steps ----- 1. Sync with Google Calendar; 2. create a recurrent all day event in google calendar; 3. make sure it shows as "busy"; 4. make an appointment via website on that…
Versions -------- - 15.0+ Steps ----- 1. Sync with Google Calendar; 2. create a recurrent all day event in google calendar; 3. make sure it shows as "busy"; 4. make an appointment via website on that day. Issue ----- You are allowed to make an appointment on slots that overlap the synced event. Cause ----- Recurrent day events synced via Google Calendar have their start & end date equal to each other, so the event's "end date" could be 24 hours before the actual end. Commit ad4219876cee4f4b996a7cc72fd176b51be3a063 added an the `_slot_availability_prepare_values_meetings` method, optimized to not include conditions on `start_date` and `allday`. Instead, it filters event by date ranges. In our scenario, an `allday` event with start & end dates set to something like `2022-02-14 00:00:00`, may get excluded from the search when this is also the value of the starting point of the search, due to `stop` not being strictly greater than the starting point. Solution -------- Do an inclusive range search instead of an exclusive one. opw-3793009 Forward-Port-Of: odoo/enterprise#65023 Forward-Port-Of: odoo/enterprise#63761
This update fixes two critical issues in asset revaluation calculations. First, it corrects incorrect amounts when decreasing residual values on assets by preventing the deletion of draft moves that are scheduled for future posting. Second, it resolves a problem where already fully depreciated assets would incorrectly generate moves when sold or disposed of. These fixes ensure accurate financial reporting for asset transactions.
Original PR description
To reproduce: - Create an asset linear yearly. - Reevaluate it next month, while decreasing the residual amount. => The amounts don't make sense, the decrease move has been deleted. Idem for the move…
To reproduce:
- Create an asset linear yearly.
- Reevaluate it next month, while decreasing the residual amount.
=> The amounts don't make sense, the decrease move has been deleted.
Idem for the move before the reeval.
The issue is that we delete all the moves that are draft.
But if a move (like the decrease move) is created after the current day,
it is in auto-post, and so, in draft.
To correct that, we prevent their deletion and give the correct residual amount
(it is a computed non-stored field, so it has been given as an argument to the method).Another issue was found, related to already depreciated assets.
Create an asset with 10000 as original value, 4000 as Import amount
and 6000 as salvage value.
Confirm it (no moves should be created)
Sell or dispose it.
=> It creates a move before disposal while there shouldn't be any
The issue was that reevaluation didn't work with already depreciated assets and with no moves before the reevaluation.
opw-3945341
task-3444716
Forward-Port-Of: odoo/enterprise#65031
Forward-Port-Of: odoo/enterprise#62982This update fixes a bug that prevented users from closing their POS session when two employees were logged in simultaneously on different devices. The changes reorganize sales report logic to the blackbox module to ensure compliance with Belgian certification requirements.
Original PR description
This commit, combined with the partial revert of commit f5b1c9f1f966f4eec0a4000ee768f2782fd9a98f, moves the logic of the sales report needed for the certification to the blackbox module. It also solves a bug where users could not close the session if two users were clocked in at the same time on two different devices. Community PR: odoo/odoo#169993 Original Community PR: odoo/odoo#148155 Original Enterprise PR: odoo/enterprise#53654
This fix corrects how lunch breaks are calculated in the HR system. Previously, lunch times were being counted even when employees were on leave or during public holidays. Now the system properly excludes these periods, ensuring accurate lunch break records for payroll and attendance tracking.
Original PR description
Currently when we look at lunch times, we do not take leaves into account, resulting in lunch-time being computed when you have public holidays or time off