Daily updates from Odoo
Thursday, October 17, 2019
4 changes
Enhancements to existing features
This change separates timesheets from project-only work so employees can record time more flexibly, including against analytic accounts. It also reorganizes how timesheet billing connects to sales and projects, laying groundwork for future time-selling features without changing the current user experience.
Original PR description
https://www.odoo.com/web?debug#id=1923949&action=333&active_id=965&model=project.task&view_type=form&menu_id=4720
Users configuring file upload fields can now restrict the types of files that appear in the upload picker, such as images, PDFs, or specific extensions. This improves data quality and reduces accidental selection of unsupported files across attachment, image, and PDF-related widgets.
Original PR description
Purpose ======= We want to add an option on the widgets - many2many_binary, - binary, - image This option specifies what file extensions the user can pick from the file input dialog box. Examples…
Purpose
=======
We want to add an option on the widgets
- many2many_binary,
- binary,
- image
This option specifies what file extensions the user can pick from the file input dialog box.
Examples
========
```xml
<field widget="many2many_binary" options="{'accepted_file_extensions': 'image/*'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': 'application/pdf'}"/>
<field widget="image" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="image"/> <!-- default value is "image/*" -->
<field widget="binary" options="{'accepted_file_extensions': '.pdf,.svg'}"/>
```
How
===
Add an option (accepted_file_extensions) in the template ``HiddenInputFile`` (the widget many2many_binary is using this template)
So, we can also use this new option in others widgets using ``HiddenInputFile``
In the many2many_binary, read the ``nodeOptions`` and set the widget attribute ``accepted_file_extensions``
We also have to fix some other widget, because an property ``image_only`` was already existing in the template ``HiddenInputFile``
(we just need to replace ``image_only=True`` to ``accepted_file_extensions='image/*'``
The widget ``FieldPdfViewer`` (pdf_viewer) now use the new option to filtrate PDF
(instead of removing the <input/> and adding <input accept='.pdf'/>).
Tests
=====
We also test if the option is correctly set on the <input/>
- binary
- image
- many2many_binary
Impacted widgets
===============
- many2many_binary
- image: this widget use ``options="{accepted_file_extensions='image/*'}"`` instead of ``image_only=True``
- tablet_image: same as ``image``
Task #2082815This update improves the form view experience for base automation, making automation configuration clearer or easier to use. The change is likely a small usability improvement for teams managing automated actions in Odoo.
Original PR description
task : https://www.odoo.com/web#id=2082503&action=327&model=project.task&view_type=form&menu_id=4720 Pad link : https://pad.odoo.com/p/r.30015b26b76505fcbdf24f23372a1eb5 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds automated checks for the grid view to confirm that dates, time zones, read-only cells, and displayed grid data behave correctly. It helps reduce the risk of future changes breaking planning or reporting screens that rely on grid layouts.
Original PR description
**Added python test cases to ensure that methods are returning good values to the webclient.** - Tested grid domain for date and datetime. - Tested grid domain for different timezone. - Tested read grid method. - Tested freeze cell (readonly field). Task Link:- https://www.odoo.com/web?#id=1997665&action=327&model=project.task&view_type=form&menu_id=4720 Pad Link:- https://pad.odoo.com/p/r.02d1500158ccde69b7391b43b338172b