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.

65 lines
2.1 KiB

11 years ago
11 years ago
  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 &
  23. fields.float);
  24. * To compute, the module simply use the eval() javascript function;
  25. * Rounding computation is not done by this module (The module has the same
  26. behaviour if the user tips "=1/3" or if he tips "0.33[...]");
  27. * avoid code injonction by regexpr test: "=alert('security')" is not valid;
  28. Limits:
  29. --------
  30. * Only supports the four operators: "+" "-" "*" "/" and parenthesis;
  31. Copyright and Licence:
  32. -----------------------
  33. * 2013, Groupement Régional Alimentaire de Proximité (http://www.grap.coop/)
  34. * Licence: AGPL-3 (http://www.gnu.org/licenses/)
  35. Contacts :
  36. ----------
  37. * Sylvain LE GAL (https://twitter.com/legalsylvain);
  38. * <informatique@grap.coop> for any help or question about this module.
  39. """,
  40. 'author': 'GRAP',
  41. 'website': 'http://www.grap.coop',
  42. 'license': 'AGPL-3',
  43. 'depends': [
  44. 'web',
  45. ],
  46. 'data': [],
  47. 'demo': [],
  48. 'js': [
  49. 'static/src/js/models.js',
  50. ],
  51. 'css': [],
  52. 'qweb': [],
  53. 'images': [],
  54. 'post_load': '',
  55. 'application': False,
  56. 'installable': True,
  57. 'auto_install': False,
  58. 'images': [],
  59. }