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.

86 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. Bug Tracker
  38. ===========
  39. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
  40. In case of trouble, please check there if your issue has already been reported.
  41. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  42. `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**>`_.
  43. Credits
  44. =======
  45. Contributors
  46. ------------
  47. * Jonathan Nemry <jonathan.nemry@acsone.eu>
  48. * Laetitia Gangloff <laetitia.gangloff@acsone.eu>
  49. Maintainer
  50. ----------
  51. .. image:: https://odoo-community.org/logo.png
  52. :alt: Odoo Community Association
  53. :target: https://odoo-community.org
  54. This module is maintained by the OCA.
  55. OCA, or the Odoo Community Association, is a nonprofit organization whose
  56. mission is to support the collaborative development of Odoo features and
  57. promote its widespread use.
  58. To contribute to this module, please visit http://odoo-community.org.