diff options
| author | Simon Lejeune <sle@openerp.com> | 2017-05-24 16:14:32 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-05-30 13:04:06 +0200 |
| commit | a0c16e9cd2fc37dc5962daa0311c85add76535b3 (patch) | |
| tree | 29de1ecaef7583a18248fb48469a046db97f6ab8 /doc/reference | |
| parent | 2742722d3634170ed060cbf5e8371bfaeb86c0e0 (diff) | |
[ADD] web: special = save on form buttons
Add support for value 'save' to attribute 'special' for buttons in
form view. This is useful for form views in dialogs. When clicked,
it saves the form view and closes the dialog (the default 'Save'
button doesn't close the dialog). Without this, the only way to
achieve that was to define a dummy python method and call it with
<button type="object" name="dummy_method"/>.
Diffstat (limited to 'doc/reference')
| -rw-r--r-- | doc/reference/views.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 4dedb51b95c..ce931aad417 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -350,7 +350,13 @@ system. Available semantic components are: ``button`` call into the Odoo system, similar to :ref:`list view buttons - <reference/views/list/button>` + <reference/views/list/button>`. In addition, the following attribute can be + specified: + + ``special`` + for form views opened in dialogs: ``save`` to save the record and close the + dialog, ``cancel`` to close the dialog without saving. + ``field`` renders (and allow edition of, possibly) a single field of the current record. Possible attributes are: |
