Friday, October 16, 2020
24 changes · master
Enhancements to existing features
The Contact Us page no longer shows an unclear message related to Google Maps when the map option is not enabled. This makes the page cleaner and avoids confusing visitors or site editors with irrelevant information.
Original PR description
This commit remove the unclear message from the 'Contact Us' page, as it could only appear when the google map option is not enabled. task-2346193
Resolved issues and error corrections
Odoo now only uses a fallback value when a configuration setting is truly missing, not when it is intentionally set to an empty or false-like value. This prevents unexpected substitutions and helps custom modules handle deliberately blank settings more reliably.
Original PR description
Follow docstring of get_param:
The value of the parameter, or ``default`` if it does not exist.
Before this commit, if the parameter contains a falsy value, the default value
was returned.
Now, we only return the default value if it is None, the value returned by
_get_param in case of missing parameters.
Goal:
If you have a ir.config_parameter eg 'module.prefix' that you set to empty,
you should be able to do ICP.get_param('module.prefix') + '/ok' without add
manually add a default value (..., '').Miscellaneous changes
By default, PdfFileReader will monkeypatch the `warnings` module even if it has no reason whatsoever to do so and suppress the `captureWarnings` behavior. This means as soon as we've loaded a PDF file, `warnings.warn` don't trigger `logging` warnings anymore, and become invisible. This can lead to non-deterministic behaviors depending as warnings may or may not be suppressed depending when they occur relative to loading a PDF e.g. load a module which runs a test which loads a PDF befo
Original PR description
By default, PdfFileReader will monkeypatch the `warnings` module even if it has no reason whatsoever to do so and suppress the `captureWarnings` behavior. This means as soon as we've loaded a PDF file, `warnings.warn` don't trigger `logging` warnings anymore, and become invisible. This can lead to non-deterministic behaviors depending as warnings may or may not be suppressed depending when they occur relative to loading a PDF e.g. load a module which runs a test which loads a PDF before a module triggering a warning and the warning won't be visible, other way around it will. Except ofc while we have an override to PdfFileReader it's not used *everywhere*, so need to monkeypatch the init. Forward-Port-Of: odoo/odoo#60002
Pillow 7.0 changed the default resampling filter from NEAREST to BICUBIC. Because the logo parser resizes the image before sampling it and doesn't specify a filter, its behavior changes depending on the version of Pillow, even if the input image is the same. And there's a test depending on its output with a fixed image. Explicitly specify the old default as that's what's in the test. Forward-Port-Of: odoo/odoo#60085
Original PR description
Pillow 7.0 changed the default resampling filter from NEAREST to BICUBIC. Because the logo parser resizes the image before sampling it and doesn't specify a filter, its behavior changes depending on the version of Pillow, even if the input image is the same. And there's a test depending on its output with a fixed image. Explicitly specify the old default as that's what's in the test. Forward-Port-Of: odoo/odoo#60085
Description is line.name but if this field is not defined the tag in the XML should not be set. 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 Forward-Port-Of: odoo/odoo#60092
Original PR description
Description is line.name but if this field is not defined the tag in the XML should not be set. 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 Forward-Port-Of: odoo/odoo#60092
odoo/odoo@dadcec593d83 introduced a duplicate name in the filters of the view `project.view_project_project_filter`. This commit renames the new filter from `my_projects` to `own_projects`. Forward-Port-Of: odoo/odoo#60089
Original PR description
odoo/odoo@dadcec593d83 introduced a duplicate name in the filters of the view `project.view_project_project_filter`. This commit renames the new filter from `my_projects` to `own_projects`. Forward-Port-Of: odoo/odoo#60089
Add handling of reversed payment state (added in odoo/enterprise#7202) in move view, portal templates and sales_team. Forward-Port-Of: odoo/odoo#60100
Original PR description
Add handling of reversed payment state (added in odoo/enterprise#7202) in move view, portal templates and sales_team. Forward-Port-Of: odoo/odoo#60100
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60129 Forward-Port-Of: odoo/odoo#57923
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60129 Forward-Port-Of: odoo/odoo#57923
Before this commit, the close button in enterprise version was primary (green). Now we make it black to avoid to have this button like a CTA, and in the same time, while we have already hacked all this kanban view, we continue changing the active breadcrumb to a nearly black 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-
Original PR description
Before this commit, the close button in enterprise version was primary (green). Now we make it black to avoid to have this button like a CTA, and in the same time, while we have already hacked all this kanban view, we continue changing the active breadcrumb to a nearly black 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 Forward-Port-Of: odoo/odoo#59543
'flags' is not a field in ir.actions.act_window, but it's used to pass parameters to generate the action window. For example, {'flags': {'withControlPanel': False}} can be used to hide the control panel. in _get_readable_fields, 'flags' is not included. This makes the configuration passed by 'flags' not work. We add 'flags' to fix the issue. To reproduce, go to workorder and enter the tablet view by starting the workorder. The control panel will be shown, even though {'flags': {
Original PR description
'flags' is not a field in ir.actions.act_window, but it's used to pass
parameters to generate the action window. For example,
{'flags': {'withControlPanel': False}} can be used to hide the control
panel.
in _get_readable_fields, 'flags' is not included. This makes the
configuration passed by 'flags' not work. We add 'flags' to fix the
issue.
To reproduce, go to workorder and enter the tablet view by starting
the workorder. The control panel will be shown, even though
{'flags': {'withControlPanel': False}} is passed in the returned action.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#59662Steps to reproduce: - Create an automatic promotional program P for Website 2. - Place Order for Website 1. - Promotion is applied. Fixes https://github.com/odoo/odoo/issues/55121 Closes https://github.com/odoo/odoo/pull/57895 X-original-commit: https://github.com/odoo/enterprise/commit/a5a9212278b2c5304f4efd869e67663811d37e8f Forward-Port-Of: https://github.com/odoo/enterprise/pull/13875 Co-authored-by: Romain Derie <rde@odoo.com> Co-authored-by: Swapnesh Shah <swapneshshah111@
Original PR description
Steps to reproduce: - Create an automatic promotional program P for Website 2. - Place Order for Website 1. - Promotion is applied. Fixes https://github.com/odoo/odoo/issues/55121 Closes https://github.com/odoo/odoo/pull/57895 X-original-commit: https://github.com/odoo/enterprise/commit/a5a9212278b2c5304f4efd869e67663811d37e8f Forward-Port-Of: https://github.com/odoo/enterprise/pull/13875 Co-authored-by: Romain Derie <rde@odoo.com> Co-authored-by: Swapnesh Shah <swapneshshah111@gmail.com> Forward-Port-Of: odoo/odoo#59994 Forward-Port-Of: odoo/odoo#59463
Issue - Install 'Accounting' - Go to 'Settings/Accounting' - Try to create new currency Cause The empty tuple of ids raise sql syntax error. Solution Init the currency rate to 0.0 when there are not ids opw-2359632 Forward-Port-Of: odoo/odoo#60096
Original PR description
Issue
- Install 'Accounting'
- Go to 'Settings/Accounting'
- Try to create new currency
Cause
The empty tuple of ids raise sql syntax error.
Solution
Init the currency rate to 0.0 when there are not ids
opw-2359632
Forward-Port-Of: odoo/odoo#60096Behavior before the fix: - When uploading an office 2007 attachment (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text document (in certain browsers, at least). This stems from an over-aggressive check on mime type (anything that contains 'xml' **anywhere** in the mime type is taken to be XML, but the mime type for an Office document is `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
Original PR description
Behavior before the fix: - When uploading an office 2007 attachment (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text…
Behavior before the fix: - When uploading an office 2007 attachment (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text document (in certain browsers, at least). This stems from an over-aggressive check on mime type (anything that contains 'xml' **anywhere** in the mime type is taken to be XML, but the mime type for an Office document is `application/vnd.openxmlformats-officedocument.wordprocessingml.document` so it falls in the XML case. Behavior after the fix: - The mime type is preserved - Mime type for XML-like documents (including HTML and SVG) continues to be validated Note that there will be some conflict to resolve during the fw port, as the logic for filtering the mime type has been moved (without modification) as part of the 14.0 update. Also, for ticket opw-2352712, there will be an associated PR for the EE since the filtering logic was (is) duplicated in the documents module opw-2352712 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#60145 Forward-Port-Of: odoo/odoo#59732
Model `ir.mail_server` already have `active` field but It was not present on View which makes it impossible to Archive record. Now, we add option to archive record through action. 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 Forward-Port-Of: odoo/odoo#58077
Original PR description
Model `ir.mail_server` already have `active` field but It was not present on View which makes it impossible to Archive record. Now, we add option to archive record through action. 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 Forward-Port-Of: odoo/odoo#58077
**Current behavior before PR:** When editing the activity, traceback while processing with buttons "Done & Schedule Next", "Mark as Done" from the form view. This is happening because when we process with these buttons it complete the action of respective buttons and then the trigger will go on the close window. Hence, we don't have activity data as "mark as done" remove the activity. **Desired behavior after PR is merged:** Footer buttons will be processed as expected without an
Original PR description
**Current behavior before PR:** When editing the activity, traceback while processing with buttons "Done & Schedule Next", "Mark as Done" from the form view. This is happening because when we process with these buttons it complete the action of respective buttons and then the trigger will go on the close window. Hence, we don't have activity data as "mark as done" remove the activity. **Desired behavior after PR is merged:** Footer buttons will be processed as expected without any traceback. PR https://github.com/odoo/odoo/pull/59643 Task-2357681 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#59643
- account.edi.document require edi_format_id and move_id because it's its very own reason of existence - account.edi.format require code because it's the way it's identified 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 Forward-Port-Of: odoo/odoo#60155
Original PR description
- account.edi.document require edi_format_id and move_id because it's its very own reason of existence - account.edi.format require code because it's the way it's identified 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 Forward-Port-Of: odoo/odoo#60155
Sometimes, when clicking too fast, some methods were called on a not-fully-initialized colorpalette, which made it crash. task-2312878 Forward-Port-Of: odoo/odoo#60171
Original PR description
Sometimes, when clicking too fast, some methods were called on a not-fully-initialized colorpalette, which made it crash. task-2312878 Forward-Port-Of: odoo/odoo#60171
Before this commit, when a vertical scrollbar appeared in the collapse navbar menu, the horizontal scrollbar also appeared. We added overflow-x hidden on navbar and navbar-collapse for never again display this horizontal scrollbar. task-2312878 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 Forward-Port-Of: odoo/
Original PR description
Before this commit, when a vertical scrollbar appeared in the collapse navbar menu, the horizontal scrollbar also appeared. We added overflow-x hidden on navbar and navbar-collapse for never again display this horizontal scrollbar. task-2312878 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 Forward-Port-Of: odoo/odoo#59999
This fix allows to send an invalid command as a normal message to have it displayed in the messages list. task-id: 2360504 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 Forward-Port-Of: odoo/odoo#60165
Original PR description
This fix allows to send an invalid command as a normal message to have it displayed in the messages list. task-id: 2360504 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 Forward-Port-Of: odoo/odoo#60165
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 Forward-Port-Of: odoo/odoo#58552
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 Forward-Port-Of: odoo/odoo#58552
Behavior before the fix: - When uploading an office 2007 document (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text document (in certain browsers, at least). This stems from an over-aggressive check on mime type (anything that contains 'xml' **anywhere** in the mime type is taken to be XML, but the mime type for an Office document is `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
Original PR description
Behavior before the fix: - When uploading an office 2007 document (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text…
Behavior before the fix: - When uploading an office 2007 document (.xlsx / .docx) as a regular (non admin) user, the preview shows it as text, and the download option by default saves it as a text document (in certain browsers, at least). This stems from an over-aggressive check on mime type (anything that contains 'xml' **anywhere** in the mime type is taken to be XML, but the mime type for an Office document is `application/vnd.openxmlformats-officedocument.wordprocessingml.document` so it falls in the XML case. Behavior after the fix: - The mime type is preserved - Mime type for XML-like documents (including HTML and SVG) continues to be validated Note that PR https://github.com/odoo/odoo/pull/59732 is required to be merged first, to fix the logic in the base attachment class. This commit really only removes the duplication of the logic in the documents module, to let the IrAttachment base class take care of the filtering. The associated unit test (`test_document`) is expected to fail until the related PR is merged. opw-2352712 Forward-Port-Of: odoo/enterprise#14154 Forward-Port-Of: odoo/enterprise#14022
…uments Forward-Port-Of: odoo/enterprise#13978
Original PR description
…uments Forward-Port-Of: odoo/enterprise#13978
Show button to send an attachment to OCR only for in_invoice and in_refund Forward-Port-Of: odoo/enterprise#13982 Forward-Port-Of: odoo/enterprise#13909
Original PR description
Show button to send an attachment to OCR only for in_invoice and in_refund Forward-Port-Of: odoo/enterprise#13982 Forward-Port-Of: odoo/enterprise#13909
Since `ir.actions.act_window` cannot be accessed by normal users any more, a `sudo()` is needed in `import_statement` in order to read the contents of `account_bank_statement_import.action_account_bank_statement_import`. Forward-Port-Of: odoo/enterprise#14126
Original PR description
Since `ir.actions.act_window` cannot be accessed by normal users any more, a `sudo()` is needed in `import_statement` in order to read the contents of `account_bank_statement_import.action_account_bank_statement_import`. Forward-Port-Of: odoo/enterprise#14126