Daily updates from Odoo
Tuesday, June 10, 2025
10 changes
3 changes
Resolved issues and error corrections
This fix prevents incorrect partial matches and duplicate displayed amounts when users reconcile several invoices against a bank statement. It also improves how remaining amounts are shown in multi-currency cases, reducing confusion and helping accounting teams reconcile payments more reliably.
Original PR description
This commit will fix three different bugs: - When selecting multiple invoice in the select create dialog view and that the amount of the selected invoice was bigger than the open_balance. a partial was created directly which shouldn't be the case - When matching multiple invoice and then adding one more after, the open balance was wrongly computed since we were using the amount residual to calculate it and since the invoice is reconciled the amount residual was 0. Due to this commit: https://github.com/odoo/enterprise/commit/8bc9b75dd9a44ee87eb3b222cbec82a9697d8e6c - When having a statement line of a 100, adding 2 lines 75 and 25, when adding the last one, the residual is 0 and so the amount was display twice because sourceBalanceBiggerThanLineBalance was returning true. no task id
Importing a business card no longer crashes when OCR detects more than one contact on the same card. The CRM now processes each detected contact consistently, helping users create leads without interruption.
Original PR description
The system crashed because it expected the information from the card to be in `dictionary` format, but it came in the `list of dictionaries`. Usually, when there is only one contact on the card, the…
The system crashed because it expected the information from the card to be in `dictionary` format, but it came in the `list of dictionaries`. Usually, when there is only one contact on the card, the system retrieves the details as a `Dictionary`. But if the card has details of more than one person, it receives a `list of dictionaries`.
When the `extracted_data` comes as list of dictionaries, then at [1], it raises the `TypeError`.
[1]
https://github.com/odoo/enterprise/blob/e5b21d77b6dfff2b1371909c3c1e17cecee43a19/crm_enterprise/tools/business_card_scanner.py#L85
**Steps to produce:-**
1. Install `CRM` and make sure you have iap tokens for `Lead generation`.
2. Go to CRM and click on gear icon and click on Import Business Cards.
3. Then upload this [image](https://drive.google.com/file/d/1wKONdUEAMQptNU8cUeZsUY1xVJBpD8Dk/view?usp=sharing).
**Traceback:-**
```py
Traceback (most recent call last):
File "/home/odoo/odoo18/community/odoo/http.py", line 2467, in __call__
response = request._serve_db()
File "/home/odoo/odoo18/community/odoo/http.py", line 1970, in _serve_db
return self._transactioning(
File "/home/odoo/odoo18/community/odoo/http.py", line 2034, in _transactioning
return service_model.retrying(func, env=self.env)
File "/home/odoo/odoo18/community/odoo/service/model.py", line 164, in retrying
result = func()
File "/home/odoo/odoo18/community/odoo/http.py", line 2001, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/odoo18/community/odoo/http.py", line 2263, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/odoo18/community/odoo/addons/base/models/ir_http.py", line 349, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/odoo18/community/odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/odoo18/community/addons/web/controllers/dataset.py", line 32, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo18/community/odoo/service/model.py", line 84, in call_kw
result = method(recs, *args, **kwargs)
File "/home/odoo/odoo18/enterprise/crm_enterprise/models/crm_lead.py", line 34, in action_ocr_business_cards
leads = card_scanner.business_cards_to_leads(attachments)
File "/home/odoo/odoo18/enterprise/crm_enterprise/tools/business_card_scanner.py", line 82, in business_cards_to_leads
lead_values = {
File "/home/odoo/odoo18/enterprise/crm_enterprise/tools/business_card_scanner.py", line 85, in <dictcomp>
if extracted_data.get(field)
AttributeError: 'list' object has no attribute 'get'
```
**Solution:-**
- We first checked whether the data returned from the OCR was a dictionary or a list of dictionaries (multiple contacts).
- If it was just a dictionary, **we wrapped it in a list** so that we could handle everything the same way.
- Then, we looped through each dictionary, picked out the allowed fields, and **created a lead for each one**.
**Sentry - 6658829547**The AI module now handles missing or malformed embedding responses from the language model service without crashing. This makes chats that use attachment sources more reliable and logs failed responses so issues can be diagnosed.
Original PR description
The system generates an error if the embedding response from the LLM API is missing. This issue arose when handling attachments and computing the embedding for the given prompt. **Steps to Produce:-** 1. Install the `AI` module. 2. Navigate to the AI module. If an agent is present, click on the `configuration` option (available through the three dots). If not, create a new agent. 3. Set any valid `attachment source`. 4. Go to `Configuration > Settings and enter the OPENAI API KEY`. 5. Now open the chat and send any message. **Error:-** `TypeError: 'NoneType' object is not subscriptable` **Solution:-** - Added validation for the LLM embedding response to avoid crashes on empty. - Logged warnings for failed responses. **Sentry - 6616058580, 6613280188**
1 change
Resolved issues and error corrections
Invoices and similar accounting documents now correctly show the SEPA direct debit mandate linked through their payments. This helps teams rely on accurate mandate information when processing or reviewing direct debit collections.
Original PR description
The sdd_mandate_id field was related to the SDD mandate of origin_payment_id. However, since only journal entries created from payments have an origin_payment_id, other move types do not have the SDD mandate set. Converting it to a computed field that retrieves the SDD mandate from the payments instead. task-4531618
6 changes
Resolved issues and error corrections
This fixes an accounting issue where cash basis VAT entries could include incorrect base tax tags when certain taxes used complex distribution rules. The change helps ensure tax reports reflect the right amounts and categories after vendor bills are paid and reconciled.
Original PR description
Steps to reproduce:
- Have a [TAX] configured with:
- Affect Base of Subsequent Taxes: True
- Base Affected by Previous Taxes: True
- Tax Exigibility: Based on payment
- Distribution for invoices:
- Base, Tax grids: +A, +B
- 100% of tax, Tax grids: +C
- -100% of tax, Tax grids: -D, -E
- Distribution for refunds:
- Base, Tax grids: -A, -B
- 100% of tax, Tax grids: -C
- -100% of tax, Tax grids: +D, +E
- Create a BILL with [TAX]
- Create a matching Bank statement and reconcile with BILL
- Check the created Cash Basis Entry
Issue:
VAT line will feature base tags +A, +B in addition to the tax tags +C
This occurs because in the source bill 2 tax lines are created, the first one got the origin tax assigned
When the cash basis move is created the tax tags will be taken also from that tax
opw-4729298Sales quotations for foreign customers now show the product name in the customer's language, even when the salesperson edits the line description. This avoids duplicate or untranslated product names and helps customers receive clearer, usable quotation PDFs.
Original PR description
Previously, when selling a product to a foreign customer, the translated product name was stored in the order line description. However, the salesman could update this description, and if he did, the product name would be automatically included in the quotation's line description but kept hidden to ensure it appears in the final quotation PDF. Unfortunately, the product name was not translated into the partner language. This commit keeps the previous behavior with the exception that the product name included in quotations' line descriptions is now translated into the partner language. opw-4760300 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Importing product eCommerce description data now updates the intended translated text without wiping existing translations or replacing the default value. This helps teams safely maintain multilingual product pages through file imports.
Original PR description
## Version: saas-18.0+ ## Issue: Importing eCommerce translations for products erase all existing translations and set the new one as default value, whatever the user's current language is. The…
## Version:
saas-18.0+
## Issue:
Importing eCommerce translations for products erase all existing translations and set the new one as default value, whatever the user's current language is.
The `website_description` acts the same.
## Steps to reproduce:
- From the user's `Preferences`:
- Add a second language you understand;
- Translate all websites and close without switching;
- Access `Sales / Products / Products`:
- Set a product as favorite and open it:
- Under the `Sales` tab, write something in the `ECOMMERCE DESCRIPTION` field;
- Open the translation wizard by clicking the `EN` link appearing when hovering the input:
- Write anything else in the second language's input field and save;
- Come back to the general products view (*`Sales / Products / Products`*):
- Change view to list and select the favorite item (*check the case of the record line*);
- Via the `Actions` button, click on `Export`:
- Check `I want to update data (import-compatible export)`;
- From the `Available fields` list, add `eCommerce Description`;
- Open the exported file:
- Change the `description_ecommerce` content and save;
- From the general products view (*`Sales / Products / Products`*):
- Ensure no product is selected;
- Click the gear next to `Products` then `Import records`
- Click `Upload Data File` and select the exported and modified file;
- Ensure the fields are well mapped;
- Test then import data;
## Cause:
Translation method refactoring via this PR: https://github.com/odoo/odoo/pull/170779, especially `update_field_translations(field_name, {"fr_FR": {"en2": "fr2"}})`, requiring a key (`en2`) and a value (`fr2`) for a given language as a `field_name` translation. Before the fix, giving only one value erases value and key for a given `field_name`
opw-4600662Unbuilding a manufacturing order now correctly applies warehouse putaway rules to the returned component items. This prevents inventory from being recorded in the wrong shelf or location, improving stock accuracy for manufacturing operations.
Original PR description
Steps to reproduce the bug: - Create a storable product “P1”: - Update the quantity to 1 in "WH/Stock" - Create a putaway rule: - From "WH/Stock" to "WH/Stock/Shelf1" - Create a manufacturing order:…
Steps to reproduce the bug:
- Create a storable product “P1”:
- Update the quantity to 1 in "WH/Stock"
- Create a putaway rule:
- From "WH/Stock" to "WH/Stock/Shelf1"
- Create a manufacturing order:
- Select any product to produce
- Add a component:
- 1 unit of P1
- Confirm and validate the MO
- Unbuild the order
Problem:
A stock move for P1 is created from "Virtual Location/Production" to "WH/Stock/Shelf1" instead of "WH/Stock".
This happens because the `_apply_putaway_strategy` method is not called on the `stock.move.line` linked to the move.
In previous versions (e.g., v17), this issue didn't occur because the quantity was directly set on the move. This triggered a write on the `stock.move` model, which in turn called `_set_quantity`. Since no `stock.move.line` was linked at that point, a new one was created, and its quantity was set via `_set_quantity_done`, which itself called `_apply_putaway_strategy`:
- https://github.com/odoo/odoo/blob/002724506123b8160dc05cc3654cf87e49b67933/addons/mrp/models/mrp_unbuild.py#L202
- https://github.com/odoo/odoo/blob/b377e7d586f75ea8418deb498d2d551999ec5143/addons/stock/models/stock_move.py#L399
- https://github.com/odoo/odoo/blob/b377e7d586f75ea8418deb498d2d551999ec5143/addons/stock/models/stock_move.py#L384
- https://github.com/odoo/odoo/blob/b377e7d586f75ea8418deb498d2d551999ec5143/addons/stock/models/stock_move.py#L2133
This scenario used to work only when the product was untracked:
- https://github.com/odoo/odoo/blob/002724506123b8160dc05cc3654cf87e49b67933/addons/mrp/models/mrp_unbuild.py#L186
However, starting from v18, some code was refactored to clean up unnecessary conditions. The `else` block was removed, and now, regardless of the product type, the quantity is not set directly on the move anymore. Instead, a `stock.move.line` is created using `_prepare_move_line_vals`:
- https://github.com/odoo/odoo/blob/002724506123b8160dc05cc3654cf87e49b67933/addons/mrp/models/mrp_unbuild.py#L197
But `_apply_putaway_strategy` is not called in this flow.
Bug introduced in v18.0, commit:
https://github.com/odoo/odoo/commit/79d9dd7f15371aa7293a4af0b0ebd193aa80e2be
opw-4830952Emails with attachments sent to a Documents incoming address now use the company assigned to the target folder when creating the related email alias. This prevents company mismatch errors, so documents can be received correctly in folders owned by a specific company.
Original PR description
# Issue: When sending an email with an attachment to an incoming alias, if the target folder in Documents is explicitly owned by a specific company, an error occurs during alias creation: "We could…
# Issue: When sending an email with an attachment to an incoming alias, if the target folder in Documents is explicitly owned by a specific company, an error occurs during alias creation: "We could not create alias Inactive Alias because domain company1.com belongs to company YourCompany while the owner document belongs to company Company2." This issue arises because the `mail.alias.mixin.optional` model, when determining the `company_id` for the alias associated with the new document, might default to the system's company or another incorrect company, leading to a mismatch with the actual company of the explicitly-owned document folder. # Proposed solution: This commit modifies the `create` method of `mail.alias.mixin.optional` to prioritize the `company_id` of the document's target folder when setting the `company_id` for the associated alias. Specifically, within the loop where alias values are prepared: - It first attempts to retrieve the `company_id` directly from the `vals` dictionary for the current record. - If no `company_id` is explicitly provided in `vals` but a `folder_id` is present, it then checks the `company_id` of that `documents.folder`. - If the folder has an explicit `company_id`, this company is used as the effective `company_id` for the alias. - Otherwise, it falls back to the previously determined `company_id_default`. This ensures that the `company_id` used for alias domain validation aligns with the `company_id` of the document's folder, resolving the domain/owner company mismatch error. opw-4727873 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Credit and debit notes are now included in India GSTR-3B section 3.1(a), making the reported taxable sales figures more complete. This helps businesses file GST returns with totals that better reflect adjustments made through credit or debit notes.
Original PR description
In Gstr-3B section 3.1(a) credit note/debit note should be calculated. This PR adds credit note/debit note into section 3.1(a). **Older Version PR:** https://github.com/odoo/enterprise/pull/87160 **opw**-https://www.odoo.com/odoo/project/49/tasks/4845457 **Task**-4852947