v 8.0 v 9.0 v 10.0 v 12.0 Third Party 917
Download for v 8.0
Availability
Odoo Online
Odoo.sh
On Premise
Technical Name web_widget_float_formula
LicenseAGPL-3
Websitehttp://www.grap.coop
Versions 9.0 10.0 12.0 8.0
You bought this module and need support? Click here!

Allow to write simple mathematic formulas in Integer / Float fields

  • Possibility to tip a text like "=45 + 4/3 - 5 * (2 +1)";
  • if the formula is correct, The result will be computed and displayed;
  • if the formula is not correct, the initial text is displayed;

Technical informations

  • Overloads "instance.web.form.FieldFloat"; (so works for fields.integer & fields.float);
  • To compute, the module simply use the eval() javascript function;
  • 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[...]");
  • avoid code injonction by regexpr test: "=alert('security')" is not valid;

Roadmap / Limit

  • Only supports the four operators: "+" "-" "*" "/" and parenthesis;

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.

Credits

Contributors

  • Sylvain Le Gal (https://twitter.com/legalsylvain)

Maintainer

Odoo Community Association

This module is maintained by the OCA.

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.

To contribute to this module, please visit http://odoo-community.org.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.