diff options
| author | Raphael Collet <rco@openerp.com> | 2012-09-05 11:38:59 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2012-09-05 11:38:59 +0200 |
| commit | b339be14507465c78377abe3ab8d4a376a507986 (patch) | |
| tree | 5a48304f7334de0380be8ff3bccc3fa6cc829467 /addons/web/static/src/xml | |
| parent | 3e9e129dd047145fd4add65e6e1b284da5206263 (diff) | |
| parent | 7b27e55d493147f0b7a9eee426bb6c0456632458 (diff) | |
[MERGE] trunk-access-ui-jam (hide buttons or disable actions to create/edit/delete that are not permitted to user)
bzr revid: rco@openerp.com-20120905093859-oh1udej3kgyghudy
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 28f98a7b4cd..d206c538e1c 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -636,7 +636,7 @@ <t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t> </th> </t> - <th t-if="options.deletable" width="13px"/> + <th t-if="options.deletable" class="oe_list_record_delete" width="13px"/> </tr> </thead> <tfoot> @@ -650,7 +650,7 @@ </tfoot> </table> <div t-name="ListView.buttons" class="oe_list_buttons"> - <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable"> + <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable and widget.is_action_enabled('create')"> <button type="button" class="oe_button oe_list_add oe_highlight"> <t t-esc="widget.options.addable"/> </button> @@ -726,10 +726,12 @@ <div t-name="FormView.buttons" class="oe_form_buttons"> <t t-if="widget.options.action_buttons !== false"> <span class="oe_form_buttons_view"> - <div style="display: inline-block;"> <!-- required for the bounce effect on button --> - <button type="button" class="oe_button oe_form_button_edit" accesskey="E">Edit</button> + <!-- required for the bounce effect on button --> + <div t-if="widget.is_action_enabled('edit')" style="display: inline-block;"> + <button type="button" class="oe_button oe_form_button_edit" accesskey="E">Edit</button> </div> - <button type="button" class="oe_button oe_form_button_create" accesskey="C">Create</button> + <button t-if="widget.is_action_enabled('create')" + type="button" class="oe_button oe_form_button_create" accesskey="C">Create</button> </span> <span class="oe_form_buttons_edit"> <button type="button" class="oe_button oe_form_button_save oe_highlight" accesskey="S">Save</button> |
