Thursday, June 4, 2020
21 changes · master
Security fixes and vulnerability patches
This change restores a website utility that lets pages submit actions securely from JavaScript. It updates content creation, blog tag filtering, and shopping cart changes to use protected POST requests, reducing the risk of unwanted cart changes or unsafe links.
Original PR description
It was deleted in 11.0 as it was not used anymore. Now, it is reintroduce as it is a nice utility function for some external app or fixes. Here, it is use so that /website/add and /website/add/<path> work as a controller POST with a CSRF token. task-2241766 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
List views can now hide a column header when needed, giving teams more control over how information is displayed. This is useful for compact columns such as tags, where a label may add clutter without helping users.
Original PR description
This commit adds the support of nolabel attribute on fields in list view. This attribute can be used to remove the column header. Task: 2269315
Resolved issues and error corrections
This update corrects the wording of an access message shown to users. It makes the message read more naturally without changing how the system works.
Original PR description
Resubmission of https://github.com/odoo/odoo/pull/52206 with my email public, so hopefully CLA check succeeds Change in message grammar/spelling only: BEFORE: Only employee can access this database. Please contact the administrator. AFTER: Only employees can access this database. Please contact the administrator. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
- A custom COA could be passed as parameter. - Merge the invoice setup to the generic suite like it is in master. forwart-port of https://github.com/odoo/odoo/commit/161498cf8a75d62f9a8e1a17c6dc62a142b85acc -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52359 Forward-Port-Of: odoo/odoo#52336
Original PR description
- A custom COA could be passed as parameter. - Merge the invoice setup to the generic suite like it is in master. forwart-port of https://github.com/odoo/odoo/commit/161498cf8a75d62f9a8e1a17c6dc62a142b85acc -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52359 Forward-Port-Of: odoo/odoo#52336
Odoo replaces the previous time range menu with a simpler comparison menu in reporting views. Users can now compare selected date filters with the previous period or previous year, making period-over-period analysis clearer and more consistent.
Original PR description
The present PR aims to replace the "time range menu" component in the control panel by a new component called "comparison menu". The new component purpose is roughly the same: compare a period of…
The present PR aims to replace the "time range menu" component in the control panel by a new component called "comparison menu". The new component purpose is roughly the same: compare a period of data in a reporting view with the previous period or the previous year. Its implementation is a bit simpler: it will only appear if at least one date filter is selected in the search view, and will suggest to compare each selected date option with the previous period or the previous year. Remarks: 1) The date filter options are now ordered a bit differently: the chronological order has been chosen. For example, we would get May 2019/June 2019/Q1 2019/May 2020/June 2020/Q1 2020 instead of June 2020/May 2020/Q1 2020/June 2019/May 2019/Q1 2019 (for simplicity no comparison is done between quarters and months). 2) The key 'timeRanges' in the ir.filters contexts is no more used. We now use the key 'comparison'. Task ID: 2245719 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Julien Mougenot <jum@odoo.com>
The reporting interface now uses a dedicated comparison menu instead of the previous time ranges menu. This makes it easier for users to compare periods consistently across cohort and dashboard views.
Original PR description
A new comparison menu replaces the time ranges menu Task ID: 2245719
A shared date-mocking helper was moved into the common test setup for financial reports. This keeps related tests consistent and easier to maintain, reducing the chance of test-only failures without changing business features.
Original PR description
see: 18d08cc3b48a12c015bd2513cc64ee1166336b5d
https://github.com/odoo/enterprise/commit/7d17dad678361f161c259eddd45d9b5186941bd0 fixed the sign used for cash basis entries in the tax report, but this change had to be reflected on the tax_audit computed on cash basis entries as well. Before that, cash basis entries never were made on sales journals, and their move lines never had a refund-typed invoice_id. So it means those factors, when present on the original invoice, never influenced the audit string computed for cash basis entries. Th
Original PR description
https://github.com/odoo/enterprise/commit/7d17dad678361f161c259eddd45d9b5186941bd0 fixed the sign used for cash basis entries in the tax report, but this change had to be reflected on the tax_audit computed on cash basis entries as well. Before that, cash basis entries never were made on sales journals, and their move lines never had a refund-typed invoice_id. So it means those factors, when present on the original invoice, never influenced the audit string computed for cash basis entries. This was obviously wrong. Forward-Port-Of: odoo/odoo#52244 Forward-Port-Of: odoo/odoo#51856
Courtesy of Federico (fza) Forward-Port-Of: odoo/odoo#52392
Original PR description
Courtesy of Federico (fza) Forward-Port-Of: odoo/odoo#52392
The event registration form is made up of a public widget that instantiates an internal normal widget. All public widget are automatically destroyed when entering in edit mode as well as the widget it created. Therefore, it's main element is removed from the DOM when the widget is destroyed. Here, we're detaching the main element from the internal widget before the widget is destroyed so that we avoid to destroy his main element from the DOM when entering in edit mode. task-2210733 -
Original PR description
The event registration form is made up of a public widget that instantiates an internal normal widget. All public widget are automatically destroyed when entering in edit mode as well as the widget it created. Therefore, it's main element is removed from the DOM when the widget is destroyed. Here, we're detaching the main element from the internal widget before the widget is destroyed so that we avoid to destroy his main element from the DOM when entering in edit mode. task-2210733 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#48215
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#52361 Forward-Port-Of: odoo/odoo#52342
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#52361 Forward-Port-Of: odoo/odoo#52342
This method has been lost during the forward-port of: https://github.com/odoo/odoo/commit/161498cf8a75d62f9a8e1a17c6dc62a142b85acc -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52412
Original PR description
This method has been lost during the forward-port of: https://github.com/odoo/odoo/commit/161498cf8a75d62f9a8e1a17c6dc62a142b85acc -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52412
Issue - Go to unsubsribe sms page where the 'sms_code' is the same in multiple traces - Fill the correct phone number (same one of any related traces) - Click on 'Unsubscribe me' Traceback is raised. Also, if empty phone number, still have successfull message. Cause Multiple traces with same "sms_code" but different "sms_number". The current behavior does not handle multiple traces. Solution - Filter and retrieve the trace with the correct "sms_number". - Add
Original PR description
Issue - Go to unsubsribe sms page where the 'sms_code' is the same in multiple traces - Fill the correct phone number (same one of any related traces) - Click on 'Unsubscribe me' Traceback is raised. Also, if empty phone number, still have successfull message. Cause Multiple traces with same "sms_code" but different "sms_number". The current behavior does not handle multiple traces. Solution - Filter and retrieve the trace with the correct "sms_number". - Add 'required' attribute on phone number input. opw-2264200 Forward-Port-Of: odoo/odoo#52414
Updating country map for Vietnam -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52437
Original PR description
Updating country map for Vietnam -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#52437
- Activate packages - Set a weight on 2 products, e.g. 1 kg and 2 kg - Create a SO with both products, add the shipping method DHL - On the picking, add one product per package; choose package 'Box' - Validate - Open the label that is generated The weight of each package is set as the total weight. This happens because we don't set the weight of each piece, as done in shipment rating: https://github.com/odoo/enterprise/blob/f92b3ed9c76158b75ea5c1ce37ba28aec3ce1624/delivery_dhl/mod
Original PR description
- Activate packages - Set a weight on 2 products, e.g. 1 kg and 2 kg - Create a SO with both products, add the shipping method DHL - On the picking, add one product per package; choose package 'Box' - Validate - Open the label that is generated The weight of each package is set as the total weight. This happens because we don't set the weight of each piece, as done in shipment rating: https://github.com/odoo/enterprise/blob/f92b3ed9c76158b75ea5c1ce37ba28aec3ce1624/delivery_dhl/models/dhl_request.py#L193 We apply the same logic for shipment request. opw-2245894 Forward-Port-Of: odoo/enterprise#10934 Forward-Port-Of: odoo/enterprise#10918
using Tax Cloud, create the invoice from the SO and once the invoice is paid, add a free product on the SO. When the user wants to create the second invoice (in order to make the SO 'fully invoiced') an error message raise. To avoid such situations we prevent the user to add products when using Tax Cloud and promotion program lines with a UserError message. The user should refund all existing invoices for this SO (so that any 'invoiced' line get back to being uninvoiced), then re-iss
Original PR description
using Tax Cloud, create the invoice from the SO and once the invoice is paid, add a free product on the SO. When the user wants to create the second invoice (in order to make the SO 'fully invoiced') an error message raise. To avoid such situations we prevent the user to add products when using Tax Cloud and promotion program lines with a UserError message. The user should refund all existing invoices for this SO (so that any 'invoiced' line get back to being uninvoiced), then re-issue an invoice for the whole order. opw-2261069 Forward-Port-Of: odoo/enterprise#10922 Forward-Port-Of: odoo/enterprise#10841
Forward-Port-Of: odoo/enterprise#10913
Original PR description
Forward-Port-Of: odoo/enterprise#10913
Steps to reproduce the bug: Sign in as a user with no Administration/Settings access rights. Go to Inventory -> Create a return from any completed delivery, Choose "Customer Return" as the carrier -> Save -> Click "Print Return Label" Bug: An access rights error was raised opw:2254046 Forward-Port-Of: odoo/enterprise#10920
Original PR description
Steps to reproduce the bug: Sign in as a user with no Administration/Settings access rights. Go to Inventory -> Create a return from any completed delivery, Choose "Customer Return" as the carrier -> Save -> Click "Print Return Label" Bug: An access rights error was raised opw:2254046 Forward-Port-Of: odoo/enterprise#10920
Issue - Accounting - Create an Invoice and a vendor bill and corresponding payments for each - Accounting > Actions > Reconciliation - Try to remove a line Traceback Cause In this case, `removeProposition` is called before `_performMoveLine` so the default value of `mv_lines_match` (which is an empty array) is not set Solution Add a fallback value OPW-2252602 Forward-Port-Of: odoo/enterprise#10859
Original PR description
Issue - Accounting - Create an Invoice and a vendor bill and corresponding payments for each - Accounting > Actions > Reconciliation - Try to remove a line Traceback Cause In this case, `removeProposition` is called before `_performMoveLine` so the default value of `mv_lines_match` (which is an empty array) is not set Solution Add a fallback value OPW-2252602 Forward-Port-Of: odoo/enterprise#10859
Before that, journals of type 'cash' were not excluded from the tax report SQL query, and caused some line duplications with the join, leading to incorrect amounts. We want to exclude all payments to only consider the invoice in that part of the query, so cash payments as well. We rephrase that here to only include sale and purchase journals (so that reconciling an invoice wil a misc entry instead of a payment will work as well) Forward-Port-Of: odoo/enterprise#10881 Forward-Port-Of: odoo/enter
Original PR description
Before that, journals of type 'cash' were not excluded from the tax report SQL query, and caused some line duplications with the join, leading to incorrect amounts. We want to exclude all payments to only consider the invoice in that part of the query, so cash payments as well. We rephrase that here to only include sale and purchase journals (so that reconciling an invoice wil a misc entry instead of a payment will work as well) Forward-Port-Of: odoo/enterprise#10881 Forward-Port-Of: odoo/enterprise#10834
- A custom COA could be passed as parameter. - Merge the invoice setup to the generic suite like it is in master. forwart-port of https://github.com/odoo/enterprise/commit/3dcb3b1cbca072954c74b6cb889ad15b1f57354b Forward-Port-Of: odoo/enterprise#10915 Forward-Port-Of: odoo/enterprise#10908
Original PR description
- A custom COA could be passed as parameter. - Merge the invoice setup to the generic suite like it is in master. forwart-port of https://github.com/odoo/enterprise/commit/3dcb3b1cbca072954c74b6cb889ad15b1f57354b Forward-Port-Of: odoo/enterprise#10915 Forward-Port-Of: odoo/enterprise#10908