Daily updates from Odoo
Thursday, August 11, 2022
8 changes · master
Enhancements to existing features
This update removes unnecessary repeat checks after records are found, reducing extra database work. Users may see slightly faster responses in affected areas such as accounting, appointments, helpdesk, field service, and social integrations, with no expected change in behavior.
Original PR description
Making a `exists()` on a record got by a `search()` is useless and lead to a extra useless query. Remove them.
This update improves internal testing by making simulated browser environments share one mock server, closer to how multiple tabs work in real use. It helps ensure tests better reflect real-world behavior and reduces inconsistencies when validating multi-tab scenarios.
Original PR description
*: account_accountant, account_invoice_extract, documents, voip, web_studio. The pyEnv used during tests is based on the mock server to provide server like api. This issue is that when creating multiple environments during tests, a new mock server is created each time. This is not realistic since in a real world scenario, multiple tabs would share a single server. In order to make pyEnv work with multiple tabs tests (e.g. multiple env tests), let's create a single mock server shared between js environment during a test. task-2053917 community: https://github.com/odoo/odoo/pull/97975
This change improves how manufacturing planning finds bill of materials information by caching repeated lookups. It should help planning screens respond more efficiently when working with production data, without changing day-to-day user workflows.
Resolved issues and error corrections
Fixed an issue where the table of contents in Knowledge articles could incorrectly nest a larger heading under a smaller one. This makes article navigation clearer and ensures headings appear at the right level for readers.
Original PR description
When a first section is started with smaller heading, immediately followed by a bigger heading, the bigger heading is displayed under the first smaller one inside toc, which should not be the case. For example, consider the following HTML in an article: ``` <h3>Header 1</h3> <h2>Header 2</h2> ``` The toc for above HTML is being built like: ``` Header 1 ---- Header 2 ``` This is wrong because h2 being bigger than h3, should also be at 0 depth instead of 1. This commit fixes the issue and builds the toc correctly for above mentioned case. taskID-2893657
Code cleanup and technical improvements
The eBay sales integration has been reorganized so barcode checking is separated into its own logic. This does not change business workflows, but it should make the feature easier to maintain and improve safely in the future.
This update reorganizes and cleans internal tests for inventory, manufacturing, quality, and related reporting areas. It helps maintain product reliability by making future development safer and easier, with no expected change for end users.
Miscellaneous changes
#### The issue: Some columns in the account_move_line table might not be all-lowercase (e.g. if they were created using Studio). e.g. "x_studio_DCoLP" Not double-quoting the column names will cause the SQL query to fail at INSERT INTO temp_account_move_line ({all_fields}) with an error that looks like this: psycopg2.errors.UndefinedColumn: column "x_studio_field_dcolp" of relation "temp_account_move_line" does not exist LINE 4: temp_account_move_line (x_studio_field_dcolp ... ####
Original PR description
#### The issue:
Some columns in the account_move_line table might not be all-lowercase
(e.g. if they were created using Studio).
e.g. "x_studio_DCoLP"
Not double-quoting the column names will cause the SQL query to fail at
INSERT INTO temp_account_move_line ({all_fields})
with an error that looks like this:
psycopg2.errors.UndefinedColumn: column "x_studio_field_dcolp" of relation "temp_account_move_line" does not exist
LINE 4: temp_account_move_line (x_studio_field_dcolp ...
#### How to reproduce:
Create a new Studio field on the account_move_line table. Don't edit its
name. Most probably, its internal name will contain uppercase letters.
Install the account_reports_cash_basis module and the US localization.
Go to Reports -> US GAAP -> Profit and Loss.
Switch on the Cash Basis option.
A traceback will appear.
#### The fix:
Double-quote those column names.
opw-2908793
Forward-Port-Of: odoo/enterprise#30309
Forward-Port-Of: odoo/enterprise#30275This will be useful for us in technical support: - Sometimes an exception happens in the cron and we want to quickly know which invoice was being processed. - Sometimes we want to know whether a particular invoice was sent by the cron or manually by the user (using the 'Send now to SII' button). - Sometimes we want to quickly find in the logs where exactly a particular DTE was sent. - Sometimes we want to verify whether a DTE was sent twice, and gather more information to figure
Original PR description
This will be useful for us in technical support: - Sometimes an exception happens in the cron and we want to quickly know which invoice was being processed. - Sometimes we want to know whether a particular invoice was sent by the cron or manually by the user (using the 'Send now to SII' button). - Sometimes we want to quickly find in the logs where exactly a particular DTE was sent. - Sometimes we want to verify whether a DTE was sent twice, and gather more information to figure out how that happened. This log will enable us to easily find out these things and help us to diagnose issues quicker. Forward-Port-Of: odoo/enterprise#30261