[pull] 18.0 from odoo:18.0#130
Merged
pull[bot] merged 13 commits intosystemworks:18.0from Jul 28, 2025
Merged
Conversation
Combo lines where counted as products in the loyalty program rules, but they are part of only one product, the combo product. So when you add a combo product to the cart, it should count as one product no matter how many items are in the combo. Steps to reproduce: ------------------- * Create a combo product with 3 products options in it * Create a loyalty program that give 1 point with a minimum quantity of 2. And 100% discount on the cheapest product in exchange of 1 point * Open PoS session * Add the combo product to the cart > Observation: You get 2 discount of 100%. Why the fix: ------------ We ignore combo lines in the loyalty program rules. This way, no matter how many products are in the combo, it will only count as one product for the loyalty program rules. opw-4783013 closes #220333 X-original-commit: c89fc0e Signed-off-by: Stéphane Vanmeerhaeghe (stva) <stva@odoo.com> Signed-off-by: Robin Engels (roen) <roen@odoo.com>
…view Steps to Reproduce: 1. Install Sales and eCommerce modules. 2. Go to Sales → Products, open any product, go to Sales tab, and set a Ribbon. 3. Navigate to Website → Shop, search for the product and open its page. 4. Zoom in or out. Issue: The ribbon on the product image becomes misaligned (shifts away from the image) when zooming in or out on the product detail page. This results in a broken visual layout. Cause: A previous change in [PR #175473](#175473) unintentionally replaced the height class (h-100) with width (w-100) on ribbon container, causing layout instability during zoom operations. Solution: Restore the proper layout by reintroducing h-100 to both the ribbon container and inner image div. This ensures the ribbon stays correctly positioned relative to the image regardless of zoom level. opw-4854217 closes #216545 Signed-off-by: Valentin Chevalier <vcr@odoo.com>
…pany Steps to reproduce:- - Install `account` module. - Invoicing > Configuration > Payment Providers - Install `Demo` payment provider, check state `Test Mode` and is `Published`. - Run `test_course_certification_employee` test case. Error: “Draft Payment” belongs to company “company_1_data” and “Outstanding Account” (outstanding_account_id: 'Outstanding Receipts') belongs to another company. Cause:- - When `Demo` provider is activated, `account.payment.method.line` is created with `payment_account_id` of company `YourCompany`, but that account was not changed in the test. Solution: In `test_course_certification_employee` test, set outstanding account of company `company_1_data` for `account.payment.method.line` with code `Demo`. Runbot Build Error-229953 closes #220731 Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
Currently, an error occurs when a new company is created without selecting a 'Fiscal Localization', and then both companies are selected while creating a new 'Analytic Distribution'. Steps to reproduce: - Install 'Accounting' module - Enable 'Analytic Accounting' - Create a New company and switch to it - Select both companies and Open 'Analytic Distribution' and click 'New' Traceback: TypeError: 'bool' object is not subscriptable At [1], we are searching by 'account_type', but if 'Fiscal Localization' is not set for the current company, there will be no records in 'account.account'. However, due to the multi-company setup, it still return accounts from the first company. In such cases, the 'code' field is empty, which causes the 'code' to be treated as False. [1]: https://github.com/odoo/odoo/blob/d155edfd729ab9b53f38939fe24b6d1e7b578083/addons/account/models/account_analytic_distribution_model.py#L55-L58 sentry-6754820454 closes #220089 Signed-off-by: John Laterre (jol) <jol@odoo.com>
closes #218719 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, a traceback would occur of the camera access was rejected after leaving a call that requested it. This race condition could also happen in other cases where the call is left before the camera promise resolves. closes #220770 Signed-off-by: Thanh Son Dodeur (tso) <tso@odoo.com>
python3-magic/python-magic (apt/pip) is a frontend for libmagic the library that can introspect files to determine their types. The Documents app makes heavy usage of our mimetypes utilities to scan and fix the extensions of files uploaded by portal users. Everytime a portal user uploads a .doc/.xls/.ppt file, python3-magic is gonna guess the mimetypes application/x-ole-storage or application/CDFV2 which are the mimetypes of the generic file format that Microsoft Office was using. The problem is that there is no specific extension for those two mimetypes as Microsoft was using the same file format for many of its office applications. In this work we enrich python3-magic's detection with our own, which is able to tell different application/x-ole-storage and application/CDFV2 files apart. Please note that Excel files are detected only when the entire file is present. Excel files uploaded via the Documents app are not detected because Documents only guess_mimetype on the first 1kiB of the document. We also added a condition to keep the .doc/.xls/.ppt extension in case the generic application/x-ole-storage or application/CDFV2 mimetype is guessed. Before it was emmiting a warning due to the unknown extension. Part-of: #220644 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
python3-magic/python-magic (apt/pip) is a frontend for libmagic the library that can introspect files to determine their types. The Documents app makes heavy usage of our mimetypes utilities to scan and fix the extensions of files uploaded by portal users. Sometypes when portal user uploads a .xlsx file, python3-magic fails to detect the Microsoft Excel 2007+ (OOXML) mimetype and instead guess a generic application/zip. Technicaly this is not wrong, OOXML files (like Java JAR and Python Weels) are using the zip format. This is quite strange because python3-magic is able to work with .xlsx files. I'm guessing that Microsoft deployed a new version of Excel and that magic doesn't correctly guess the new (2025) .xlsx files. Using a hex editor, the old (from our unittests) and new (from a 2025 support ticket) seem similar: OOXML files, deflate compression, same files present. They are a bitdifferent, in the old the "[Content_Types.xml]" file comes last, in the new it comes first. The zip headers are different too, the old uses zip Data Descriptors, the new doesn't. The problem is that the Documents app uses the guessed mimetype to "fix" the extension of the uploaded file. So the portal-user's file.xlsx gets wrongly rewritten to file.zip. We first used an approach similar to the previous commit[^1], to use our own detection of OOXML files. It works great in base where we run the detection on whole files. However it doesn't work for the Documents app because it attempts to guess the mimetype only reading the first 1kiB of the uploaded file. A first PR #213647 suggested to change Documents to load the whole file first, and then run guess_mimetype, but was rejected. In this work, we made so we don't fix the extension of zip-like files should the guessed mimetype be application/zip. [^1]: [FIX] core: python3-magic vs .doc/.xls/.ppt opw-4607156 opw-4753670 closes #220644 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
When using the faketime lib to test Odoo, only the Odoo processes are affected, so the database time is not affected accordingly. With this commit, when an environment variable `ODOO_FAKETIME_TEST_MODE` is set, the cursor `now` function is altered the same way faketime alters the Odoo processes. This environment variable is not meant to be used in production environment, it's only for testing purposes, Part-of: #220703 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
closes #220703 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Finetuning of d20b6f6, if a user had access rights on the pricelist model but not on loyalty programs, he wouldn't be able to archive a given pricelist. Has already been fixed in the aforementionned commit forward-port, starting from 18.2. closes #220789 X-original-commit: 1cf994d Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Problem: Saving the button snippet after changing its type to a link throws an error because `snippet_key` is `undefined`. Cause: The button snippet editor should be disabled if the button is changed to a link. However, `updateOptionsUIVisibility` is only triggered on click events. In this case, the element type changes through the editor itself, not by clicking, so the UI isn't updated accordingly. Solution: Trigger a `click` event on the link element programmatically to call `updateOptionsUIVisibility` and hide the button snippet editor when the element is no longer a button. Steps to reproduce: - Add a button snippet - Click inside the button to edit - Notice the Button snippet editor appears - Change the type to "Link" instead of "Primary" - The Button snippet editor is still visible - Click the floppy disk icon (save) in the snippet editor -> A traceback occurs opw-4936796 closes #220787 X-original-commit: 6f76133 Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com> Signed-off-by: Walid Sahli (wasa) <wasa@odoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.3)
Can you help keep this open source service alive? 💖 Please sponsor : )