Friday, March 19, 2021
3 changes · master
Enhancements to existing features
This update simplifies how Odoo opens internal files by removing outdated options and old zip-module support. It also adds controls to limit which file types can be opened, reducing the risk of exposing unintended addon files.
Original PR description
- Remove legacy arguments (`subdir`, `pathinfo`) of `file_open()`, they were not used anymore and made the code more complicated - Add the possibility to filter allowed file extensions, in order to avoid opening up access to arbitrary addons files, such as .py files, depending on the context of use - Drop the long-deprecated support for files inside zip archives, considering that zipped modules were discontinued a long time ago: 278ed718e9805edf088642ba10d3b7c4e5716c31 - Remove the redundant `_file_open()` method, that should never have been called directly anyway - Split up the verification of the file path, to make it accessible without actually opening the file, as a separate `file_path()` function. ------- ### TODO - [x] update the tests
Users can now find an Add Custom Field option directly in the optional columns menu of list views. This makes Odoo Studio easier to discover and lets administrators install or open Studio from the same workflow when they want to customize lists.
Original PR description
This PR aims to add a button which opens studio from the optional column dropdown menu. The goal is to let the user now he can add custom fields to a listview with Odoo Studio, and to promote Odoo Studio when not installed. If studio is not yet installed, this button opens a dialog which promotes studio with the studio youtube video. System admin can choose to install studio directly by clicking the Install Studio button. By clicking on this button, studio will be installed, a value will be set in the localStorage and the page will be reloaded. The purpose of the value set in the localStorage is to open the page in studio mode directly after page reload and to mimify the user experience described here after. When Studio is installed, the buttons only toggle studio mode as the systray button do. PR community : odoo/odoo#66979 task-2392303
Resolved issues and error corrections
This fixes an issue where Odoo could use the wrong active company in web views for users with access to multiple companies. It helps ensure multi-company users see and work with data under the correct company, and adds safeguards to prevent the issue from returning.
Original PR description
This commit fix a bug introduced in #66551 where a mismatch has been done between session.user_context.allowed_company_ids and session.user_companies.allowed_companies. This commit also adds the following tests: - a JS test in order to prevent future unwanted issues regarding multi company in BasicModel. - a Python test in order to ensure that session_info['user_companies'] is not involuntarily changed. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr