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.

43 lines
1.1 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. Credits
  15. =======
  16. Contributors
  17. ------------
  18. * Holger Brunn <hbrunn@therp.nl>
  19. Maintainer
  20. ----------
  21. .. image:: http://odoo-community.org/logo.png
  22. :alt: Odoo Community Association
  23. :target: http://odoo-community.org
  24. This module is maintained by the OCA.
  25. OCA, or the Odoo Community Association, is a nonprofit organization whose
  26. mission is to support the collaborative development of Odoo features and
  27. promote its widespread use.
  28. To contribute to this module, please visit http://odoo-community.org.