Daily updates from Odoo
Wednesday, August 14, 2024
8 changes
2 changes
Resolved issues and error corrections
This fixes an issue where Odoo could treat the same page address as different when URL options appeared in a different order. Users should see cleaner browser navigation behavior, especially when enabling debug assets, without repeated entries for the same page.
Original PR description
When on the main menu, `/odoo?cids=1`, if you activate the debug assets, the router will push a new key (debug) into the query string : `/odoo?cids=1&debug=assets`. To fully activate the debug, a…
When on the main menu, `/odoo?cids=1`, if you activate the debug assets, the router will push a new key (debug) into the query string : `/odoo?cids=1&debug=assets`. To fully activate the debug, a reload will be done. After the reload, the action service will push the new loaded state (the menu), taking into account the locked keys (in this case: `cid` and `debug`), which will inverse the order of the query string : `/odoo?debug=assets&cids=1`. This occurs because, the order of the keys on the query string will depend on: the push order; if the keys are locked keys or not; and of the kind of push state (replacement or simple push state). The issue with this almost "random" order of the keys, is that the router could push the same URL (with keys in different order) multiple times into the browser history. Before this commit, to compare the actual URL with the new one, we just compare the two strings, and if the order of the query strings are not the same the URLs are considered as different. This commit, will avoid this issue by deep comparing the query string as objects, so when just a difference of order exists in the query string, they will be considered as the same URL. opw-3557575
Loaded signatures now display without being stretched inside the signature field. This keeps signatures looking natural and professional on signed documents, improving the signing experience.
Original PR description
Before this commit: When loading a signature, the displayed image would be stretched to fit the signature box, messing up the ratio between width and height. This commit aims to fix this issue by: keeping the same ratio between width and height. and just multiply both of them by the same factor. Task: 4049758 Before:   After:  
3 changes
Resolved issues and error corrections
This fix prevents users from changing the refund status of a salary attachment once it has already been used in payslips. This helps protect payroll accuracy by avoiding inconsistent records after payroll processing has begun.
Original PR description
TaskID: 4040011
Scanning a barcode found in the lookup service no longer fails when the product has no image available. The product can still be created or updated from the barcode data, with the missing image simply skipped.
Original PR description
Issue: Traceback is encountered when scanning a barcode that is available in the barcodelookup api but doesn't have image. Example barcode: 9780349410159 - Traceback: `AttributeError: 'dict' obiect has no attribute 'content'` This is because of the inconsistent return value of `barcode_lookup_request`. If it succeeds, it returns a `Response` object but if not, it returns a `dict`. To fix the traceback, we check if the fetching of image failed by checking if the returned value is a `dict`. If so, we just skip the image assignment for the product.
The Partner Ledger report now correctly shows entries when users filter by an individual contact rather than a company. This prevents empty reports and helps users review financial activity for the specific partner they selected.
Original PR description
Steps to reproduce:
- Go to Partner Ledger report
- Choose individual in partners filtering instead of company
- Cannot show report filtered by individual
Current behaviour:
- Show empty report
Expected behaviour:
- Show report related to the individual only
Explanation:
The account.move.line partner_id will set as commercial_partner_id. Therefore in _get_options_partner_domain(self, options), the domain ('partner_id', 'in', partner_ids) only filtered on the commercial partner, not on the individual partner.3 changes
Resolved issues and error corrections
This update refreshes translation template files across multiple accounting and business modules to ensure they are current and accurate. Outdated translation files were updated, and empty files that were no longer needed were removed. This ensures that translators have the correct and up-to-date content to work with when localizing Odoo for different languages.
Original PR description
Some were out of date. Also, there were some empty pot files that were deleted along with their obsolete .po files.
This fix resolves an issue where manually changing the next invoice date on a subscription would incorrectly mark it as "To be invoiced" even though no actual invoicing changes were needed. The system now properly ignores date changes when calculating invoiced quantities, ensuring subscription status remains accurate regardless of when invoices are scheduled.
Original PR description
## Issue: - changing the next invoice date to a future date in the subscription app incorrectly changes the subscription status to "To be invoiced" ## Steps To Reproduce: - create subscription, and confirm it - Run the scheduled action: 'Sale Subscription: generate recurring invoices and payments' - change the 'Date of Next Invoice' on the subscription. - Notice that the related quotation invoice status is `To invoice` ## Solution: - Changing next_invoice_date or last_invoice_date should not impact the quantity invoiced, as invoiced amounts should remain unchanged. - Therefore, I removed `order_id.next_invoice_date` and `order_id.last_invoice_date` from the dependencies of `_compute_qty_invoiced`. opw-3932847
This fix ensures that unit prices displayed on Ecuadorian invoice PDFs match the unit prices in the XML files, as required by Ecuadorian law. Previously, when taxes were included in the price, the PDF and XML showed different unit prices. The fix aligns the PDF calculation with the XML calculation to ensure compliance.
Original PR description
The Ecuadorian law requires the unit price on the XML invoice and on the PDF to be the same, this is currently not the case with taxes included in the price. ### Steps to reproduce: - Install the 'l10n_ec' module and switch to an Ecuadorian company - Change the 'IVA 15% (411, Servicios)' Tax to be included - In Accounting create a new Customer Invoice - Select 'Instituto Ecuatoriano' as Customer - Add a line with the included tax set before - Select 'Sin utilization del sistema financiero' as Payment Method - Confirm - On the blue popup at the top of the page, click 'process now' to get the XML in the chatter - Click preview to get the PDF - The unit prices are not the same ### Cause: Usually on the PDF the unit price with included taxes is displayed. ### Solution: Create a xpath to compute the unit price in the same way as the XML. opw-4078177 Forward-Port-Of: odoo/enterprise#67721