Daily updates from Odoo
Navigate
Branch
Monday, July 31, 2023
12 changes
Enhancements to existing features
This update streamlines how several Odoo Enterprise test suites communicate with backend services during automated checks. It helps keep testing more consistent across Helpdesk, Subscriptions, and Discuss-related areas, reducing maintenance effort without changing customer-facing behavior.
Original PR description
*: helpdesk_mail_plugin, sale_subscription, test_discuss_full_enterprise. community: https://github.com/odoo/odoo/pull/130036
This update renames digitization action buttons across invoice, expense, and recruitment workflows to make them easier to understand. Users will now see clearer labels such as "Digitize document" and "Retry", reducing ambiguity when sending or resending documents for digitization.
Original PR description
The goal of this pr is to improve labeling of digitization button accross Odoo. - "Send For Digitization" become "Digitize document" - "Resend For Digitization" become "retry" task: 3394784
The document sharing portal now gives recipients clearer share details and easier download options. Users can preview supported files from shared workspaces, see share names, expiry dates, file counts and total sizes, and download single files or multiple files as a zip.
Original PR description
In this commit, we have made the following improvements in the share portal. When sharing a workspace - Click on the download icon will download the document. - Click on the title of any documents will preview them. (only for image and pdf) When sharing a Single/Multiple files - Change the UI - Display the share name if specified by the user. - Display the validity date if specified by the user. - Display the total size of the shared file. - Add a button to download the documents(download as a zip if multiple documents). - Display the number of files in the download button. task-3179129
Opening helpdesk tickets is faster on large databases because related ticket and field service task counts are now calculated more efficiently. This reduces waiting time for support teams when viewing tickets, especially in high-volume environments.
Original PR description
## Description In a large database with many `helpdesk.ticket` and `res.partner`, opening the form view of a ticket can take a lot of time. This is due of the smart button that computes and counts…
## Description In a large database with many `helpdesk.ticket` and `res.partner`, opening the form view of a ticket can take a lot of time. This is due of the smart button that computes and counts the number of 'related' tickets that are linked to the partner customer of the current ticket. By specifications, the related tickets should have either: - same email as the current partner - same phone as the current partner - partners children of the current partner's commercial entity ## Analysis - `_compute_partner_ticket_count` can take a bit of time, as first we are forced to loop-over the recordset so we can create a domain, that is dependant on the individual ticket's assigned customer. Therefor said loop cannot be converted to a `read_group`. This domain also is a disjunction (aka ORs) of multiple conditions, that all kinda overlap themselves, as usually phone and emails are unique per partner. This disjunction also prevent the eventual use of indexes, not that there are any currently on `partner_phone` and `partner_email`. - `_compute_fsm_task_count` is taking more time than what it could be, because of a faulty domain. We are currently just checking that `helpdesk_ticket_id` is not empty, but that forces the database to do a full-table scan and filter out the unrelated `project.task`. ## Solution - `_compute_partner_ticket_count`: Since the results of the disjunction has overlapping results, and one of the condition contains all the results from the other 2 conditions, the 2 redundant conditions can be removed. This allows us to add an index on `partner_id` to allow an index scan for fetching the tickets related to said partner. Usage of a narrow pre-fetch on 'stage_id' allows us to remove the context key `prefetch_fields=False`, which was put in place to prevent out-of-memory error in the past, but now can be added back with the new pre-fetcher, without aggressively prefetching many fields that are not used. This slight change helps reducing the number of queries made to the database. - `_compute_fsm_task_count`: Correct the domain to actually look for `id` that are equals to the current tickets `ids`. This allows us to add an index on `helpdesk_ticket_id` to speed up the read_group, especially for the form view, where only 1 ticket is open / the computation is triggered. The index is `btree_not_null` to prevent wasting space, as the majority of `project.task` don't have related `helpdesk.ticket`. ## Results On a database with 150k `helpdesk.ticket` on local machine. I've tested for 100 tasks also, as in the future we may decide to add the count to the list view for example. - timing of `_compute_partner_ticket_count`: | Ticket nb | Before | After | |:----------:|:--------:|:---------:| | 1 ticket | **0.2s** | **0.03s** | | 100 ticket | **12s** | **2.8s** | Gain of between **4x** (for computing 100 tickets) ~ **10x** (for computing a single ticket) - timing of `compute_fsm_task_count` | Ticket nb | Before | After | |:----------:|:---------:|:---------:| | 1 ticket | **50ms** | **6ms** | | 100 ticket | **280ms** | **235ms** | Gain of between **1.2x (20%)** (for computing 100 tickets) ~ **8x** (for computing a single ticket) Note that these numbers are undervalued, as it was tested on a local machine where the database is on the same machine as the web-server. Doesn't take into account network cost or database contention. ## Reference task-3440810
Resolved issues and error corrections
Grouped list views inserted into spreadsheets now use the actual number of list records, not just the number of visible groups. This prevents incomplete spreadsheet inserts and gives users a more accurate default result when exporting grouped data.
Original PR description
…upBy When a list view has a groupBy and is inserted in a spreadsheet, the default number of elements in the inserted list was the number of groups instead of the number of elements in the list. Task: [3422667](https://www.odoo.com/web#id=3422667&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
The Shop Floor no longer crashes when registering production for manufacturing orders involving uniquely serialized products. Users can also add and open components in the manufacturing order flow without errors, with the expected popup shown instead.
Original PR description
Before this commit ================== In Shop floor "Register Production" button throws an error after creating a product with a unique serial number and associated MO. Additionally, adding a component within the MO also triggers an error. Steps to Produce ================= - Create a product with tracking. - Create a MO for that product and confirm it. - Bug 1: Click on "Register Production" button in the shop floor for that MO. - Bug 2: add a component and click on that component in the shop floor for that MO. After this commit ================= With this commit "Register Production" button works smoothly for products with unique serial numbers and their associated MO. Additionally, the issue with adding components within the MO has been resolved and user will get popup.
Features or functions removed from Odoo
An unused internal function related to cash statements was removed from the accounting dashboard code. This cleanup reduces maintenance overhead without changing how users work with the system.
Original PR description
before this commit, the create_cash_statement function defined in the journal model is not called from any where. left over in: 9299f81 after this commit, the function will be removed from code.
Code cleanup and technical improvements
The spreadsheet editing flow now uses the newer dialog experience instead of an older legacy version. This keeps the interface more consistent across Odoo and removes outdated mobile dialog code, with related barcode and mobile sign-in flows adjusted to match.
Original PR description
This commit replaces the legacy dialog by the new one. Part of task-id 3439226
This update removes now-unnecessary refresh code from several Odoo apps after the underlying data model became automatically reactive. Users should see the same behavior, while the system becomes simpler and easier to maintain.
Original PR description
Since the relational model was rewritten (PR 114024), it is now reactive, so it is no longer necessary to use model.notify() to render the view.
This update replaces generic 'none' figure classifications with more meaningful categories across accounting and local reporting areas. The change improves internal consistency and makes report definitions easier to maintain, with little expected impact on day-to-day users.
Original PR description
## Description of the issue/feature this PR addresses The 'none' values in figure_type are redundant since there are other more relevant types. ## Current behavior before PR Everything works fine but a figure_type refactor would be nice. ## Desired behavior after PR is merged 'none' -> more relevant figure_type. *: account_asset, account_intrastat, account_reports, l10n_ar_reports, l10n_au_reports, l10n_be_reports, l10n_co_reports, l10n_de_reports, l10n_ee_reports, l10n_es_real_estates, l10n_es_reports, l10n_lu_reports, l10n_mx_reports, l10n_nl_intrastat, l10n_pe_reports, l10n_se_reports, l10n_us_reports Task ID: 3434197 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Steps to reproduce: 1. make a sale order for a product with no taxes 2. open a PoS session, click on Quotation / Order 3. select the sale order, and validate 4. attempt to close the session This will lead in an error in Fiskaly, that blocks closing of the session. The taxes of order lines should be checked before they are imported in the PoS. opw-3229274 Forward-Port-Of: odoo/enterprise#43559 Forward-Port-Of: odoo/enterprise#40997
Original PR description
Steps to reproduce: 1. make a sale order for a product with no taxes 2. open a PoS session, click on Quotation / Order 3. select the sale order, and validate 4. attempt to close the session This will lead in an error in Fiskaly, that blocks closing of the session. The taxes of order lines should be checked before they are imported in the PoS. opw-3229274 Forward-Port-Of: odoo/enterprise#43559 Forward-Port-Of: odoo/enterprise#40997
when user clicks on call widget in mailing list contacts traceback will appear. steps to produce: 1) install mass_mailing_sms and voip. 2) open one record and add mobile number. 3) click on mobile number. traceback on sentry: ``` IndexError: list index out of range File "odoo/http.py", line 2123, in __call__ response = request._serve_db() File "odoo/http.py", line 1699, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "odoo/service/mode
Original PR description
when user clicks on call widget in mailing list contacts traceback will appear. steps to produce: 1) install mass_mailing_sms and voip. 2) open one record and add mobile number. 3) click on mobile…
when user clicks on call widget in mailing list contacts traceback will appear.
steps to produce:
1) install mass_mailing_sms and voip.
2) open one record and add mobile number.
3) click on mobile number.
traceback on sentry:
```
IndexError: list index out of range
File "odoo/http.py", line 2123, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1927, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 457, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "odoo/api.py", line 430, in _call_kw_model
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.3/voip/models/voip_phonecall.py", line 299, in create_from_phone_widget
partner_field_name = [k for k, v in fields if v.type == 'many2one' and v.comodel_name == 'res.partner'][0]
```
https://github.com/odoo/enterprise/blob/22992c1226268111ebf66f39214d8e15d0ede2e3/voip/models/voip_phonecall.py#L322 In the mailing.contact model, there is no field of type many2one with a comodel name of res.partner. As a result, the partner_field_name returns an empty list, and attempting to access the 0th element of an empty list is not possible.
sentry-4306579710
Forward-Port-Of: odoo/enterprise#44321