Daily updates from Odoo
Tuesday, June 12, 2018
2 changes
Enhancements to existing features
The stock module now asks the database for only the first matching warehouse instead of retrieving all matches and filtering them later. This reduces unnecessary work and can improve performance in operations that need warehouse information.
Original PR description
- Description of the issue/feature this PR addresses: This PR increase the performance to `get_warehouse` method. Other matter, IMHO this method should be in a `fields.function` with stored like as [commercial_partner_id](https://github.com/odoo/odoo/blob/a5df5e8/openerp/addons/base/res/res_partner.py#L270) Because waste many resources in each invoke. But I added this PR with a small fix. - Current behavior before PR: Return all items from database and filter after by python. - Desired behavior after PR is merged: Return first item from database.
This change adds a cleaner way to prepare information when converting leads into contacts or companies. It helps future CRM customizations handle lead-to-contact conversion more reliably without changing the normal user workflow.
Original PR description
Relaunch https://github.com/odoo/odoo/pull/8899 to master. I think I broke that PR somehow when rebasing.