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.

63 lines
2.1 KiB

  1. # -*- encoding: utf-8 -*-
  2. ################################################################################
  3. # See Copyright and Licence Informations undermentioned.
  4. ################################################################################
  5. {
  6. 'name': 'Web Widget - Formulas in Float fields',
  7. 'version': '1.0',
  8. 'category': 'web',
  9. 'description': """
  10. Allow to write simple mathematic formulas in Integer / Float fields
  11. ===================================================================
  12. Functionnalities:
  13. ------------------
  14. * Possibility to tip a text like "=45 + 4/3 - 5 * (2 +1)";
  15. * if the formula is correct, The result will be computed and displayed;
  16. * if the formula is not correct, the initial text is displayed;
  17. Documentations:
  18. ------------------
  19. * Video: http://www.youtube.com/watch?v=jQGdD34WYrA&hd=1
  20. Technical informations:
  21. ------------------------
  22. * Overloads "instance.web.form.FieldFloat"; (so works for fields.integer & fields.float);
  23. * To compute, the module simply use the eval() javascript function;
  24. * Rounding computation is not done by this module (The module has the same behaviour if the user tips "=1/3" or if he tips "0.33[...]");
  25. * avoid code injonction by regexpr test: "=alert('security')" is not valid;
  26. Limits:
  27. --------
  28. * Only supports the four operators: "+" "-" "*" "/" and parenthesis;
  29. Copyright and Licence:
  30. -----------------------
  31. * 2013, Groupement Régional Alimentaire de Proximité (http://www.grap.coop/)
  32. * Licence: AGPL-3 (http://www.gnu.org/licenses/)
  33. Contacts :
  34. ----------
  35. * Sylvain LE GAL (https://twitter.com/legalsylvain);
  36. * <informatique@grap.coop> for any help or question about this module.
  37. """,
  38. 'author': 'GRAP',
  39. 'website': 'http://www.grap.coop',
  40. 'license': 'AGPL-3',
  41. 'depends': [
  42. 'web',
  43. ],
  44. 'data': [],
  45. 'demo': [],
  46. 'js': [
  47. 'static/src/js/models.js',
  48. ],
  49. 'css': [],
  50. 'qweb': [],
  51. 'images': [],
  52. 'post_load': '',
  53. 'application': False,
  54. 'installable': True,
  55. 'auto_install': False,
  56. 'images': [],
  57. }