Wednesday, December 4, 2024
16 changes · 18.0
Resolved issues and error corrections
This fixes an issue where masonry layout options on website pages could fail or behave incorrectly when a theme has imperfect markup. Website editors should now be able to select these layouts more reliably, reducing friction when customizing pages.
Original PR description
See design-themes commit for details. Related to task-4246355
Fixed a live chat chatbot issue where selecting an answer containing an ampersand could crash the conversation. This makes chatbot flows more reliable for customers and support teams using answers with special characters.
Original PR description
Before this commit, if chatbot had ampersamd character in question answers, this would lead to following crash: ``` Cannot read properties of undefined (reading 'id') ``` Steps to reproduce: -…
Before this commit, if chatbot had ampersamd character in question answers, this would lead to following crash: ``` Cannot read properties of undefined (reading 'id') ``` Steps to reproduce: - configure chatbot with following step scripts: ``` Message | step type | answers | only if ---------+-----------+---------------------------+---------------- step | question | "test & step 2", "step 3" | step 2 | text | | "test & step 2" step 3 | text | | "step 3" ``` - open conversation with chatbot - select "test & step 2" => crash This happens because when selecting an answer, chatbot detects the selected answer by comparing user message content with all possible answer text content. The message body of user is escaped, whereas chatbot answers are not. Thus `test & step 2` is not found and therefore the crash results in `answer.id` where `answer` is `undefined`. This commit fixes the issue by escaping the value of answer in the detection of selected answer by user, so that escaped content is compared with escaped content too. opw-4369966
A background check for outdated page data now runs silently as intended. This prevents unnecessary user-facing interruptions while keeping the system maintenance behavior unchanged.
Original PR description
The get_vacuum_info route was intended to be silent. However, silent should be passed in the "setting" parameter of the rpc method, not the "option" one. This PR fixes the issue.
The webclient test process was improved to reduce long runtimes and prevent freezes when dependencies are missing. This helps developers get faster feedback and keeps quality checks more reliable before changes reach users.
Original PR description
This PR includes several solutions to reduce the total runtime of the unit test suites in the webclient. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Generating a payment link for an invoice with no invoice lines no longer causes an error. The system now safely detects when there is nothing to pay, preventing disruption during invoice preparation.
Original PR description
Currently, an error occurs when generating a payment link for an invoice without add an invoice line. Step to produce: - Install the ```account_payment``` module. - Create a new invoice, Click on the…
Currently, an error occurs when generating a payment link for an invoice without add an invoice line.
Step to produce:
- Install the ```account_payment``` module.
- Create a new invoice, Click on the 'Actions' button, and try to generate a payment link.
See Traceback:
```
KeyError: 'amount_due'
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 867, in onchange
defaults = self.default_get(missing_names)
File "addons/payment/wizards/payment_link_wizard.py", line 22, in default_get
self.env[res_model].browse(res_id)._get_default_payment_link_values()
File "addons/account_payment/models/account_move.py", line 105, in _get_default_payment_link_values
amount_max = next_payment_values['amount_due']
```
An error occurs when the system attempts to get the next payment value at [1], But there is nothing to pay as an invoice line is not available.
Link [1]: https://github.com/odoo/odoo/blob/288d3926c5d011590aa25e9886cfa36377974dd6/addons/account_payment/models/account_move.py#L104-L105
To handle this issue, return an empty dictionary if the invoice line has not been added.
Sentry-6078809446
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prA previously disabled automated website sales test has been updated so it can run again. This helps catch issues in the online sales flow earlier, improving reliability without changing the customer-facing experience.
Original PR description
This tour has been disabled since October 15, 2024. In this commit, we make the necessary adaptations to reactivate the tour. runbot_error_id~99080 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
The web test configuration was adjusted to allow JavaScript tests more time to complete. This helps reduce false failures in automated checks, making development and release validation more reliable without changing user-facing behavior.
This update makes Odoo's rich text editor more reliable by ensuring key editing features are always available to related tools. It also shares list item handling so comments and other editor features can work consistently in more places.
Original PR description
`position_plugin` and `input_plugin` don't share methods, but they offer features through resources that are pretty much essential for other plugins. In these cases, it makes sense to add them as a dependency. Knowledge `comments_plugins` needs a set of all nodes where it should be allowed to insert a new comment. `LI` element is part of it, and therefore `listItem` is exported for external use. task-4331264
This fixes a crash that could happen when debug-mode users opened an outgoing payment method line directly from bank journal settings and tried to edit the Payment Account field. The change keeps the accounting setup screen stable in this edge case, preventing an error caused by missing parent journal context.
Original PR description
Users in debug mode can click on a 'View' button in the list renderer
and open the specific record form view. However this may crash if the
model was not intended to be opened in a stand alone form view
Steps to reproduce:
- Go to debug mode
- Go to Accounting Dashboard
- Open Bank Journal settings
- Switch to Outgoing Payments tab
- in List menu options activate 'View Button'
- Click 'View' button
- Try to modify the 'Payment Account' field
Issue: Tracbeack will raise
```
Error: Name 'parent' is not defined
EvalError: Can not evaluate python expression: ((company_id and [('company_ids', 'parent_of', [company_id])] or [('company_ids', 'parent_of', '')]) + ([('deprecated', '=', False), '|', ('account_type', 'in', ('asset_current', 'liability_current')), ('id', '=', parent.default_account_id)]))
Error: Name 'parent' is not defined
```
opw-4233216This update fixes automated test tours across Point of Sale, Restaurant, Project, Website, and eLearning areas. It helps reduce false test failures, making future releases and maintenance more reliable without changing day-to-day user workflows.
Original PR description
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 fix preserves the original database constraint definition when Odoo checks whether a constraint needs updating. It avoids unnecessary remove-and-recreate operations and prevents percent signs in constraints from being changed incorrectly, improving reliability during updates.
Original PR description
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint.…
If we replace the original definition then the check between the existing definition and the original one will always fail, thus we are always removing and re-adding the same constraint. https://github.com/odoo/odoo/blob/5ba361ddffa757cf60968f37180c7fd1304b3fd4/odoo/models.py#L3209
Replacing `%` by `%%` works for `LIKE` operator because they are equivalent. Since they are sent as-is to the DB the constraint could actually be plainly wrong.
```sql
test_17=> SELECT coalesce(d.description, pg_get_constraintdef(c.oid))
FROM pg_constraint c
JOIN pg_class t
ON t.oid = c.conrelid
LEFT JOIN pg_description d
ON c.oid = d.objoid
WHERE t.relname = 'ir_model_fields'
AND conname = 'ir_model_fields_name_manual_field'
+------------------------------------------------+
| coalesce |
|------------------------------------------------|
| CHECK (state != 'manual' OR name LIKE 'x\_%%') |
+------------------------------------------------+
```
Example where the definition sent to the DB is wrong:
```py
class A(models.Model):
_inherit = "res.users"
_sql_constraints = [("test_constraint", "CHECK (login !~ '%')", "Cannot have % in login")]
```
```sql
test_17=> \d res_users
...
Check constraints:
"res_users_test_constraint" CHECK (login::text !~ '%%'::text)
...
```
Since 18.0, we adapt the `SQL` object so that composition with code containing '%' works and we accept single unescaped '%' if there is no arguments.
X-original-commit: 692ad8e8a969981c6171b7bef34dfee5f0b007f8
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prFixed an error that could prevent users from saving new subscription items from a recurring plan. This improves reliability for teams managing subscription offerings and avoids disruptive frontend error messages during setup.
Original PR description
Versions: - 18.0 Steps to Reproduce: - Go to Recurring Plan. - Click on the "Subscription Items" button. - Create a new item and save it. Issue: - An error occurs when saving a new subscription item. Cause: - create method of the sale.order.line model when ensure_one was called on an empty recordset. Solution: - Fixed a ValueError occurring in the create method of the sale.order.line model when ensure_one was called on an empty recordset. Added validation to prevent attempts to unpack values from an empty recordset, ensuring smoother operation during sales order line creation and preventing RPC errors in the frontend.
This fix prevents users from creating personal appraisal templates that appear in the shared official template list. Users who need their own content can instead keep it in a dedicated private knowledge sheet, reducing clutter and confusion for everyone.
Original PR description
To avoid everyone creating his own template and making noise in the official list. If a user want to use his own template he can have a dedicated and private knowledge sheet for that. task-4366949
Luxembourg payroll demo employee records now include the required identification information. This allows the DECSAL report to be created correctly when using demo data, improving testing and setup validation.
Original PR description
Added the "identification_id" to all the "hr.employee" records to ba able to create the "DECSAL" report Task: 4334816
The Documents app's deletion test flow was adjusted so it waits properly after a document is removed. This prevents a false warning caused by checking a record that no longer exists, making quality checks more reliable.
Original PR description
This commit addresses a warning triggered during the document delete tour. The issue occurred because the tour attempted to access a deleted record, resulting in an timing issue. A timeout was added to ensure proper synchronization between UI actions and record states. error :- 99347
Attendance-based contracts now keep a single work entry when an employee's attendance spans a lunch break. This avoids creating separate work entries around lunch and better reflects the actual attendance period.
Original PR description
For attendance based contract do not split generated work entries around lunch Steps --- * Create a running contract for some employee that uses a schedule with * `work_entry_source = 'attendance'` * Create an attendance overlapping lunch for the employee * (e.g 10:00 -> 20:00) * => 2 work entries are generated: * 10 - 12 * 13 - 20 * We want only one: 10 - 20 task-4252156