Thursday, October 24, 2024
29 changes
1 change
Resolved issues and error corrections
This fixes a display issue where message author avatars could disappear in public channels after the sender left, especially for guests viewing the conversation. It helps keep chat history clear and recognizable for users without changing the conversation content.
Original PR description
Steps to reproduce: - Create a public channel - Add a non website_published user as a new member - Log in as that new member and send a message then leave the channel - Open the channel as a quest - The author avatar of the message is not there
21 changes
Resolved issues and error corrections
The table picker in the HTML editor now closes when users press most keys, instead of staying open while they type. This makes table insertion feel more predictable and avoids the picker lingering over the editing area.
Original PR description
**Current behavior before PR:** - After opening the table picker, it does not close when typing, unless Escape key was pressed **Desired behavior after PR is merged:** - Now, the table picker will close when any key is pressed except for arrow keys.
3 changes
Resolved issues and error corrections
This update fixes an issue where tax groups weren't correctly reflecting the company associated with a sales order or invoice in Chile. By adding the move company to the context, the system now accurately retrieves the appropriate tax groups, ensuring correct reporting and compliance with Chilean tax regulations. This complements a previous fix and improves data accuracy.
Original PR description
This is a complement of previous fix: https://github.com/odoo/enterprise/commit/9b2d9508745fb1b00e42c8d729d01ad7ae1b4b85 Add the company of the move in the context as it is possible that the company of the move and the current company are different. Related community PR: https://github.com/odoo/odoo/pull/185096
This fix ensures mobile users can create stock move records when required details are filled automatically in the background. It prevents situations where warehouse staff could be blocked from recording stock movements on mobile devices.
Original PR description
Since the `name` field is set via onchange, we need it here. Currently on mobile, a user may be prevented altogether from creating a stock move record in some situations. opw-4278098
Restores a previously removed action so customers with older analytic views can still use the view button without hitting an error. This prevents a user-facing crash and keeps existing custom or not-yet-updated screens working as expected.
Original PR description
The `action_read_distribution_model` method was removed from the following commit. https://github.com/odoo/odoo/pull/182278/commits/777dea298fd74f2349ca22d05fe7f48596216dfe Since the client's non-updated views still call it, but get a traceback as it doesn't exist anymore. Error:- ``` AttributeError: The method 'action_read_distribution_model' does not exist on the model 'account.analytic.distribution.model' ``` We add it again to fix the issue. sentry-5804153543
Mobile users can now create or view discussion threads from message actions as expected. This fixes a display issue that prevented important conversation options from appearing on phones and tablets.
Original PR description
**Current behavior before PR:** Users were unable to create or view threads from message actions on mobile devices due to an incorrectly written condition. The condition checked `component.isOriginThread`, but in mobile, the component is `MessageActionMenuMobile` insead of `Message`, which does not have the isOriginThread method. **Desired behavior after PR is merged:** This PR fixes the issue, allowing the create or view thread actions to display properly on mobile. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Sharing a project without adding collaborators no longer sends an unnecessary notification. This prevents confusing messages and makes the sharing flow clearer for users.
Original PR description
Previously, when a project was shared without adding collaborators, an incorrect notification was sent, potentially confusing for the user. this commit ensures no notification is triggered if the collaborator's O2M field is empty,thereby avoiding misleading messages. task-3956252
Changing a user's tour setting from the form now correctly stops any running guided tour when tours are disabled. This prevents unwanted onboarding or help tours from continuing after a user or administrator turns them off.
Original PR description
Before this commit, changing tour_enabled on the form view of the user was not deactivating the running tour. After this commit, the running tour is deactivated if the tour_enabled is false when loading the tour service. TASK-ID: 4276412 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where automated actions that cleared a linked record field could fail and show a web error instead of saving normally. Businesses using automated updates, including Studio-created rules, can now rely on those fields being cleared as intended.
Original PR description
**Current behavior:** Setting up an automation rule which attempts to clear an m2o field on a record can result in an exception occurring on rule trigger. **Expected behavior:** The targeted field is…
**Current behavior:**
Setting up an automation rule which attempts to clear an m2o field on a record can result in an exception occurring on rule trigger.
**Expected behavior:**
The targeted field is cleared.
**Steps to reproduce:**
*Concrete example: `-i stock,web_studio`
1. Go to the form view for lots/serial numbers
2. Activate studio, add a new Boolean field and a M2o field (on res.partner for sake of example) in the view
3. Create a new automation rule which runs on `stock.lot` like:
* Trigger: `On save`
* Before Update Domain: `Match all records`
* Apply on: `[('x_studio_new_boolean_field', '=', False)]`
4. Add an action to the rule like:
* Type: `Update Record`
* Action Details: `Update x_studio_new_m2o_field to <blank>`
5. Open a lot record, set the new boolean field to True and enter a partner in the m2o field -> save
6. Set the boolean to False then save again -> web error
**Cause of the issue:**
Setting the field to False is actually evaluated as setting it to 0 -> we write `res.partner(0,)` instead of clearing it. At the conclusion of the automation rule being triggered, there is a `web_save()` which returns a `web_read()` on the (in this instance) `stock.lot` record being written on.
Here, once we see the `x_studio` m2o field in the specification, there is a dict comprehension:
https://github.com/odoo/odoo/blob/b794f0f332f473deb2c04eba60baf4761db3b508/addons/web/models/models.py#L116-L119 Which calls `cleanup()` on the result of a recursive`web_read()` on `res.partner(0,)` which here is returning {'id': 0}. In `cleanup()`: `vals['id'] == 0 == False` -> Try to access `vals['id'].origin` which, of course, raises an exception.
**Fix:**
For m2o fields, evaluate Falsey expr values in `_eval_value()` to explicit `False`.
opw-4252864This fixes an error that could appear when users enabled Valuation by Lot/Serial number on the same product from multiple open tabs. The change prevents the page from crashing, making product inventory valuation settings more reliable.
Original PR description
When the user clicks on the checkbox of ``Valuation by Lot/Serial number``, a traceback will appear. Steps to reproduce the error: - Install ``stock_account`` module - Create a product(type : Goods)…
When the user clicks on the checkbox of ``Valuation by Lot/Serial number``,
a traceback will appear.
Steps to reproduce the error:
- Install ``stock_account`` module
- Create a product(type : Goods) > Track Inventory: ``By Unique Serial Number``
- Create one variant of that product
- Now, Open the product in one tab and open the product variant in another tab
- Click on the checkbox of ``Valuation by Lot/Serial number`` in both tabs
Traceback:
```
UnboundLocalError: cannot access local variable 'products' where it is not associated with a value
File "odoo/http.py", line 2364, 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 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, 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/sale_project/models/product_template.py", line 137, in write
return super().write(vals)
File "addons/stock_account/models/product.py", line 82, in write
impacted_templates[tmpl] = (products, description, products_orig_quantity_svl)
```
https://github.com/odoo/odoo/blob/09fa1db600c31d2d04f0504f0412cbbc85ff7e3d/addons/stock_account/models/product.py#L77-L82
Here, the ``products`` variable is referenced before the assignment,
So, it will lead to the above traceback.
sentry-5991310335
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix keeps the work order button column in manufacturing orders sized correctly when start, pause, or stop buttons appear or disappear. Users should see a cleaner, more reliable layout without needing to resize the page to refresh the view.
Original PR description
The column containing the buttons start/pause/stop does not recompute it's size when one of the button appears/disappears, but it does when the column/the page is resized. In this fix, we revert https://github.com/odoo/odoo/pull/169177 which was not relevant anymore and we ensure to recompute the width every time if we're not using the magic column width.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could appear when closing a Point of Sale register after reviewing and deleting draft orders involving combo products. Cashiers can now complete register closing more reliably without terminal tracebacks interrupting the workflow.
Original PR description
A traceback occurs when the user tries to close a register having the draft orders. To reproduce this issue: 1) Open a `furniture register` in the POS 2) Add a `combo product` and close the register…
A traceback occurs when the user tries to close a register having the draft orders.
To reproduce this issue:
1) Open a `furniture register` in the POS
2) Add a `combo product` and close the register
3) Click on Review Orders and delete the existing orders
4) Now click on the `Back` button and repeat steps 2 and 3
5) An error occurred in the terminal
Error:-
```
IndexError: list index out of range
```
In the `_prepare_combo_line_uuids` the `order_vals['lines']` contains multiple lines.
For each line, there are two data possibilities of data.
If line[0] contains 0 or 1, the data should be like `[0, 0, {.......}]`,
if the line[0] doesn't contain 0 or 1 the data should be like `[3, 4]`.
Clearly, it leads to a traceback when the filter is used in `order_vals['lines']`
and tries to access 2nd index through lambda.
https://github.com/odoo/odoo/blob/82867bc13ea2beb50234ad6e23717ad61d047e7c/addons/point_of_sale/models/pos_order.py#L133-L140
Adding an extra check in the filter will resolve this issue.
sentry-5990190061Pivot titles used only in dashboard editing screens will no longer be sent for translation. This reduces unnecessary translation work without changing what end users see in standard dashboards.
Original PR description
In standards dashboards, pivot titles are currently extracted from the json files to be translated. But those titles are not visible in dashboard mode (only in edit mode, in the side panels and menus). The cost of translating those titles is not worth it. .pot files will be re-exported later, when TIC is back. She already warned the translators to skip those translation anyway. Task 4239967 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customers using the restaurant mobile menu will keep the same tracking number after refreshing and returning to pay for an order. This prevents confusion and duplicate order identifiers for orders that were already sent.
Original PR description
Steps to reproduce : ==== 1.Activate mobile menu in restaurant config. 2.Open mobile menu. 3.Make an order up to confirmation page (tracking number is available). 4.Refresh the page 5.Go to My Order and pay again , new tracking number is generated. Issue: ==== - A new tracking number is being generated, even though the order was previously sent and already has an existing tracking number. Fix : ==== - Preventing the creation of a new tracking number if the order already has one. task - 4259426
The analytic distribution model list now relies on Odoo's built-in form-opening button instead of a duplicate custom button. This keeps the interface consistent and avoids redundant controls for users when opening records.
Original PR description
In this commit: https://github.com/odoo/odoo/commit/43027a34a6e51901ff869beec2bba74218b29356 They added a new button to open the form view directly. If the view has an attribute open_form_view to True or being in debug mode. Since we manually added a button to do the exact same thing, let's use the button from the list view. task: 4204366 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a new Link Tracker record no longer triggers an error when required URL details are not yet filled in. This prevents an interruption for users setting up tracked links from Link Tracker or related apps like mass mailing.
Original PR description
After the new `_monkeypatches` of `url_join`/`_check_str_tuple` we're getting TypeError traceback on creating a Link Tracker. Steps ===== Install Link Tracker and an associate module(i.e., mass mailing) Turn on developer mode Open Link Tracker app and try to create a new record Traceback: `TypeError: Cannot mix str and bytes arguments (got (False, 'False'))` Technical: ========== When creating a new we don't have `short_url_host` or `code`, thus its giving False. Also, code was in in `""`, means False , "False", its unnecessary. After this commit: =================== There will be no traceback on creating a Link Tracker. Task-4279725
The payroll accounting test suite for Switzerland was adjusted to match a recent internal payslip validation change. This helps keep automated checks reliable and reduces the risk of payroll-related regressions reaching users.
The balance sheet report now handles companies that have no journals configured instead of showing an error. This prevents users from hitting a traceback when opening financial reports in empty or newly configured databases.
Original PR description
When there are no journals and the user tries to open the balance sheet report, a traceback will appear. Steps to reproduce the error: - Install ``account_reports`` module without demo data - Remove…
When there are no journals and the user tries to open the balance sheet report,
a traceback will appear.
Steps to reproduce the error:
- Install ``account_reports`` module without demo data
- Remove all journals
- Go Reporting > Open Balance sheet
Traceback:
```
StopIteration: null
File "odoo/http.py", line 2364, 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 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, 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 "home/odoo/src/enterprise/18.0/account_reports/models/account_report.py", line 1914, in get_options
initializer(options, previous_options=previous_options)
File "home/odoo/src/enterprise/18.0/account_reports/models/account_report.py", line 379, in _init_options_journals
options['journals'].extend(next(iter(company_journals_map.values())))
```
https://github.com/odoo/enterprise/blob/302eb1052609462fe607f77fcc934690f9abbe5a/account_reports/models/account_report.py#L379
When there are no journals ``company_journals_map`` will be empty,
So, it will lead to the above traceback.
sentry-5993507281This fix ensures Mexican electronic invoices correctly report local tax percentages when they appear on the same invoice line as the standard 16% tax. It helps prevent incorrect CFDI tax data and reduces the risk of rejected or inaccurate invoices.
Original PR description
task_id: 4261885
Users accessing shared projects can now change planned dates on tasks without triggering an error. This keeps collaboration smoother for external or portal users who need to update task schedules.
Original PR description
In project sharing, when the user changes a planned date in task form, a traceback occurs, because the portal user doesn't have the rights on `resource.calendar.attendance`. To solve that, we call the method that get those records with sudo (`_get_tasks_by_resource_calendar_dict`). task-3973305
Spreadsheet side panels now use a consistent bold style for their titles and labels. This fixes a visual inconsistency, making the interface feel more polished and easier to scan for users.
Original PR description
## Description The font weight of this side panel was previously inconsistent with other side panels. This commit ensures that the font weight is now uniform across all side panels. Task: 4194259
A test was added to ensure spreadsheet pivot autocomplete works correctly when using positional pivot arguments in Odoo. This helps prevent a previously fixed issue from returning and supports more reliable spreadsheet behavior for users.
Original PR description
This commit adds a test for a bug fix merged in o-spreadsheet, but the behavior can actually only be triggered in odoo, with positional pivot arguments. Task: 4235329
Rental product pages now update availability information when shoppers switch between product variants. This helps prevent customers from trying to rent a variant that is unavailable without seeing a warning.
This update resolves a bug that prevented the 'Data Merge: Find Duplicate Records' process from correctly identifying duplicate records when a model's company field wasn't directly stored. The fix ensures the system can now accurately match duplicates even when relying on related fields, improving data accuracy.
Original PR description
Steps ----- 1. Create a deduplication rule for a model with a non-stored company field (e.g. Document). Add a field to the deduplication rules. 2. Run the "Data Merge: Find Duplicate Records" scheduled action. ** ValueError: <class 'psycopg2.errors.UndefinedColumn'>: "column documents_document.company_id does not exist ** Change ----- Handle the case where the company field of the model is not stored but still accessible through its related field in another table. opw-4114062 Forward-Port-Of: odoo/enterprise#68816
This update fixes an inconsistency in how query counts are measured for the test_mail module. Previously, a specific setup caused inaccurate results, particularly in single-module builds. This change adds a reliable query counter, addressing a performance issue that has been resolved through an optimization in the ORM.
Original PR description
The query count in single module build is higher than the one with all modules installed. - test_mail_enterprise…
The query count in single module build is higher than the one with all modules installed. - test_mail_enterprise   - test_mail_enterprise + documents_project   In summary, a one2many fields document_ids on document_projects triggers an [orm optimisation](https://github.com/odoo/odoo/pull/111651/files) leading to 10 less queries. In 16.0 the query count adapted in an all-enterprise build fails in single module In 17.0 a regression of performance was missed because a margin is added on a bunch of query count that didn't break in the all-enterprise build This pr proposes to add a field with the corresponding optimization in the test module in stable, to have reliable query counter. This field will be moved to the document module in master. RunbotError-65777 Forward-Port-Of: odoo/enterprise#72598