jem-odoo
1f72644c44
[IMP] web: float_factor and float_toggle widgets
...
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-08-13 14:33:48 +02:00
..
2018-08-13 12:58:33 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 15:46:06 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 00:28:35 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:43:47 +02:00
2018-08-10 13:37:21 +02:00
2018-08-03 10:55:14 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 07:15:10 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 13:52:41 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:08:47 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 16:08:47 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 14:17:27 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 15:20:37 +02:00
2018-08-10 17:46:08 +02:00
2018-08-03 10:55:14 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 17:46:08 +02:00
2018-07-27 12:36:54 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:30:19 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 15:36:05 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 00:28:35 +02:00
2018-08-05 00:28:35 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 00:28:35 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 00:28:35 +02:00
2018-08-13 14:33:48 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 07:15:10 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-03 14:55:04 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 14:17:40 +02:00
2018-08-10 13:33:28 +02:00
2018-08-13 14:17:27 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-07-24 16:43:26 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 14:37:19 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-07-24 16:43:26 +02:00
2018-08-01 18:02:29 +02:00
2018-08-06 11:57:41 +02:00
2018-07-24 18:10:32 +02:00
2018-08-10 16:06:36 +02:00
2018-07-30 17:02:28 +02:00
2018-07-30 17:02:28 +02:00
2018-08-07 17:11:08 +02:00
2018-08-06 11:57:41 +02:00
2018-07-27 12:36:54 +02:00
2018-08-07 17:11:08 +02:00
2018-08-06 14:47:06 +02:00
2018-07-27 12:36:54 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-07-17 11:50:35 +02:00
2018-08-06 14:37:19 +02:00
2018-07-24 17:33:05 +02:00
2018-08-05 00:28:35 +02:00
2018-08-07 17:11:08 +02:00
2018-08-07 17:11:08 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-07-24 16:43:26 +02:00
2018-07-24 16:43:26 +02:00
2018-08-06 11:57:41 +02:00
2018-07-24 16:43:26 +02:00
2018-08-06 11:57:41 +02:00
2018-08-06 11:57:41 +02:00
2018-08-05 07:15:10 +02:00
2018-08-13 13:48:14 +02:00
2018-08-13 14:17:40 +02:00
2018-08-10 16:11:59 +02:00
2018-08-10 15:36:05 +02:00
2018-08-13 11:34:34 +02:00
2018-08-09 13:30:28 +02:00
2018-08-06 19:59:53 +02:00
2018-08-03 10:55:14 +02:00
2018-08-09 13:30:28 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 15:20:37 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:50:54 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-05 00:28:35 +02:00
2018-08-05 00:28:35 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-03 10:55:14 +02:00
2018-08-13 11:08:03 +02:00
2018-08-10 16:49:29 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:06:36 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 15:20:37 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 14:33:48 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:06:36 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:06:36 +02:00
2018-08-09 19:33:32 +02:00
2018-08-10 16:50:54 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 17:01:41 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 16:30:19 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 18:41:00 +02:00
2018-08-13 12:09:56 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:30:20 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 14:33:03 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 15:36:04 +02:00
2018-08-10 16:49:29 +02:00
2018-08-10 16:49:29 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 14:33:48 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 10:20:08 +02:00
2018-08-03 10:55:14 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:32:50 +02:00
2018-08-13 09:11:53 +02:00
2018-08-12 18:04:27 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 15:46:06 +02:00
2018-08-10 16:32:50 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 15:46:06 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 14:17:40 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-13 10:20:08 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 15:46:06 +02:00
2018-08-10 17:01:41 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-09 15:46:06 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 13:37:21 +02:00
2018-08-10 16:49:29 +02:00
2018-08-10 13:37:21 +02:00