Daily updates from Odoo
Tuesday, October 29, 2024
8 changes
6 changes
Resolved issues and error corrections
The mobile editing toolbar now stays directly above the on-screen keyboard instead of leaving an awkward gap. This makes editing content on phones smoother and reduces visual confusion for users.
Original PR description
Current behavior before PR: When the keyboard opens on mobile, the toolbar appears in the wrong position, leaving a space between the toolbar and the keyboard. Desired behavior after PR is merged: Now, when the keyboard opens on mobile, the toolbar will correctly stick to the top of the keyboard. task:4196686
This update fixes several small issues in automated guided tours for Project, Project Todo, and Website Sale Autocomplete. These changes help keep test flows stable by avoiding duplicate actions, using existing sample data, and waiting for records to be created before continuing.
Original PR description
In this commit, we make little fix for multiple tours. project_update_tour_tests.js: remove two time click. project_todo_main_functions.js: fill marc instead of test to avoid to create a new user. autocomplete_tour.js: precise trigger to remove run functions. project_tour.js: check the new record is created before continue the tour. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update applies the project's JavaScript formatting rules to web test files that previously missed automated checks. It helps keep the test suite consistent and easier to maintain, without changing customer-facing behavior.
Original PR description
Since the creation of v18, the JavaScript tooling wasn't enabled. The tooling was enabled in commit[1]. In this commit, we applied a manual eslint pass inside the "web/static/tests" directory to ensure we have well-formatted .test.js files. ``` eslint '**/web/static/tests/**/*.js' --fix ``` [1]: https://github.com/odoo/odoo/commit/f3407c392d4e7595e9a299662115df03bacbd41c
Fixes an issue where message author avatars disappeared for guests after a member left a public chat channel. This keeps chat history clearer and easier to follow for external or guest viewers.
Original PR description
Steps to reproduce: - Create a public channel - Add a non website_published user as a new member - Log in as that new member and send a message then leave the channel - Open the channel as a guest - The author avatar of the message is not there
This fixes a toolbar issue in the HTML editor where clicking near the edge of dropdown items could close the toolbar instead of selecting the option. It also ensures the selected 13px font size is displayed correctly, making formatting controls more reliable for users.
Original PR description
Description of the issue this PR addresses: Current behavior before PR: Clicking near the edge of a toolbar dropdown item would not work. This occurred because the `user-select-none` class was applied to the child element rather than the dropdown item itself, causing `onSelectionChange` to be triggered, followed by `updateToolbarVisibility` closing the toolbar. Desired behavior after PR is merged: The `user-select-none` class is now applied directly to the dropdown item, preventing `updateToolbarVisibility` from closing the toolbar when clicking near the edges of dropdown items. task-4241028 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The upload button for quote builder documents is now hidden until a quotation template has been saved. This prevents users from triggering an error when adding documents before the system has created the template record needed to attach them correctly.
Original PR description
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module -…
When attempting to upload a file in the ``Quotation Templates`` without saving the template first, an error occurs in the terminal. Steps to reproduce: --- - Install the ``sale_management`` module - Sales > Configuration > Sales Order > Quotation Templates - Create New > Quote Builder > Click on Upload - Try to upload a file Traceback: --- ``ValueError: invalid literal for int() with base 10: 'false'`` Previous Behaviour: --- When attempting to upload a file in the ``Quotation Templates`` without first saving the template, the template ID is not generated at [1]. As a result, at [2], we encounter an issue where ``int(sale_order_template_id) = 'false'``. This happens because the template tries to access its name in the uploaded file. If the template name is not available and we attempt to upload the file, ``resId`` at [1] will be returned as false. Solution: --- Until the template is saved, the upload button will remain hidden. Once the template is saved, the upload button will be displayed. This ensures that when a file is uploaded, the template name will be properly associated with it. [1]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/static/src/js/quotation_document_kanban/quotation_document_kanban_widget.js#L21-L23 [2]- https://github.com/odoo/odoo/blob/c5ce138697d7c5ebe200566dfb8b7ba55365f100/addons/sale_pdf_quote_builder/controllers/quotation_document.py#L24-L26 sentry-5963406254 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
2 changes
Resolved issues and error corrections
This update resolves an issue where external tax calculators were incorrectly processing taxes on down payment invoices. To ensure accurate calculations, down payment invoices no longer send tax information to external calculators, reverting to a standard invoice calculation. This simplifies the process and avoids discrepancies due to tax rounding and exemptions.
Original PR description
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by…
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from account.tax records. It's not always going to match. It's not possible to fix this by externally calculating taxes on the down payment invoice. The single down payment line cannot accomodate all different tax categories. Creating a down payment line per tax category (e.g. avatax_category_id) was considered, but a specific down payment product would need to be created per used tax category which would clutter the database. On top of that, down payment products are removed in later versions [1] which would complicate this approach even further. This solves the issue by not calculating taxes on down payments at all. The down payment invoice will not be sent to external tax calculators. The resulting down payment lines on the SO won't have taxes set, and those lines will be excluded from the request to the external tax calculator. The final, "regular invoice" transaction will happen as if no down payments were made. The down payment lines won't be sent, so this will look like a regular invoice from the external calculator's view. By default, the downpayment lines equal the subtotal of the selected down payment amount. We remove tax_ids from the lines because we cannot count on calculating tax locally (see above). To keep the behavior analogous we override the downpayment wizard to create a single down payment line with a total equal to the entered total in the wizard. [1] odoo/odoo@9aa52dd6418e5881adc2d96d15d062b55d6150c5 opw-3971513
This update enhances the report editor's ability to display placeholder content for 't-out' fields. Previously, developers could manually adjust expressions to avoid placeholders, but now a new 'data-oe-demo' attribute provides a clearer signal for placeholder content within the studio environment, ensuring consistent and correct display.
Original PR description
Some reports have been edited to have qweb default content that was meant to only be used from within studio. ```xml <t t-field="some_field">studio placeholder</t> ``` This content is displayed if the evaluated value is either False or None. This can also happen outside studio, if the field is not required. An attribute `data-oe-demo` was introduced for t-fields. ```xml <t t-field="some_field" data-oe-demo="studio placeholder"/> ``` This attribute was introduced for t-field nodes in order to only display placeholder content inside the report editor. We didn't introduce it for `t-out` as it was possible to change the expression `<t t-out="obj.prop"/>` -> `<t t-out="obj.prop or ''"/>` While this definitely works, the attribute better signals the intent of the change. We thus add support for the attribute on t-out.