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.

123 lines
3.6 KiB

  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",
  25. "maintainer": "ACSONE SA/NV, Odoo Community Association (OCA)",
  26. "website": "http://www.acsone.eu",
  27. 'category': 'Technical Settings',
  28. 'depends': [
  29. 'base',
  30. 'web',
  31. ],
  32. 'description': """
  33. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  34. :alt: License: AGPL-3
  35. Read Only ByPass
  36. ================
  37. This module provides a solution to the problem of the interaction between
  38. 'readonly' attribute and 'on_change' attribute when used together. It allows
  39. saving onchange modifications to readonly fields.
  40. Behavior: add readonly fields changed by `on_change` methods to the values
  41. passed to write or create. If `filter_out_readonly` is in the context and
  42. True then apply native behavior.
  43. Installation
  44. ============
  45. There are no specific installation instructions for this module.
  46. Configuration
  47. =============
  48. There is nothing to configure.
  49. Usage
  50. =====
  51. This module changes the default behaviour of Odoo by propagating
  52. on_change modifications to readonly fields to the backend create and write
  53. methods.
  54. To restore the standard behaviour, set `filter_out_readonly` in the context.
  55. For further information, please visit:
  56. * https://www.odoo.com/forum/help-1
  57. Known issues / Roadmap
  58. ======================
  59. None
  60. Bug Tracker
  61. ===========
  62. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  63. In case of trouble, please check there if your issue has already been reported.
  64. If you spotted it first, help us smashing it by providing a detailed and
  65. welcomed feedback `here <https://github.com/OCA/web/issues/new?body=module:%20
  66. web_readonly_bypass%0Aversion:%208.0.1.0%0A%0A**Steps%20to%20reproduce**%0A-%20
  67. ...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  68. Credits
  69. =======
  70. Contributors
  71. ------------
  72. * Jonathan Nemry <jonathan.nemry@acsone.eu>
  73. * Laetitia Gangloff <laetitia.gangloff@acsone.eu>
  74. * Pierre Verkest <pverkest@anybox.fr>
  75. Maintainer
  76. ----------
  77. .. image:: https://odoo-community.org/logo.png
  78. :alt: Odoo Community Association
  79. :target: https://odoo-community.org
  80. This module is maintained by the OCA.
  81. OCA, or the Odoo Community Association, is a nonprofit organization whose
  82. mission is to support the collaborative development of Odoo features and
  83. promote its widespread use.
  84. To contribute to this module, please visit http://odoo-community.org.
  85. """,
  86. "depends": [
  87. 'web',
  88. ],
  89. 'js': [
  90. 'static/src/js/readonly_bypass.js',
  91. ],
  92. 'test': [
  93. 'static/test/web_readonly_bypass.js',
  94. ],
  95. 'installable': True,
  96. 'auto_install': False,
  97. 'application': False,
  98. }