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.

90 lines
2.6 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # Copyright (C) 2014 Agile Business Group sagl (<http://www.agilebg.com>)
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as published
  8. # by the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. ##############################################################################
  20. {
  21. 'name': "Fields Validator",
  22. 'version': '0.1',
  23. 'category': 'Tools',
  24. 'summary': "Validate fields using regular expressions",
  25. 'description': """
  26. Fields Validator
  27. ================
  28. This module allows to set a regular expression as field validator.
  29. When the regular expresion is set, write and create operations on the involved
  30. field are blocked, if the regular expression is not satisfied.
  31. See demo and test data for an example with partner email.
  32. Configuration
  33. =============
  34. Open ir.model form (say res.partner) and add 'Validators' lines
  35. Known issues / Roadmap
  36. ======================
  37. The module performs the check at server side. Client side check is also needed,
  38. to improve user experience and avoid server calls when unnecessary
  39. Credits
  40. =======
  41. Contributors
  42. ------------
  43. * Lorenzo Battistini <lorenzo.battistini@agilebg.com>
  44. * Nicola Malcontenti <nicola.malcontenti@agilebg.com>
  45. Maintainer
  46. ----------
  47. .. image:: http://odoo-community.org/logo.png
  48. :alt: Odoo Community Association
  49. :target: http://odoo-community.org
  50. This module is maintained by the OCA.
  51. OCA, or the Odoo Community Association, is a nonprofit organization
  52. whose mission is to support the collaborative development of Odoo features
  53. and promote its widespread use.
  54. To contribute to this module, please visit http://odoo-community.org.
  55. """,
  56. 'author': 'Agile Business Group',
  57. 'website': 'http://www.agilebg.com',
  58. 'license': 'AGPL-3',
  59. "depends": ['base'],
  60. "data": [
  61. 'ir_model_view.xml',
  62. 'security/ir.model.access.csv',
  63. ],
  64. "demo": [
  65. 'ir_model_demo.xml',
  66. ],
  67. 'test': [
  68. 'test/validator.yml',
  69. ],
  70. "active": False,
  71. "installable": True
  72. }