Daily updates from Odoo
Navigate
Branch
Thursday, May 24, 2018
10 changes
Security fixes and vulnerability patches
Password handling from the separate authentication encryption module is now built into the core base system. This improves protection for stored user passwords while keeping compatibility for existing setups and administrative password updates.
Original PR description
https://www.odoo.com/web#id=34211&view_type=form&model=project.task&action=333&active_id=133&menu_id=4720
Enhancements to existing features
The HR attendance kiosk now makes a regular background check to keep its session active. This helps prevent kiosk sessions from closing after seven days, reducing interruptions for employees checking in or out.
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 update improves how inventory barcode workflows support manufacturing work orders. It helps teams process shop floor activities more smoothly and reduces friction when tracking production operations through barcode scanning.
Exports now process external reference identifiers at the end in larger batches instead of repeatedly during each export step. This reduces export time especially for records with related fields, improving performance for large data exports without changing the exported data.
Original PR description
#22493 added significant batching to the generation & fetching of XIDs, but because _export_rows is recursive it really only did so for the toplevel XIDs (and to a lower extent for o2m/m2m fields),…
#22493 added significant batching to the generation & fetching of XIDs, but because _export_rows is recursive it really only did so for the toplevel XIDs (and to a lower extent for o2m/m2m fields), and e.g. m2o xids are *significantly* slower than exporting a simple field: on my machine, exporting one field of 10000 records before this PR,
## Integer field
4113226 function calls (3683145 primitive calls) in 4.866 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|--------------:|--------:|--------:|--------:|--------:|------------------------------------|
| 1 | 0.080 | 0.080 | 4.866 | 4.866 | models.py:692(_export_rows) |
| 70010/10010 | 0.120 | 0.000 | 2.999 | 0.000 | models.py:4699(\_\_getitem\_\_) |
| 70000/10000 | 0.198 | 0.000 | 2.979 | 0.000 | fields.py:949(\_\_get\_\_) |
| 10 | 0.003 | 0.000 | 2.836 | 0.284 | fields.py:1038(determine_value) |
| 10 | 0.000 | 0.000 | 2.833 | 0.283 | models.py:2619(_prefetch_field) |
| 10 | 0.138 | 0.014 | 2.828 | 0.283 | models.py:2568(read) |
| 1 | 0.003 | 0.003 | 1.345 | 1.345 | models.py:621(__ensure_xml_id) |
| 10 | 0.049 | 0.005 | 1.342 | 0.134 | models.py:2671(_read_from_database)|
| 230040 | 0.317 | 0.000 | 0.954 | 0.000 | fields.py:2551(\_\_get\_\_) |
| 10000 | 0.091 | 0.000 | 0.666 | 0.000 | _collections_abc.py:824(update) |
## M2O field (same m2o for all records)
5463322 function calls (4973238 primitive calls) in 9.825 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|------------:|--------:|--------:|--------:|--------:|------------------------------------------------------------|
| 10001/1 | 0.349 | 0.000 | 9.827 | 9.827 | models.py:692(_export_rows) |
| 10001 | 0.159 | 0.000 | 5.337 | 0.001 | models.py:621(__ensure_xml_id) |
| 70010/10010 | 0.128 | 0.000 | 3.485 | 0.000 | models.py:4699(\_\_getitem\_\_) |
| 70000/10000 | 0.214 | 0.000 | 3.457 | 0.000 | fields.py:949(\_\_get\_\_) |
| 20020 | 0.041 | 0.000 | 3.151 | 0.000 | sql_db.py:149(wrapper) |
| 10 | 0.004 | 0.000 | 3.137 | 0.314 | fields.py:1038(determine_value) |
| 10 | 0.001 | 0.000 | 3.133 | 0.313 | models.py:2619(_prefetch_field) |
| 10 | 0.143 | 0.014 | 3.127 | 0.313 | models.py:2568(read) |
| 10013 | 0.046 | 0.000 | 3.093 | 0.000 | sql_db.py:221(execute) |
| 10013 | 2.698 | 0.000 | 3.042 | 0.000 | {method 'execute' of 'psycopg2.extensions.cursor' objects} |
## M2O field (different m2o for all records)
6333236 function calls (5793157 primitive calls) in 17.154 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|------------:|--------:|--------:|--------:|--------:|--------------------------------------------------------------|
| 10001/1 | 0.443 | 0.000 | 17.157 | 17.157 | models.py:692(_export_rows) |
| 10001 | 0.482 | 0.000 | 11.713 | 0.001 | models.py:621(__ensure_xml_id) |
| 10001 | 4.152 | 0.000 | 4.207 | 0.000 | {method 'copy_from' of 'psycopg2.extensions.cursor' objects} |
| 70010/10010 | 0.186 | 0.000 | 4.184 | 0.000 | models.py:4699(\_\_getitem\_\_) |
| 70000/10000 | 0.250 | 0.000 | 4.134 | 0.000 | fields.py:949(\_\_get\_\_) |
| 30019 | 0.074 | 0.000 | 4.017 | 0.000 | sql_db.py:149(wrapper) |
| 10013 | 0.059 | 0.000 | 3.907 | 0.000 | sql_db.py:221(execute) |
| 10013 | 3.442 | 0.000 | 3.843 | 0.000 | {method 'execute' of 'psycopg2.extensions.cursor' objects} |
| 10 | 0.004 | 0.000 | 3.779 | 0.378 | fields.py:1038(determine_value) |
| 10 | 0.001 | 0.000 | 3.775 | 0.377 | models.py:2619(_prefetch_field) |
# Fix
By replacing the xid insertion by a placeholder then collecting the placeholders & batching their conversion to xids, the impact of relational XID exports can be *significantly* lessened, using the same benches post-PR:
## Integer
4183240 function calls (3733159 primitive calls) in 4.898 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|------------:|--------:|--------:|--------:|--------:|-------------------------------------|
| 1 | 0.120 | 0.120 | 4.898 | 4.898 | models.py:692(_export_rows) |
| 70010/10010 | 0.123 | 0.000 | 3.069 | 0.000 | models.py:4711(\_\_getitem\_\_) |
| 70000/10000 | 0.192 | 0.000 | 3.048 | 0.000 | fields.py:949(\_\_get\_\_) |
| 10 | 0.004 | 0.000 | 2.910 | 0.291 | fields.py:1038(determine_value) |
| 10 | 0.001 | 0.000 | 2.906 | 0.291 | models.py:2631(_prefetch_field) |
| 10 | 0.136 | 0.014 | 2.901 | 0.290 | models.py:2580(read) |
| 10 | 0.049 | 0.005 | 1.399 | 0.140 | models.py:2683(_read_from_database) |
| 1 | 0.002 | 0.002 | 1.342 | 1.342 | models.py:621(\_\_ensure_xml_id) |
| 250040 | 0.339 | 0.000 | 1.054 | 0.000 | fields.py:2551(\_\_get\_\_) |
| 10000 | 0.089 | 0.000 | 0.788 | 0.000 | _collections_abc.py:824(update) |
## M2O field (same m2o for all records)
4573449 function calls (4093360 primitive calls) in 5.530 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|------------:|--------:|--------:|--------:|--------:|--------------------------------------------------------------|
| 10001/1 | 0.319 | 0.000 | 5.530 | 5.530 | models.py:692(_export_rows) |
| 70010/10010 | 0.124 | 0.000 | 3.261 | 0.000 | models.py:4711(\_\_getitem\_\_) |
| 70000/10000 | 0.192 | 0.000 | 3.238 | 0.000 | fields.py:949(\_\_get\_\_) |
| 10 | 0.004 | 0.000 | 2.991 | 0.299 | fields.py:1038(determine_value) |
| 10 | 0.001 | 0.000 | 2.988 | 0.299 | models.py:2631(_prefetch_field) |
| 10 | 0.141 | 0.014 | 2.983 | 0.298 | models.py:2580(read) |
| 2 | 0.006 | 0.003 | 1.511 | 0.755 | models.py:621(\_\_ensure_xml_id) |
| 10 | 0.056 | 0.006 | 1.342 | 0.134 | models.py:2683(_read_from_database) |
| 270048 | 0.363 | 0.000 | 1.126 | 0.000 | fields.py:2551(\_\_get\_\_) |
| 2 | 0.744 | 0.372 | 0.744 | 0.372 | {method 'copy_from' of 'psycopg2.extensions.cursor' objects} |
## M2O field (different m2o for all records)
5463361 function calls (4903280 primitive calls) in 7.163 seconds
| ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
|------------:|--------:|--------:|--------:|--------:|--------------------------------------------------------------|
| 10001/1 | 0.350 | 0.000 | 7.163 | 7.163 | models.py:692(_export_rows) |
| 70010/10010 | 0.125 | 0.000 | 3.336 | 0.000 | models.py:4711(\_\_getitem\_\_) |
| 70000/10000 | 0.195 | 0.000 | 3.312 | 0.000 | fields.py:949(\_\_get\_\_) |
| 10 | 0.003 | 0.000 | 3.057 | 0.306 | fields.py:1038(determine_value) |
| 10 | 0.001 | 0.000 | 3.054 | 0.305 | models.py:2631(_prefetch_field) |
| 10 | 0.141 | 0.014 | 3.048 | 0.305 | models.py:2580(read) |
| 2 | 0.007 | 0.004 | 2.884 | 1.442 | models.py:621(\_\_ensure_xml_id) |
| 350040 | 0.478 | 0.000 | 1.488 | 0.000 | fields.py:2551(\_\_get\_\_) |
| 10 | 0.057 | 0.006 | 1.397 | 0.140 | models.py:2683(_read_from_database) |
| 2 | 1.260 | 0.630 | 1.260 | 0.630 | {method 'copy_from' of 'psycopg2.extensions.cursor' objects} |Website editors can now delete a page directly from its page properties dialog. This saves time by removing the need to open the page manager and search for the page before deleting it.
Original PR description
With this commit, it is now possible to delete a page directly from it's page properties dialog. Before this commit, you had to go into the page manager and then find your page that could take some time. task-1850578 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
Resolved issues and error corrections
This fixes the spacing of link-style buttons in web forms after a stylesheet migration changed how they were displayed. It prevents adjacent buttons from appearing cramped while keeping their alignment with surrounding text.
Original PR description
Due to the change from less to scss, changes were made. Especially, the class oe_link is now 'deprecated' and interpreted as 'btn-link'. The previous style defined on the latter removed the padding which breaks the style when several buttons follow each other. This commit commit should fix the style while maintaining the intended behaviour, a vertical alignement between the button and the text inside the pane. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Scheduling an activity now consistently pre-fills the Activity Type field instead of leaving it blank in some cases. This reduces confusion for users and helps ensure tasks and follow-ups are created with the expected information.
Original PR description
Impacted version : master, 11 Description of the issue/feature this PR addresses: -> Got to Project/task -> Select an task without previous activity -> Click on schedule activity -> the `Activity Type` field is empty  Current behavior before PR: In some case the `Activity Type` field is empty (no default value) Desired behavior after PR is merged: Always an default value in `Activity Type` field OPW: 800465 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Payments now show the invoices they are actually reconciled with, making payment records clearer and more reliable for users. This preserves the internal payment data needed for accounting processes while improving what is displayed in the interface.
Original PR description
Fixes https://github.com/odoo/odoo/issues/20804 Task: https://www.odoo.com/web#id=1819501&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720 For this, we keep the invoice_ids field of payment as a technical field (we need it when creating payments, especially for the writeoffs), and use a new computed field to get the reconciled invoices and compute the has_invoices field.
This change updates an internal test so it matches recent accounting setup behavior. It helps keep automated checks reliable and prevents false failures during development, with no direct change for everyday users.
Original PR description
Since commit https://github.com/odoo/odoo/commit/92bd95f2a0a8de11904f26c141c10cb4eccf54e7#diff-a5c55a8833f26a5d157c1b9bf44c0b03L3 wizard.multi.charts.accounts now uses a code prefix for the transfer account. This test was using the old api and a ref to a now removed xmlid, this reference has been replaced by the previously defined value (in the xml data)
Code cleanup and technical improvements
This change improves how Odoo prepares record names shown in relationship fields across views. It reuses already available data when possible and avoids loading unnecessary information, which can make common screens more responsive.
Original PR description
name_get method is a critical one to performance issues since that is used in all views for m2* fields. Then avoid get all fields if the view just is showing one field. But if previously the cache is prefetch was filled then re-use it if not then don't read all other fields. Avoid access to `if name in self._fields: self._fields[name]` 2 times Better use `field_name = self._fields.get(name) if field_name` used just one time.