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.

119 lines
3.6 KiB

10 years ago
  1. # -*- coding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # Authors: Nemry Jonathan & Laetitia Gangloff
  5. # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. {
  22. 'name': 'Read Only ByPass',
  23. 'version': '1.0',
  24. "author": "ACSONE SA/NV, Anybox, Odoo Community Association (OCA)",
  25. "maintainer": "ACSONE SA/NV, Odoo Community Association (OCA)",
  26. "website": "http://www.acsone.eu",
  27. 'category': 'Technical Settings',
  28. 'description': """
  29. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  30. :alt: License: AGPL-3
  31. Read Only ByPass
  32. ================
  33. This module provides a solution to the problem of the interaction between
  34. 'readonly' attribute and 'on_change' attribute when used together. It allows
  35. saving onchange modifications to readonly fields.
  36. Behavior: add readonly fields changed by `on_change` methods to the values
  37. passed to write or create. If `filter_out_readonly` is in the context and
  38. True then apply native behavior.
  39. Installation
  40. ============
  41. There are no specific installation instructions for this module.
  42. Configuration
  43. =============
  44. There is nothing to configure.
  45. Usage
  46. =====
  47. This module changes the default behaviour of Odoo by propagating
  48. on_change modifications to readonly fields to the backend create and write
  49. methods.
  50. To restore the standard behaviour, set `filter_out_readonly` in the context.
  51. For further information, please visit:
  52. * https://www.odoo.com/forum/help-1
  53. Known issues / Roadmap
  54. ======================
  55. None
  56. Bug Tracker
  57. ===========
  58. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  59. In case of trouble, please check there if your issue has already been reported.
  60. If you spotted it first, help us smashing it by providing a detailed and
  61. welcomed feedback `here <https://github.com/OCA/web/issues/new?body=module:%20
  62. web_readonly_bypass%0Aversion:%208.0.1.0%0A%0A**Steps%20to%20reproduce**%0A-%20
  63. ...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  64. Credits
  65. =======
  66. Contributors
  67. ------------
  68. * Jonathan Nemry <jonathan.nemry@acsone.eu>
  69. * Laetitia Gangloff <laetitia.gangloff@acsone.eu>
  70. * Pierre Verkest <pverkest@anybox.fr>
  71. Maintainer
  72. ----------
  73. .. image:: https://odoo-community.org/logo.png
  74. :alt: Odoo Community Association
  75. :target: https://odoo-community.org
  76. This module is maintained by the OCA.
  77. OCA, or the Odoo Community Association, is a nonprofit organization whose
  78. mission is to support the collaborative development of Odoo features and
  79. promote its widespread use.
  80. To contribute to this module, please visit http://odoo-community.org.
  81. """,
  82. "depends": [
  83. 'web',
  84. ],
  85. 'js': [
  86. 'static/src/js/readonly_bypass.js',
  87. ],
  88. 'test': [
  89. 'static/test/web_readonly_bypass.js',
  90. ],
  91. 'installable': True,
  92. 'auto_install': False,
  93. 'application': False,
  94. }