summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
AgeCommit message (Collapse)Author
2018-09-07[IMP] web: FieldInteger and FieldFloat can use input of type numbersvs-odoo
This allow the browser/device to handle the experience of handling number in a more native way. FieldInteger and FieldFloat now inherits from NumericField because we want to format it or not dependent of the view (readonly or edit) and the NumericField will manage it. We do that because input type number can't take a value with comma on Chrome (FireFox is more permissive but not perfect because comma is the separator for decimal in this case). Task #1880376
2018-09-07[MERGE] forward port branch saas-11.3 up to 4850fb08385Christophe Simonis
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
2018-08-27[FIX] doc: js mixin inheritanceSylvain LE GAL
Hamster extends Animal, not itself Closes #26595
2018-08-13[IMP] web: float_factor and float_toggle widgetsjem-odoo
This commit provides new js widgets for list, kanban and form views on float field. 1/ 'float_factor' displays the normal float field, but takes a conversion factor as option. The displays value is the normal one multiplied by the factor. You can use the widget like <field name="my_float_field" widget="float_factor" option="{'factor': 2}"/> 2/ 'float_toggle' displays a button (in edit mode) looping on a range of given value at each click. A conversion factor is optional (default will be 1) to display a converted value, but sent to non converted one to the server. You can use the widget like <field name="my_float" widget="float_toggle" option="{'range': [0, 0.5, 1], 'factor': 2}"/> 'range' and 'factor' are put in the options. In simple read mode, the widget display the value as a traditionnal text (like a normal char field). This commit provides tests and documentation for those 2 widgets. Task #39079
2018-06-29[IMP] web: fix default sequence for list with handleSébastien Theys
The sequence had a static default value, but when there is an handle, it's important that new items are added at the top or the bottom of the list. This is a rare case where the defaul_get from the server will be ignored by the view for a certain field. This will work: - both in editable mode (inline) and in dialog mode, - both for X2Many and standalone list.
2018-06-15[MERGE] forward port branch saas-11.3 up to 50860317ccdChristophe Simonis
Note: 1aacc962620982528a3dfc90d2c1dd0027359375 has been ignored and will be forward-ported later
2018-06-15[MERGE] forward port branch saas-11.2 up to b170a753e18Christophe Simonis
2018-06-13[IMP] web: Expose datepicker configuration to view declarationsJairo Llopis
The lower-level widget itself supports passing options to the underlying datepicker library. However this is not exposed to higher-level view declaration. With this patch, one can declare a field in a view such as: ```xml <field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/> ``` That option would land in the widget and disable those weekdays. Documentation has been updated accordingly. Closes #25044.
2018-06-08[IMP] web: add decoration support for all field widgets (#25160)oco-odoo
It is sometimes useful to be able to customize slightly the color of a field depending on some conditions on the current record. For example, imagine that we want to show a VAT number field in green/red, if it was validated or not. To do that, we can add a field with an onchange, and simply add decoration-danger and decoration-success attributes to the field.
2018-05-30[IMP] web: add a badge based widget for selection fieldsSiddarth Gajjar
This commit introduces a new widget to be used for selection-based fields. Valid choices are displayed using rectangular badges and not like the standard list. This widget is valid for selection and many2one fields like selection or radio widgets. Co-authored-by: Siddarth Gajjar <sga@odoo.com> Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-04-19[DOC] web: add documentation on notification systemGéry Debongnie
Also, fix a few errors in the js docstring
2018-04-18[REF] doc: adapt to mention scss instead of lessqsm-odoo
2018-04-05[IMP] web: Allow user to set custom 'create_text' for x2m fieldsDharmraj Jhala
For x2many relational fields(of type kanban), we shoud be able to set custom label for 'Create / Add' button by adding 'create_text' node option on particual field from xml. Right now, 'create_text' is only handled for many2many fields, preventing users to set custom label for one2many fields. This commit allows users to set Create Button label for both m2m and o2m fields.
2018-04-05[FIX] doc: non-module JS autodocumentersXavier Morel
Also when there is both a docstring and directive-level content put the docstring first. That seems to match what Sphinx's autodoc does and looks less odd. Possible future improvement: a parameter to suppress the docstring? Possibly a way to reorder the non-docstring content (e.g. members documentation)?
2018-04-05[FIX] doc: non-module JS autodocumentersXavier Morel
Also when there is both a docstring and directive-level content put the docstring first. That seems to match what Sphinx's autodoc does and looks less odd. Possible future improvement: a parameter to suppress the docstring? Possibly a way to reorder the non-docstring content (e.g. members documentation)?
2018-04-05[DOC] doc: update/add documentation on js frameworkGéry Debongnie
The state of the JS documentation was quite sad, not updated in a long time. With this commit, we rework a lot of the JS doc. Most notably, we add a section 'Javascript Cheatsheet' (help on some common customization tasks) and rewrite the 'Javascript Reference' totally. Note that the JS reference page also contains a reference on all field widgets. This work is just the beginning, it is probably not complete, but at least we will have a foundation.
2018-03-30[DOC] doc: update/add documentation on js frameworkGéry Debongnie
The state of the JS documentation was quite sad, not updated in a long time. With this commit, we rework a lot of the JS doc. Most notably, we add a section 'Javascript Cheatsheet' (help on some common customization tasks) and rewrite the 'Javascript Reference' totally. Note that the JS reference page also contains a reference on all field widgets. This work is just the beginning, it is probably not complete, but at least we will have a foundation.