This is with Odoo 10 and the standard datetimepicker loader.
I have a field, in my opinion, that has a "start event" datetime. I would like the date picker to show that it works at intervals of 5 minutes ( minuteStepping: 5
), and to show the timing along with the date selection ( sideBySide: true
).
I have confirmed that this works the way I want by addons/web/static/src/js/widgets/date_picker.js
manually editing .
However, I would prefer to simply specify two parameters that I want to change as a parameter in the definition <field ..>
below my tag <form>
in the XML representation. The source widget accepts a parameter options
in its method init
, which it extends to eventually get the final options object, but I was not able to insert my configuration parameters into this object.
I tried to give it how <field ... options="{...}"
and how .. t-field-options='..'
, but I assume that the latter will not work, since I am not in the qweb context in my opinion, and the first is not readable widgets.
Is there any way to do this without creating a new widget? (and hopefully without subclassing or extending the existing widget, but instead save it as an option with a clean configuration)?
source
share