Daily updates from Odoo
Friday, November 15, 2024
10 changes · 18.0
Resolved issues and error corrections
List views can now apply a configured column width to action buttons. This gives business teams more control over list layouts, especially where button columns need consistent spacing or alignment.
Original PR description
Before this commit, it was not possible to set the width attribute in a list view arch on `<button>` nodes. This commit allows it. One difficulty was that there's already some magic around button columns. Indeed, adjacent buttons in the arch are gathered in a single column. This doesn't map well with the width logic, as we want to be able to define a width on a button, which will thus define the width of its column. This can only work if the button is alone in its column. For that reason, when a button has a width, we do not group it with its potential adjacent buttons. Task~4307553 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 conflict that could break the state dropdown on the customer account edit page when Peppol invoicing was installed. Customers can now change their country and select the correct state without losing standard portal account behavior.
Original PR description
Steps to reproduce: 1. Go to website > My Account > Edit information 2. Change the country from say India to United States 3. Click on the state drop down, which then appears blank. The issue occurs because the `account_peppol` module extends the public widget by using the same name as the existing `portalDetails` public widget from the portal module, effectively overriding it. This causes certain functionalities to be lost when `account_peppol` is installed. This commit modifies the `account_peppol` module to extend the existing portalDetails widget instead of overriding it. Issue introduced in commit: https://github.com/odoo/odoo/commit/857b9a188c77cef2e3cd8a1c6b3035e7cd8d1305 task-4310315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where removing the currency from an invoice could cause the page to crash with an error. The invoice and tax calculations now handle a missing currency more safely, helping users continue editing invoices without interruption.
Original PR description
When the user removes the currency from the invoice, a traceback will appear. Steps to reproduce the error: - Enable multiple currencies - Create a invoice > Add a line > Add any product > Remove…
When the user removes the currency from the invoice,
a traceback will appear.
Steps to reproduce the error:
- Enable multiple currencies
- Create a invoice > Add a line > Add any product > Remove currency
Traceback:
```
AssertionError: precision_rounding must be positive, got 0.0
File "addons/account/models/account_move.py", line 1550, in _compute_tax_totals
base_lines, _tax_lines = move._get_rounded_base_and_tax_lines()
File "addons/account/models/account_move.py", line 1529, in _get_rounded_base_and_tax_lines
AccountTax._add_tax_details_in_base_lines(base_lines, self.company_id)
File "addons/account/models/account_tax.py", line 1354, in _add_tax_details_in_base_lines
self._add_tax_details_in_base_line(base_line, company)
File "addons/account/models/account_tax.py", line 1313, in _add_tax_details_in_base_line
taxes_computation = base_line['tax_ids']._get_tax_details(
File "addons/account/models/account_tax.py", line 1034, in _get_tax_details
raw_base = float_round(raw_base, precision_rounding=precision_rounding)
File "odoo/tools/float_utils.py", line 70, in float_round
rounding_factor = _float_check_precision(precision_digits=precision_digits,
File "odoo/tools/float_utils.py", line 35, in _float_check_precision
assert precision_rounding > 0,\
```
https://github.com/odoo/odoo/blob/0bcc55685fd75f88214b7da1f5df9ec9a7aff784/addons/account/models/account_tax.py#L1041
When, the user removes the currency, ``precision_rounding`` will be 0.0
because at [1], ``base_line['currency_id']`` will be empty,
So, the rounding will be 0.0
So, It will lead to the above traceback.
[1]- https://github.com/odoo/odoo/blob/0bcc55685fd75f88214b7da1f5df9ec9a7aff784/addons/account/models/account_tax.py#L1324
When, the user removes the currency, precision_rounding will be 0.0
because at [2], currency will be empty,
[2]- https://github.com/odoo/odoo/blob/a2c9755e3924bc04e524f5ca0e5e17cd98be5b12/addons/account/models/account_tax.py#L985
When, the user removes the currency,
At [3] "singleton: res.currency()" error will be raised.
so, fallback value is added for that.
[3]- https://github.com/odoo/odoo/blob/a2c9755e3924bc04e524f5ca0e5e17cd98be5b12/addons/account/models/account_tax.py#L1433
When the customer and product are added to the invoice, then the user removes
the currency, At [4] "singleton: res.currency()" error will be raised.
so, fallback value is added for that at [5]
[4]- https://github.com/odoo/odoo/blob/a2c9755e3924bc04e524f5ca0e5e17cd98be5b12/addons/account/models/account_tax.py#L1640
[5]- https://github.com/odoo/odoo/blob/a2c9755e3924bc04e524f5ca0e5e17cd98be5b12/addons/account/models/account_tax.py#L1601
When the customer and product are added to the invoice, then the user removes
the currency, At [6] "singleton: res.currency()" error will be raised because
k['currency_id'] is False.
[6]- https://github.com/odoo/odoo/blob/a2c9755e3924bc04e524f5ca0e5e17cd98be5b12/addons/account/models/account_tax.py#L2173
sentry-6018518380
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prPDF quotes with form fields are now generated so those fields cannot be edited after printing. This prevents accidental or unauthorized changes to quote text after the document has been produced.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Print a PDF quote with forms. Issue ----- Form fields can be modified. Cause ----- Commit be2f31a4ad03 changed some logic in a forward port, making field read-only, only if they have values. This logic was moved between 17.4 & 18.0 to before the values are known, so in 18.0, no fields are marked as read-only. Solution -------- Make all fields read-only. opw-4290594
The rental website checkout test now targets the actually selected date instead of a visually highlighted date. This helps keep date selection behavior reliable as related date picker changes are introduced, reducing the risk of future checkout regressions.
Original PR description
This commit fixes a selector targetting the wrong property (datepicker "highlighted" date instead of the "selected" one). This becomes relevant in an incoming commit in community changing the overall selection in date pickers. Community: https://github.com/odoo/odoo/pull/184844 Part of task [3433683](https://www.odoo.com/odoo/project.task/3433683)
This fixes how adjustment values are handled in the Italian point of sale fiscal receipt flow. It helps ensure the fiscal printer receives the expected numeric value, reducing the risk of receipt printing errors for discounts or other item adjustments.
Original PR description
Change the adjustmentType prop type to Number instead of String
Splitting PDF files into new documents has been made more reliable. The fix prevents occasional crashes caused by simultaneous access when newly split documents are created for another owner.
Original PR description
Reproduce: 1. Open the split tool on a pdf 2. Split into new documents 3. See crash about concurrent access to records 3. Sometimes you should do it several times This happens because several routes try to access the document simultaneously before any `documents.access` record exist. See `owner_values` in `documents.document`'s `_prepare_create_values` where we do this for the owner, but in the split tool, the owner can be someone else. Task-4319786
The "My Documents" filter now includes documents linked to the user's contact as well as documents they own. This helps keep files visible after migration when ownership may have been reset due to access restrictions.
Original PR description
Purpose ======= During the migration, the owner can be reset, if the user does not have a write access on the documents (because being owner gives all access on the record). Because of that, the filter "My Documents" does not show most of our files on next.odoo.com. To mitigate that, that filter now uses the contact in addition to the owner, and during the migration, if we reset the owner, and if the contact is False, we will set the contact to the partner of the owner. Task-4310779
Incoming emails sent to the Documents alias will no longer automatically assign a partner in a way that blocks other processing. This helps OCR and related document flows apply the correct values more reliably.
Original PR description
This is a known bug somehow reintroduced in sharepocalypse that prevents other flows (namely the OCR) from writing the correct values. Task-4260511
This fixes checkout errors that could block customers buying products on Colombian company websites. The address form now handles billing and delivery details correctly, reducing failed orders and improving the online purchase flow.
Original PR description
Steps to Reproduce: - Set up a website for a Colombian company. - Go to the shop section. - Purchase any product. Issue: - A traceback occurs when the checkout address form opens. - Another traceback appears upon clicking submit. Cause: - The error is due to an attempt to access an element in the form that is not present. Fix: - Added a condition to ensure that the element is accessed only when the address_type is set to billing. - Updated the view to display the identification type field when use_delivery_as_billing is enabled. opw-4278790