Friday, March 19, 2021
14 changes · master
Enhancements to existing features
This update lets Odoo better decide when to show the optional column dropdown in list views. It gives implementers more control over the interface, helping keep screens cleaner and more relevant for users.
Original PR description
This commit aims to allow ones to customize the condition whether the optional column dropdown should be rendered or not. PR enterprise : odoo/enterprise#15205 task-2392303 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 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
Miscellaneous changes
The current rules would allow through a selector of the form :not(sel1, sel2) then because the matcher thing just splits on `,` it would store the incorrect sections :not sel1( and sel2) as separate selectors in the rules cache, raising an exception when matching against elements. Move all the rules to a single regex, and add a rule to exclude any situation where a comma or an open parenthesis is inside of an open parenthesis pair. Although maybe this shou
Original PR description
The current rules would allow through a selector of the form :not(sel1, sel2) then because the matcher thing just splits on `,` it would store the incorrect sections :not sel1( and sel2) as separate…
The current rules would allow through a selector of the form
:not(sel1, sel2)
then because the matcher thing just splits on `,` it would store the
incorrect sections
:not sel1(
and
sel2)
as separate selectors in the rules cache, raising an exception when
matching against elements.
Move all the rules to a single regex, and add a rule to exclude any
situation where a comma or an open parenthesis is inside of an open
parenthesis pair.
Although maybe this should straight up just exclude any rule containing a pseudo-class and pseudo-element? There's no real explanation and it's all part of a big commit, but it tries to exclude all pseudo-elements (::) except it only excludes *some* of the legacy ones (:before and :after, but not :first-letter) and the pseudo-class exclusion also seems somewhat arbitrary e.g. why :active but not :focus?
Is the intent there to exclude rules which can never match because they're "live" rules? (in that case the exclusion I add is not really correct, but that means this thing needs a much more advanced rules parsing in order to handle the case of a multi-parameter `:not`).
Forward-Port-Of: odoo/odoo#68050This fix ensures that more view processing errors include helpful location details, making it easier for teams to find and correct problems in source files. It reduces investigation time when view-related issues occur during development or upgrades.
Original PR description
A context is attached to the ValidationError object when elements in the view arch are broken. This context helps to locate the error in the source file. When the view processing fails outside of the arch evaluation, such context is missing. 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
Current behavior before PR: mail notification not sent when using the full composer. Desired behavior after PR is merged: mail notification will send when using the full composer. LINKS: Task-2446855 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67581 Forward-Port-Of: odoo/odoo#66421
Original PR description
Current behavior before PR: mail notification not sent when using the full composer. Desired behavior after PR is merged: mail notification will send when using the full composer. LINKS: Task-2446855 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67581 Forward-Port-Of: odoo/odoo#66421
Forward-Port-Of: odoo/odoo#68085
Original PR description
Forward-Port-Of: odoo/odoo#68085
Description of the issue/feature this PR addresses: Before 1721ec1363 and fdc4ef97c9d09, Odoo did work fine when the user had another default schema than 'public'. This commit restores this behaviour by searching for existing objects in the user's current schema, which is the first in the schema search path and the one used when no schema is specified when creating objects. Current behavior before PR: Odoo works only with the `public` postgres schema Desired behavior after PR i
Original PR description
Description of the issue/feature this PR addresses: Before 1721ec1363 and fdc4ef97c9d09, Odoo did work fine when the user had another default schema than 'public'. This commit restores this behaviour by searching for existing objects in the user's current schema, which is the first in the schema search path and the one used when no schema is specified when creating objects. Current behavior before PR: Odoo works only with the `public` postgres schema Desired behavior after PR is merged: Odoo works with any other default schema. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#68119
Issue: In case of MTO on the component tracked by serial of the subcontracted MO, if the picking generated by the MTO is complete before record component on the subcontracted picking, when we record the component, move lines is duplicated, one for the reservation (due to the MTO chained move) and a other only with the quantity done. Then it is painful to register component. Fixes: Don't the call of `_set_qty_producing()` when we click on 'Record Component', the user should it self app
Original PR description
Issue: In case of MTO on the component tracked by serial of the subcontracted MO, if the picking generated by the MTO is complete before record component on the subcontracted picking, when we record the component, move lines is duplicated, one for the reservation (due to the MTO chained move) and a other only with the quantity done. Then it is painful to register component. Fixes: Don't the call of `_set_qty_producing()` when we click on 'Record Component', the user should it self applied the `qty_producing`. Forward-Port-Of: odoo/odoo#66873
Forward-Port-Of: odoo/odoo#68153
Original PR description
Forward-Port-Of: odoo/odoo#68153
We do not want to fail ever if loading the attachment fails. We still log a warning in every case though. Some malformed PDFs lead to seeking the wrong bytes while looking for some parts, raising a ValueError See https://github.com/mstamy2/PyPDF2/issues/183 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67283
Original PR description
We do not want to fail ever if loading the attachment fails. We still log a warning in every case though. Some malformed PDFs lead to seeking the wrong bytes while looking for some parts, raising a ValueError See https://github.com/mstamy2/PyPDF2/issues/183 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67283
This fix's original purpose was: - The fw-bot conflict merge in d8332c57bac5b713d7275d16d6110350c698eedd required a -u in order to be applied. This fix allows fixing the original problem without requiring a -u. But since 52061cf20f2f760df5dbeabaa51c7203d08aa5f7 was merged in the meanwhile this commit also revert some of it in order to keep the original specifications of task-2424177 Forward-Port-Of: odoo/enterprise#17193 Forward-Port-Of: odoo/enterprise#17131
Original PR description
This fix's original purpose was: - The fw-bot conflict merge in d8332c57bac5b713d7275d16d6110350c698eedd required a -u in order to be applied. This fix allows fixing the original problem without requiring a -u. But since 52061cf20f2f760df5dbeabaa51c7203d08aa5f7 was merged in the meanwhile this commit also revert some of it in order to keep the original specifications of task-2424177 Forward-Port-Of: odoo/enterprise#17193 Forward-Port-Of: odoo/enterprise#17131
Steps: - Install Accounting and l10n_multilang - Go to Settings / Translations / Languages - Install Dutch - Go to Accounting / Configuration / Accounting / Chart of Accounts - Edit "101401 Bank" - Name: Click the language button on the right side of the field - Change the Dutch translation - Go to Accounting / Reporting / US GAAP / Cash Flow Statement - From: long ago - To: now - Options: - Include Unposted Entries - Unfold All - Switch the current user's langu
Original PR description
Steps:
- Install Accounting and l10n_multilang
- Go to Settings / Translations / Languages
- Install Dutch
- Go to Accounting / Configuration / Accounting / Chart of Accounts
- Edit "101401 Bank"
- Name: Click the language button on the right side of the field
- Change the Dutch translation
- Go to Accounting / Reporting / US GAAP / Cash Flow Statement
- From: long ago
- To: now
- Options:
- Include Unposted Entries
- Unfold All
- Switch the current user's language to Dutch
Bug:
The name of the "Bank" account is not translated
Explanation:
This report doesn't go through the translation process since it's made
using raw SQL.
This commit uses the translation of the account's name if it exists.
opw:2460618
Forward-Port-Of: odoo/enterprise#17163
Forward-Port-Of: odoo/enterprise#17153