Daily updates from Odoo
Thursday, January 30, 2025
17 changes · 18.0
Resolved issues and error corrections
This fixes Spanish TicketBAI reporting for Bizkaia so vendor bills send the supplier reference instead of the internal invoice name. It helps ensure submitted invoice data matches official supplier documents and supports correcting or cancelling invoices created with the previous numbering behavior.
Original PR description
… ref, not the name 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 fixes a small issue in sales PDF quote building so available product documents are calculated correctly when multiple sales orders are processed together. It helps keep generated quotes consistent and avoids missing or incorrect document options in batch operations.
Original PR description
This fix addresses a minor issue with the `_compute_available_product_document_ids` method of `sale.order`, which doesn't fully support multi-compute. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale now treats an order as a refund only when every line is negative, rather than when just some lines are negative. This prevents loyalty rewards from being incorrectly affected on mixed orders that include both sales and negative lines.
Original PR description
Assuming that an order is a refund with the presence of some negative lines is not compatible with the current implementation of pos_loyalty rewards. In this PR, we make an assumption that is valid in most cases than previous, such that an order is a refund if all of its lines are negative.
Fixes an issue where downloading a PDF for an unconfirmed invoice could fail with an error. Business users can now export draft invoice PDFs reliably from the invoice list, avoiding disruption during invoice preparation.
Original PR description
Steps to reproduce the error: - Create a new invoice. Don't confirm it. - Go to list view of invoices. - Select that invoice > Download > PDF Traceback: "AttributeError: 'bool' object has no attribute 'replace'" `_get_move_display_name` can be used instead as it already handles draft invoices. sentry-6191644587
Manufacturing order overviews now calculate expected bill of materials costs using the same workcenter assumptions as the bill of materials overview. This makes planned versus actual production cost comparisons more reliable by including time efficiency, setup time, and cleanup time.
Original PR description
Steps to reproduce the bug:
- Create a workcenter “WC1”:
- Cost by hour: 60
- Setup time: 10 min
- Cleanup time: 10 min
- Time Efficiency: 85
- Create a storable product “P1” with the following BoM:
- Operation: OP1 -> 60 min in WC1
- Create a MO to produce one unit of P1:
- Confirm the MO
- Go to the MO overview
Problem:
Time Efficiency, setup, and cleanup times are not taken into account in
the BoM Cost calculation.
The calculation should be the same as in the BoM overview. The purpose
of the BoM cost in the MO overview is to provide information for
comparison with the real cost, in case the user has modified certain
parameters during production.
Attention: There may be a slight difference in the calculation of
"mo_cost" and "bom_cost" because the expected duration is rounded to
two digits in the work order. This affects the mo_cost calculation
since it relies directly on this field,
opw-4478070This fix ensures carousel control options behave correctly when editing a website page. Business users get a more reliable preview and setup experience when choosing whether carousel arrows and indicators are hidden or centered.
Original PR description
Since [1], a method was introduced to prevent the "controllers" options from being centered when arrows and indicators are displayed. However, it was implemented in the wrong overridden method (computeWidgetState), which cannot update the DOM. Additionally, it failed to account for the preview mode. This commit resolves these issues. Steps to reproduce: - Website - Edit mode - Drag and drop a "carousel intro" snippet onto the page. - Select the option "Controllers > Arrows > Hidden." - Then select the option "Controllers > Centered." - The controllers are now displayed as centered. - Hover over the "Controllers > Arrows" options and preview a value other than "Hidden." - The preview does not update correctly. [1]: https://github.com/odoo/odoo/commit/454d743ed631c068b7b0bc72e4fd81b225a5ac52 Related to: task-4094405
The hierarchy view icon now appears in the intended tree-like orientation as soon as it is shown. This avoids a confusing visual glitch where the icon initially appeared incorrectly until users opened the hierarchy view.
Original PR description
This PR aims to fix an issue about the icon related to the hierarchy view not being rotated anymore. | 18.0 and above | This PR | |--------|--------| | <img width="529" alt="image"…
This PR aims to fix an issue about the icon related to the hierarchy view not being rotated anymore. | 18.0 and above | This PR | |--------|--------| | <img width="529" alt="image" src="https://github.com/user-attachments/assets/11289aa4-948d-4725-b8d5-e91bf5d601fc" /> | <img width="531" alt="image" src="https://github.com/user-attachments/assets/bc74ef4e-6e74-47d1-ac06-6bde1d6ed933" /> | To render the icon of the hierarchy view, we use a little trick by rotating the `fa-share-alt` icon so that it looks like a tree diagram one. Unfortunately, this does not work anymore in `18.0` and above. It seems the CSS won't be loaded until you entered the module, which leads to the icon being rendered to `fa-share-alt` by default and then rotated correctly once you click on it. To fix this issue, we actually make use of available utility classes `fa-rotate-90`to handle the icon rotation and `align-text-top` to handle the vertical alignment when the icon is rendered within a node. task-4501317 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents an error when receiving a purchased kit product that includes a lot-tracked component. Businesses can now validate these receipts reliably, ensuring inventory and costing updates complete without interruption.
Original PR description
Steps to reproduce the bug: - Create a storable product “P1”: - Product category: “AVCO” - BoM: - Type: Kit - Components: - C1: Tracked by lot and valuated by lot - C2 - Create a purchase order: - 1…
Steps to reproduce the bug:
- Create a storable product “P1”:
- Product category: “AVCO”
- BoM:
- Type: Kit
- Components:
- C1: Tracked by lot and valuated by lot
- C2
- Create a purchase order:
- 1 unit of P1 → Price: $10
- Confirm the PO
- Go to the reception:
- Set a new lot (Lot_1) for C1
- Validate the reception
Problem:
A traceback is triggered:
```
new_std_price = move_cost[lot]
~~~~~~~~~^^^^^ KeyError: stock.lot(19,)"
```
When validating the picking, the moves will first be validated, and then
the product price will be updated before the move is marked as done:
https://github.com/odoo/odoo/blob/168f4d75ef724ee99ffaf7884730facd8ed936bb/addons/stock_account/models/stock_move.py#L387-L388
The move cost is retrieved using the _get_price_unit function:
https://github.com/odoo/odoo/commit/2d933b83613ad52d76ab457201adecac6fcf184b#diff-ad6229e976ce0bd1592e805b88e9813ac4e3f6fb989d3dfb8dfb8b70af03cd58R403
However, since move.product_id is different from move.purchase_line,
the parent product will be treated as a kit, and the unit price of the
kit product will be used instead: https://github.com/odoo/odoo/blob/17.0/addons/purchase_mrp/models/stock_move.py#L19
Based on this, the unit price for each component is calculated using
the cost_share and the bom_lines quantities. This is then stored in a
dictionary with an empty record of the ```”stock.lot”``` model:
When attempting to access the dictionary using the lot key from the move,
no result is returned, leading to an error.
https://github.com/odoo/odoo/blob/2d933b83613ad52d76ab457201adecac6fcf184b/addons/stock_account/models/stock_move.py#L425
Solution:
The process should account for the fact that the move product is a
component of a kit. Therefore, the price should be directly retrieved
from the dictionary without requiring a key.
opw-4434390Saudi Arabia POS orders with a zero total, such as orders fully paid with an eWallet, no longer trigger an error during validation. This helps businesses complete legitimate sales smoothly without manual workarounds.
Original PR description
Before this commit, attempting to validate an order with a zero total (such as when fully paid using an eWallet) would result in an error. opw-4487591 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The survey editor now prevents users from adding embedded components that would not display correctly when respondents view the survey. This avoids broken or missing content in published surveys and helps creators use options that work reliably.
Original PR description
**Problem**: Embedded components do not render when the `html` field content is displayed outside the editor, as their mechanism relies on the editor plugin. **Solution**: Disable embedded components for the survey. **Steps to Reproduce**: 1. In a survey, add a section. 2. Add a "View" button. (Debug mode ON) 3. Use the `/` command box and add the "Video link" option. 4. Save and test the survey. 5. The video does not display. opw-4487027 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where users could hit an error when registering a payment for an invoice without an invoice date, especially when early payment discounts are involved. The payment flow now skips discount date calculations when the required invoice date is absent, avoiding disruption for accounting users.
Original PR description
Currently, a traceback occurs when there is no invoice date and tries to register a payment from actions. To reproduce this issue: 1) Install accounting 2) Create a customer invoice with payment term…
Currently, a traceback occurs when there is no invoice date and tries to register a payment from actions. To reproduce this issue: 1) Install accounting 2) Create a customer invoice with payment term having an early discount 3) Make sure the invoice date to be empty 4) Add a line and from actions click pay Error:- ``` TypeError: unsupported operand type(s) for +: 'bool' and 'relativedelta' ``` In account move, `invoice_date` is not required. So when the user tries to register a payment with payment term having an early discount and no invoice date, It leads to the above traceback from below line. https://github.com/odoo/odoo/blob/ee48df7f33a3aeb1798bf5852be8c6d26a7db7fd/addons/account/models/account_payment_term.py#L256-L258 Indeed, a date is required to get an early discount date. so without date, we should not execute the `_get_last_discount_date` method. In some other locations, it was managed in a similar manner as indicated in the below line. https://github.com/odoo/odoo/blob/ee48df7f33a3aeb1798bf5852be8c6d26a7db7fd/addons/account/models/account_payment_term.py#L262-L264 We can resolve this issue by adding an additional check of invoice_date, Which makes the code more robust. sentry-6149404219
A test in the Brazilian electronic invoicing area was corrected to match the current default email behavior. This helps keep automated checks reliable and reduces false failures during maintenance.
Original PR description
task-4478365
This fix restores subtotal information in Ecuadorian electronic withholding documents after a previous issue was resolved. Businesses using Ecuador localization should see more complete withholding records and fewer errors when reviewing related accounting documents.
Original PR description
We uncomment the subtotals because there was an error about withhold subtotals dict. Now the error has been resolved related: https://github.com/odoo/enterprise/pull/76330
Italian point-of-sale receipts sent to fiscal printers now calculate payment totals correctly when customers receive change. This prevents change amounts from being counted as an additional payment, helping ensure fiscal documents match the actual sale.
Original PR description
The issue was that payment lines with `is_change` were also being considered in the computation.
Exemple:
Product: 14.50
Payment: 20.00
Change: 5.50Deleting a website no longer causes related documents to be deleted unintentionally. This protects business files from accidental loss while still allowing documents to remain linked to the correct website when appropriate.
Original PR description
Due to an oversight when migrating documents share to documents in Sharepocalypse, documents were being deleted when their related website was deleted. This is not a desired behavior. Even though setting the "correct" website is possible (and desired) when there is a `company_id`, there is no problem with having empty `website_id` in the other case. opw-4494091
This fixes an unreliable automated test in Web Studio that could fail when all apps were installed. The change makes the test steps more precise, helping reduce false failures and keeping validation of updates more stable.
Original PR description
runbot-error-108304
Creating a loan could fail for companies with existing accounting activity because the system unnecessarily tried to update and recalculate a very large volume of accounting data. This fix prevents that costly recalculation while still allowing the loan form to show the correct currency information.
Original PR description
### Description: When creating a loan, users encounter a memory error if they have used accounting. This occurs because the `currency_id` field is related to the company's `currency_id` and is not…
### Description: When creating a loan, users encounter a memory error if they have used accounting. This occurs because the `currency_id` field is related to the company's `currency_id` and is not readonly, causing the ORM to perform an inverse related and update the company's `currency_id`. This is problematic since changing the currency triggers a massive recompute of nearly all accounting records unnecessarily. For example, in the case of this customer, it was trying to update 191219 account.analytic.line, which caused this memory error. The initial design aimed to show the monetary symbol on the form when the `onchange` in `web/models/models.py` was triggered, but this approach led to the issue. ### Fix: By adding `company_id` to the view as an invisible field, the onchange can retrieve it to display the monetary symbol without triggering the problem. This change is backward-compatible; customers who haven't updated their views will only miss the monetary symbols on the form view until the record is saved. ### Reference: opw-4486739