Friday, May 7, 2021
2 changes · master
Enhancements to existing features
Grouped date columns can now include the actual start and end dates behind each label, making actions like quick create and drag-and-drop more reliable. This prepares forecasting workflows, including CRM lead planning, to place records in the correct time period without relying on ambiguous displayed dates.
Original PR description
### [IMP] `web`: add a range to the display value for date read_group Add a way to get the date range of a group for a date field in the frontend. As long as we are using Babel 2.6.0, it is not reliable to reverse-compute the label to a range with moment.js (and will probably never be, since these are 2 totally different libraries) Task-ID: 2243913 COM-PR: https://github.com/odoo/odoo/pull/69380
Resolved issues and error corrections
Odoo now hides PDF viewer buttons for printing, downloading, and opening files when they do not work properly inside mobile app webviews. This prevents users from seeing options that fail or do not make sense, while keeping other ways to access files available.
Original PR description
Some features of the PDF.js library doesn't work in the webview of the mobile apps. Initially 'window.print' is defined as an empty function in webviews unlike browsers where it is already ready.…
Some features of the PDF.js library doesn't work in the webview of the mobile apps. Initially 'window.print' is defined as an empty function in webviews unlike browsers where it is already ready. After that, PDF.js needs to monkey patch 'window.print' and saves a reference to the original definition, which is not yet fulfilled in by the mobile app (Java part). So the print of PDF.js doesn't work in webviews and end users will need to download the file before printing it. Regarding the Download button, the 'download' attribute is not supported by the webview as you can see in: https://bugs.chromium.org/p/chromium/issues/detail?id=432414 As there's many ways to download a file in Odoo it's not a big deal to simply hide it in PDF.js. Because it's quite complicated to fix this, we decided to hide the features that don't work (Download / Print) or don't make sense (Open file). Task-id: 2200168 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr