diff --git a/web_action_conditionable/README.rst b/web_action_conditionable/README.rst index ff627e29..959daf32 100644 --- a/web_action_conditionable/README.rst +++ b/web_action_conditionable/README.rst @@ -25,8 +25,10 @@ web_action_conditionable |badge1| |badge2| |badge3| |badge4| |badge5| -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: :: @@ -38,13 +40,22 @@ with this module you can do: -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: :: - +
+ +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. -It works in any tree view, so you can use it in One2many. +You do however have access to ``_context`` and ``_group_refs`` in for the +actions of standalone tree views. **Table of contents** diff --git a/web_action_conditionable/static/description/index.html b/web_action_conditionable/static/description/index.html index 27ed6985..9fa31549 100644 --- a/web_action_conditionable/static/description/index.html +++ b/web_action_conditionable/static/description/index.html @@ -368,8 +368,9 @@ ul.auto-toc { !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

-

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:

 <tree delete="false" create="false">
 
@@ -377,11 +378,18 @@ Odoo by default support:

 <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.

Table of contents