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.

87 lines
2.5 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :alt: License: AGPL-3
  3. Read Only ByPass
  4. ================
  5. This module provides a solution to the problem of the interaction between
  6. 'readonly' attribute and 'on_change' attribute when used together. It allows
  7. saving onchange modifications to readonly fields.
  8. Behavior: add readonly fields changed by `on_change` methods to the values
  9. passed to write or create. If `readonly_by_pass` is in the context and
  10. True then it will by pass readonly fields and save its data provide by onchange
  11. method.
  12. Installation
  13. ============
  14. There are no specific installation instructions for this module.
  15. Configuration
  16. =============
  17. There is nothing to configure.
  18. Usage
  19. =====
  20. This module changes the behaviour of Odoo by propagating
  21. on_change modifications to readonly fields to the backend create and write
  22. methods.
  23. To change that behavior you have to set context on ``ur.actions.act_window``::
  24. <record id="sale.action_quotations" model="ir.actions.act_window">
  25. <field name="context">{'readonly_by_pass': True}</field>
  26. </record>
  27. or by telling fields allowed to change::
  28. <record id="sale.action_quotations" model="ir.actions.act_window">
  29. <field name="context">
  30. {'readonly_by_pass': ['readonly_field_1', 'readonly_field_2',]}
  31. </field>
  32. </record>
  33. For further information, please visit:
  34. * https://www.odoo.com/forum/help-1
  35. Known issues / Roadmap
  36. ======================
  37. *
  38. Bug Tracker
  39. ===========
  40. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  41. In case of trouble, please check there if your issue has already been reported.
  42. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  43. `here <https://github.com/OCA/web/issues/new?body=module:%20web_readonly_bypass%0Aversion:%208.0.1.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  44. Credits
  45. =======
  46. Contributors
  47. ------------
  48. * Jonathan Nemry <jonathan.nemry@acsone.eu>
  49. * Laetitia Gangloff <laetitia.gangloff@acsone.eu>
  50. * Pierre Verkest <pverkest@anybox.fr>
  51. Maintainer
  52. ----------
  53. .. image:: https://odoo-community.org/logo.png
  54. :alt: Odoo Community Association
  55. :target: https://odoo-community.org
  56. This module is maintained by the OCA.
  57. OCA, or the Odoo Community Association, is a nonprofit organization whose
  58. mission is to support the collaborative development of Odoo features and
  59. promote its widespread use.
  60. To contribute to this module, please visit http://odoo-community.org.