Daily updates from Odoo
Tuesday, May 20, 2025
9 changes · 18.0
Resolved issues and error corrections
Restaurant receipt wording is now translated as complete phrases instead of separate fragments, making translations more natural across languages. This also avoids confusion between restaurant tables and spreadsheet tables in translated text.
Original PR description
Do not use t-out/t-esc to build human-readable content. This is basically the same as string concatenation. This commit wraps the entire string in a gettext call to prevent it from being split into several non-reorderable translations. As a lucky side effect, it also creates a separate translation for the word "table" (as in restaurant tables) which won't overlap with the translation for spreadsheet tables. opw-4754410
This update refreshes the spreadsheet engine used in Odoo and fixes several issues affecting formulas, pivot tables, and localized content. Users should see more reliable spreadsheet behavior and faster handling of cell references, especially in larger or formula-heavy sheets.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/8213c0e66 [REL] 18.0.29 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/8213c0e66 [REL] 18.0.29 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/1c0365d55 [PERF] range: faster reference parsing [Task: 4771804](https://www.odoo.com/odoo/2328/tasks/4771804) https://github.com/odoo/o-spreadsheet/commit/24e0b5a9a [PERF] coordinate: faster xc parsing [Task: 4771804](https://www.odoo.com/odoo/2328/tasks/4771804) https://github.com/odoo/o-spreadsheet/commit/85faffbba [FIX] pivot: add `invalid` indicator for wrong calculated measure [Task: 4724069](https://www.odoo.com/odoo/2328/tasks/4724069) https://github.com/odoo/o-spreadsheet/commit/14b2d89ba [FIX] standalone composer: localize content [Task: 4724069](https://www.odoo.com/odoo/2328/tasks/4724069) https://github.com/odoo/o-spreadsheet/commit/ae307391b [IMP] tests: add additional jest matchers [Task: 4724069](https://www.odoo.com/odoo/2328/tasks/4724069) https://github.com/odoo/o-spreadsheet/commit/2600d6804 [FIX] evaluation: fix issue when writing formula on spilled data [Task: 4757650](https://www.odoo.com/odoo/2328/tasks/4757650) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This fix makes an internal stock landed costs test use a reliable ordering method so automated checks no longer fail unpredictably. It helps keep the development pipeline stable without changing business functionality or user workflows.
Original PR description
Issue ===== In the test `test_stock_landed_costs_lots`, there is this `assertRecordValues`: ```python self.assertRecordValues(lc.stock_valuation_layer_ids.sorted('product_id'), [ {'lot_id':…
Issue
=====
In the test `test_stock_landed_costs_lots`, there is this `assertRecordValues`:
```python
self.assertRecordValues(lc.stock_valuation_layer_ids.sorted('product_id'), [
{'lot_id': lot_product_b[0].id, 'product_id': product2.id, 'stock_valuation_layer_id': og_p2_layers[0].id, 'quantity': 0, 'value': 1.5},
{'lot_id': lot_product_b[1].id, 'product_id': product2.id, 'stock_valuation_layer_id': og_p2_layers[1].id, 'quantity': 0, 'value': 1.5},
{'lot_id': lot_product_a[0].id, 'product_id': self.product1.id, 'stock_valuation_layer_id': og_p1_layers[0].id, 'quantity': 0, 'value': 1},
{'lot_id': lot_product_a[1].id, 'product_id': self.product1.id, 'stock_valuation_layer_id': og_p1_layers[1].id, 'quantity': 0, 'value': 1},
{'lot_id': lot_product_a[2].id, 'product_id': self.product1.id, 'stock_valuation_layer_id': og_p1_layers[2].id, 'quantity': 0, 'value': 1},
])
```
This issue is sometime the records order is not the expected one.
Cause of the issue
==================
By doing `recordset.sorted('product_id')`, it will sort the records by compare their `product_id` records, using the python built-in `sorted`. The built-in `sorted` function simply check if record A is lower than record B, using the < operation. But in Odoo, comparing two recordsets is equal than comparing their ids as a `set`:
```python
def __lt__(self, other):
try:
if self._name == other._name:
return set(self._ids) < set(other._ids)
except AttributeError:
pass
return NotImplemented
```
In python, the comparaison between two sets compares is a set is a subset of the other one, which means than:
```python
{1} < {2} # is false
{1} < {2, 1} # is true
```
So, comparing SVLs by their product won't sort them by their product's id. If we want to do that, we have to explicitly do it by passing a function as the `sorted` `key` argument.
For more information, see:
-https://docs.python.org/3/library/functions.html#sorted -https://docs.python.org/3/reference/expressions.html#comparisons
runbot-build-error: 99086Inventory users can now validate inventory adjustments even when their write access to location settings has been removed. This lets businesses better protect warehouse location configuration without disrupting routine stock correction workflows.
Original PR description
PR #210777 Fix the issue for master (18.4) Currently the write access right is given to the inventory user. However some customer want to revoke this access in order to avoid user messing with their location configuration. But it's not possible since it will also raise an access error when validation an inventory adjustement. opw-4782515
Customers can now open their invoice pages even when an early-payment discount date was manually removed. The system safely handles the missing date instead of showing an error, improving reliability for customer self-service invoices.
Original PR description
When manually changing the `discount_date` field to null in an invoice related to a customer with an Early price discount payment term, the customer will face a type error on the website when…
When manually changing the `discount_date` field to null in an invoice related to a customer with an Early price discount payment term, the customer will face a type error on the website when accessing their invoices. **Steps to reproduce:** * Install the accountant module * Create a new invoice for the current user as a customer (e.g., Mitchel Admin). * Set `2/7 Net 30` in payment terms and add any product. * Go to Journal Items and make Discount Date visible if not already visible. * Under the account field `121000 Account Receivable` remove the discount date and confirm the invoice. * Open portal View (/my) and click on Your Invoices >>> Error occurs. `TypeError: unsupported operand type(s) for -: 'bool' and 'datetime.date'` **Solution:** We use if else blocks to check if `discount_date` exists for the `days_left calculation`; if it exists, do the calculation as usual if `discount_date` is in future. Otherwise, set `days_left` to zero and continue the function as usual. Sentry-6395559503 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
DIN5008 formatted reports now show partner and shipping addresses with the same font size. This fixes a visual inconsistency in printed quotations, making customer-facing documents look more polished and uniform.
Original PR description
### Steps to reproduce: - Install "l10n_din5008" - In Settings > Layout, select DIN5008 as the report layout - Create a quotation, print it - The address of the partner and the sipping address have different font size ### Cause: Since this [commit](https://github.com/odoo/odoo/commit/92e4c3cb3bec0b3d5537a50fd441a22fa6509ed1) the partner address is a span which is applied a [`font-size: 0.8em;`](https://github.com/odoo/odoo/blob/f77b40bba0c92a9a225eb7ade694e79cb804f7bf/addons/l10n_din5008/static/src/scss/report_din5008.scss#L51). But not the shipping address. ### Solution: Remove the restriction of `span` to apply the font-size. This way all text in address should have the same font-size. Before:  After:  opw-4725169
Rental availability forecasts now correctly account for product security or preparation time before a rental starts. This prevents stock from appearing available when it is already reserved for an upcoming rental, helping teams avoid overbooking rentable products.
Original PR description
…vailability ### Steps to reproduce: - In the settings enable "Rental transfers" - Create a storable product that can be rented put 100 units in stock and add a `Security Time` of 24 hours. - Create…
…vailability ### Steps to reproduce: - In the settings enable "Rental transfers" - Create a storable product that can be rented put 100 units in stock and add a `Security Time` of 24 hours. - Create a rental order for 10 units of that product planed for the period : [today + 2 days, today + 3 days] and confirm it. - Create a rental order for 10 units of that product planed for the period : [today + 1 days, today + 2 days] and confirm it. - Look at the forecast rentable quantity. #### > It should be 90 but it is 100. ### Cause of the issue: The `preparation_time` (`Security Time`) field is used at the sale order line creation to modify the `reservation_begin` value: https://github.com/odoo/enterprise/blob/bc3db24f83473d5646f7c2cfca8ed1c5b064ea2e/sale_stock_renting/models/sale_order_line.py#L447-L453 In particular, the `preparation_time` of the product creates a difference between the `order_id.rental_start_date` and the `reservation_begin`. This is porblematic since the `rental_start_date` is used to generate the dates of the deliveries taken into account by the forecast: https://github.com/odoo/enterprise/blob/bc3db24f83473d5646f7c2cfca8ed1c5b064ea2e/sale_stock_renting/models/sale_order_line.py#L354-L362 but the quantity considered as rented does not and is purely based on the `reservation_begin` of the line: https://github.com/odoo/enterprise/blob/bc3db24f83473d5646f7c2cfca8ed1c5b064ea2e/sale_stock_renting/models/product_product.py#L113-L117 In particular, the qunaities are not yet accounted ithe stock forecast by the `virtual_available` value of the product: https://github.com/odoo/enterprise/blob/bc3db24f83473d5646f7c2cfca8ed1c5b064ea2e/sale_stock_renting/models/sale_order_line.py#L129-L132 But will incorrectly be found and read by the rental forecast: https://github.com/odoo/enterprise/blob/bc3db24f83473d5646f7c2cfca8ed1c5b064ea2e/sale_stock_renting/models/sale_order_line.py#L133-L140 opw-4552760
Duplicating a sales quote now also duplicates its quote calculator spreadsheet, including its saved change history. This prevents the copied quote from reverting to default calculator values and helps sales teams avoid accidentally resetting pricing details.
Original PR description
1. Create a quote using a quote template that uses the quote calculator (e.g. the demo one, works fine), 2. Modify it using the quote calculator, 3. Duplicate it, 4. Open the quote calculator in the new quote -> it's filled with default values instead of the one from the other quote you dpulicated one could expect after duplication (and so if you save without changing anything in the spreadsheet, you 'reset' the quote even though it's probably not what you wanted to do), Expected behaviour: the quote calculator spreadsheet is duplicated for the new quote with the same values. Implementation note: Why not just `copy=True` on field `spreadsheet_ids`? Because the spreadsheet should be copied, but not only! The `spreadsheet.revision` linked to the spreadsheet also need to be copied. If they are not copied, revisions which are not part of the last snapshot will be lost on the new spreadsheet record and it won't lead to the same spreadsheet data. Task: 4801418
The checkout billing address form now correctly shows and requires both Identification Type and Identification Number for Colombian electronic invoicing. This prevents customers from getting stuck in repeated checkout redirects and helps businesses collect the mandatory invoicing details for compliant sales.
Original PR description
Following a discussion with the product owner, it was clarified that in Colombia, customers must provide both an Identification Type and an Identification Number (VAT) for electronic invoicing, as these details are mandatory for all sales. Additionally, for extra billing addresses, the fields should also be visible and required. To address this, all billing addresses in the Colombian localization must include these fields as required. 1. Install the module "l10n_co_edi_website_sale." 2. Change the default company of the current user to a Colombian company and switch to it. 3. Go to the partner record for the user and change the address to a Colombian address. 4. Add a contact as an invoice address with a Colombian address. 5. Go to the shop, add a product to the cart, and click "Go to checkout." 6. On the address page, click "Save address." The page redirects to itself repeatedly. opw-4309448 Forward-Port-Of: odoo/enterprise#77722 Forward-Port-Of: odoo/enterprise#76609