3
0
Fork 0

[IMP][web_action_conditionable] readme

8.0
Holger Brunn 2019-02-27 16:41:13 +01:00
parent 88eb558100
commit 306cf16adf
1 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,7 @@
This module was written to extend the functionality of actions in tree views.
Odoo by default support:
This module was written to allow developers to fine tune available actions in
form and tree views.
Odoo by default supports:
::
@ -11,10 +13,19 @@ with this module you can do:
<tree delete="state=='draft'">
you can use `_group_refs` to make a condition based on the user's groups:
Further, you can use `_group_refs` to make a condition based on the user's
groups:
::
<tree delete="'base.group_user' in _group_refs">
<form delete="'base.group_user' in _group_refs">
It works in any tree view, so you can use it in One2many.
You also have access to ``_context`` for the current context. This way, you can
for example craft actions that pass a context key which decides if some of the
action buttons are shown.
Note that for tree views, this will not work on a per record base, and the
values you have access to are the values of the form the x2many field is in.
You do however have access to ``_context`` and ``_group_refs`` in for the
actions of standalone tree views.