Sébastien Theys
f241441433
[IMP] web: add control + create tags to customize "add a line"
...
The default "add a line" button creates a new line with the default values from the model. Sometimes we want to create a new line with different default values (or more generally a customized context), which is possible with this commit. Moreover it is possible to create multiple buttons for multiple default values/contexts.
This works both for in-line creation ("editable=") and dialog creation.
The new tags are:
<control> defines custom controls for the current view.
Does not support any attribute, but can have children:
<create> adds a button to create a new element on the current list.
This makes sense when the parent tree view is inside a One2many field.
If any create is defined, it will overwrite the default "add a line" button.
For more information and example, have a look at the Views documentation.
Technically, the commit will:
- parse the new XML tags (+ add appropriate validation)
- display the buttons based on the XML
- on button click/keyboard: pull up the additional context information from the button event up to the default_get
- add unit tests
- add documentation
PR #25209
2018-07-17 11:50:35 +02:00
..
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-06-04 18:06:44 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-05-29 17:34:43 +02:00
2018-04-09 09:26:59 +02:00
2018-06-07 11:43:07 +02:00
2018-04-09 09:26:59 +02:00
2018-04-09 09:26:59 +02:00
2018-04-09 09:26:59 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-06-01 02:39:45 +02:00
2018-05-23 15:43:39 +02:00
2018-05-29 17:34:43 +02:00
2018-06-22 21:22:21 +02:00
2018-06-22 21:22:21 +02:00
2018-05-01 02:39:26 +02:00
2018-07-11 09:04:53 +02:00
2018-05-23 15:43:39 +02:00
2018-06-01 02:39:45 +02:00
2018-05-23 15:43:39 +02:00
2018-06-22 21:22:21 +02:00
2018-05-23 15:43:39 +02:00
2018-06-13 10:24:14 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-29 17:34:43 +02:00
2018-05-29 17:34:43 +02:00
2018-06-07 11:43:07 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-29 17:34:43 +02:00
2018-05-23 15:43:39 +02:00
2018-05-29 17:34:43 +02:00
2018-05-23 15:43:39 +02:00
2018-04-01 02:39:07 +02:00
2018-05-23 15:43:39 +02:00
2018-06-05 16:27:49 +02:00
2018-05-18 18:53:56 +02:00
2018-06-22 21:22:21 +02:00
2018-05-02 19:36:16 +02:00
2018-07-12 13:58:45 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-06-22 18:32:49 +02:00
2018-07-11 09:04:53 +02:00
2018-06-22 18:32:49 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-07-08 00:26:19 +02:00
2018-05-23 15:43:39 +02:00
2018-06-15 13:27:27 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-06-01 02:39:45 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-05-23 15:43:39 +02:00
2018-06-07 11:43:07 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 17:39:48 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 13:18:54 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-17 11:47:47 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-05 20:11:59 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 12:25:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-17 11:50:35 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 13:06:00 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-12 13:58:45 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 11:44:32 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 12:34:20 +02:00
2018-05-01 02:39:26 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 13:18:54 +02:00
2018-07-16 13:18:54 +02:00
2018-07-13 17:12:07 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-16 13:18:54 +02:00
2018-07-11 10:16:33 +02:00
2018-07-12 13:58:45 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00
2018-07-11 10:16:33 +02:00