Daily updates from Odoo
Tuesday, June 10, 2025
5 changes · saas-18.3
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
This fix prevents Accounting users from seeing an error after fetching bank transactions and clicking the total amount. The system now keeps the correct bank journal context, so users can open the related balance view without interruption.
Original PR description
The system will crash with an error when we `fetch transactions` and then click on the total amount in the top right corner, because the method `action_open_bank_balance_in_gl` expects `exactly one…
The system will crash with an error when we `fetch transactions` and then click on the total amount in the top right corner, because the method `action_open_bank_balance_in_gl` expects `exactly one journal record` (self.ensure_one()), but receives an empty recordset. **Steps to Produce:-** 1. Install the `Accounting` module. 2. Navigate to `Invoicing > Bank`, then click on "Search Banks" and connect with the `Odoo Bank Sync Demo`. 3. Click on `Fetch Transactions` and wait for the process to complete. 4. In the new view, click on the `total amount` located in the `top right corner`. **Error:-** `ValueError: Expected singleton: account.journal()` **Solution:-** - At [1], in `default_context` we can see that `active_id` is not given. [1] https://github.com/odoo/enterprise/blob/4b8edc19dbece15f7843ec3647c464307e165906/account_online_synchronization/models/account_online.py#L878-L882 - So, in this commit now active_id is added in default_context to prevent the error **Sentry - 6644825437**
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 app demo data no longer includes temporary Odoo website links that became unreachable during an Odoo.com upgrade. This prevents automated test environments from failing because of unavailable demo URLs, helping teams keep validation pipelines stable.
Original PR description
Using Odoo URLs in the AI app demo data while Odoo.com is upgrading is causing an issue in the runbot as all these URLs are unreachable causing the runbot to be completely red. I am removing these urls for now as a hot fix.
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**