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.

53 lines
1.5 KiB

  1. Context in colors
  2. =================
  3. This addon allows to use the current context in colors, thereby allowing i.e.
  4. search filters changing the colors used in a tree view. This also works for
  5. the fonts attribute.
  6. Usage
  7. =====
  8. You might define a search filter::
  9. <filter name="paid_green" string="Show paid invoices in green" context="{'paid_should_be_green': True}" />
  10. And then you could use::
  11. <tree colors="green:state == 'paid' and context.get('paid_should_be_green')">
  12. in your tree view. Take care here that the first match wins, so order your
  13. color expressions accordingly.
  14. Bug Tracker
  15. ===========
  16. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  17. In case of trouble, please check there if your issue has already been reported.
  18. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  19. `here <https://github.com/OCA/web/issues/new?body=module:%20web_context_in_colors%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  20. Credits
  21. =======
  22. Contributors
  23. ------------
  24. * Holger Brunn <hbrunn@therp.nl>
  25. Maintainer
  26. ----------
  27. .. image:: http://odoo-community.org/logo.png
  28. :alt: Odoo Community Association
  29. :target: http://odoo-community.org
  30. This module is maintained by the OCA.
  31. OCA, or the Odoo Community Association, is a nonprofit organization whose
  32. mission is to support the collaborative development of Odoo features and
  33. promote its widespread use.
  34. To contribute to this module, please visit http://odoo-community.org.