You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
829 B

  1. This module was written to allow developers to fine tune available actions in
  2. form and tree views.
  3. Odoo by default supports:
  4. ::
  5. <tree delete="false" create="false">
  6. with this module you can do:
  7. ::
  8. <tree delete="state=='draft'">
  9. Further, you can use `_group_refs` to make a condition based on the user's
  10. groups:
  11. ::
  12. <form delete="'base.group_user' in _group_refs">
  13. You also have access to ``_context`` for the current context. This way, you can
  14. for example craft actions that pass a context key which decides if some of the
  15. action buttons are shown.
  16. Note that for tree views, this will not work on a per record base, and the
  17. values you have access to are the values of the form the x2many field is in.
  18. You do however have access to ``_context`` and ``_group_refs`` in for the
  19. actions of standalone tree views.