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.

55 lines
1.9 KiB

  1. Allow to write simple mathematic formulas in Integer / Float fields
  2. ===================================================================
  3. * Possibility to tip a text like "=45 + 4/3 - 5 * (2 +1)";
  4. * if the formula is correct, The result will be computed and displayed;
  5. * if the formula is not correct, the initial text is displayed;
  6. Technical informations
  7. ----------------------
  8. * Overloads "instance.web.form.FieldFloat"; (so works for fields.integer &
  9. fields.float);
  10. * To compute, the module simply use the eval() javascript function;
  11. * Rounding computation is not done by this module (The module has the same
  12. behaviour if the user tips "=1/3" or if he tips "0.33[...]");
  13. * avoid code injonction by regexpr test: "=alert('security')" is not valid;
  14. Usage
  15. =====
  16. See demo here Video: http://www.youtube.com/watch?v=jQGdD34WYrA&hd=1
  17. Roadmap / Limit
  18. ===============
  19. * Only supports the four operators: "+" "-" "*" "/" and parenthesis;
  20. Bug Tracker
  21. ===========
  22. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  23. In case of trouble, please check there if your issue has already been reported.
  24. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  25. `here <https://github.com/OCA/web/issues/new?body=module:%20web_widget_float_formula%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  26. Credits
  27. =======
  28. Contributors
  29. ------------
  30. * Sylvain Le Gal (https://twitter.com/legalsylvain)
  31. Maintainer
  32. ----------
  33. .. image:: http://odoo-community.org/logo.png
  34. :alt: Odoo Community Association
  35. :target: http://odoo-community.org
  36. This module is maintained by the OCA.
  37. OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
  38. To contribute to this module, please visit http://odoo-community.org.