Wednesday, December 4, 2024
21 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.
Clearing formatting in the HTML editor now works correctly for fully selected tables with colored cells. This prevents the editor from freezing and ensures table cell background colors can be removed as expected.
Original PR description
Description of the issue this PR addresses: I. Removing formatting on text with a background color inside a fully selected table triggers an infinite loop in `removeAllColor`. This happened because applying background color to selected table cells filtered out child nodes in each `<td>` to apply background color directly to the cell. However, this filtering should be skipped when there is no color to apply, such as when removing background color. II. This PR fixes an issue where the background color of a table cell could not be removed when clearing formatting. task-4333327 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures products created by Purchase users keep matching sales and purchase units of measure, even when some unit fields are hidden by access rights. It prevents products from accidentally defaulting purchase units to “Units,” reducing order and inventory mismatches.
Original PR description
Steps to reproduce: - User permission on purchase - Create a product with a specific uom_id - The uom_po_id is set to the default "Units" since the user has no access to the uom_po_id due to visibility restriction. Issue: The error occurs when users without admin rights on Purchase do not have visibility into uom_po_id. this leads to uom_po_id defaulting to "Units" during product creation. Consequently, there is a mismatch between uom_id and uom_po_id. Fix: The fix has been [implemented](https://github.com/odoo/odoo/commit/c6fd91d61b2f62cab4) .This commits aims to add a test to ensure alignement between the different uom (purchase and sales). opw-4286165 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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.
The salary configurator dropdown now groups choices by category again, making options easier for users to browse and select. This restores expected behavior from the previous version and adds spacing below the dropdown for a cleaner experience.
Original PR description
Problem ---------- In th salary configurator, The display "group by category" for dropdown is broken in 18.0 due to framework task. Objective ---------- Make it works again like in 17.4. Group options by optgroup Solution ---------- add groups in the state and fill it with label of groups (attribute in optgroup) and all the choices (options inside optgroup) task-4350875
Users can once again add comments inside list items in Knowledge articles when using the new editor. This fixes an unintended limitation and helps teams keep feedback tied to the exact content they are discussing.
Original PR description
`position_plugin` does not share methods, but it offers features through resources that are pretty much essential for other plugins. In these cases, it makes sense to add them as a dependency. Prior to this PR, it was not possible to comment inside a list item (comment beacons were not allowed inside) in the new editor. It is not intended, and this commits allows it again. task-4331264
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
Fixed subscription billing so customers see and are charged the correct tax-inclusive amount when using external tax providers such as AvaTax. This prevents exempt or specially taxed customers from seeing incorrect portal totals or being charged based on recalculated internal tax estimates.
Original PR description
To reproduce the issue: - Enable Avatax in Accounting settings - Go to the 'All' product category and set Avatax Category '[D0000000] Digital goods' - Create a subscription order and set Deco Addict…
To reproduce the issue: - Enable Avatax in Accounting settings - Go to the 'All' product category and set Avatax Category '[D0000000] Digital goods' - Create a subscription order and set Deco Addict as the customer (is exempt) - Set the Avatax fiscal position - Confirm the order - Preview in portal view - Notice the tax is not equal The subscription portal view was changed in #49963 to only display lines to be invoiced. So non-recurring lines were no longer shown. Because of this, the regular `tax_totals` field cannot be used in the portal anymore. Tax totals need to be recomputed for just those lines. This was done in a new method: `_next_billing_details()`. This method recomputes tax totals using account.tax records, which won't be correct in many cases when using an external tax calculator. The percentage field that we set on the tax is only informational, and won't take exemptions into account. Up to this point, the issue was only cosmetic. The customer was still charged the correct amount. This changed in #72120. Instead of charging `amount_to_invoice`, it now charges the amount calculated by `_next_billing_details()`. This, as stated above, won't always be correct. To resolve the problem we first override `_next_billing_details()` so that it returns `tax_totals` based on line amounts. Those fields are the authoritative amounts that we set during external tax calculation [1]. This solves the cosmetic issue described above in most cases. However, the wrong totals are still displayed right after paying a subscription. This happens because the payment changes the state of the subscription, which invalidates the line amounts and recomputes them from `account.tax` again. We already overrode the `/my/subscriptions` controller to insert an external calculation and avoid this, but it happened after `super()` which is too late. At that point `_next_billing_details()` is already evaluated, with the incorrect values already in `qcontext`. To solve that we move the call before `super()`. We also change `next_amount_invoice` to be the sum of invoicable lines, again basing this total on the authoritative amounts returned by the external tax calculator. We cannot use `amount_to_invoice` like before, because that breaks the "Anticipate payment" feature which was fixed in #72120. This solves the issue of charging the wrong amount. opw-4315535 opw-4363065 [1] https://github.com/odoo/enterprise/blob/84aa5e2fb064bc0366e952cbd4eaf3628ea24b73/sale_external_tax/models/sale_order.py#L43-L55 PR note: built on top of #73921
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