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.

84 lines
2.5 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. ================
  5. Read Only ByPass
  6. ================
  7. This module provides a solution to the problem of the interaction between
  8. 'readonly' attribute and 'on_change' attribute when used together. It allows
  9. saving onchange modifications to readonly fields.
  10. Behavior: add readonly fields changed by `on_change` methods to the values
  11. passed to write or create. If `readonly_by_pass` is in the context and
  12. True then it will by pass readonly fields and save its data provide by onchange
  13. method.
  14. Usage
  15. =====
  16. This module changes the behaviour of Odoo by propagating
  17. on_change modifications to readonly fields to the backend create and write
  18. methods.
  19. To change that behavior you have to set context on ``ur.actions.act_window``::
  20. <record id="sale.action_quotations" model="ir.actions.act_window">
  21. <field name="context">{'readonly_by_pass': True}</field>
  22. </record>
  23. or by telling fields allowed to change::
  24. <record id="sale.action_quotations" model="ir.actions.act_window">
  25. <field name="context">
  26. {'readonly_by_pass': ['readonly_field_1', 'readonly_field_2',]}
  27. </field>
  28. </record>
  29. For further information, please visit:
  30. * https://www.odoo.com/forum/help-1
  31. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  32. :alt: Try me on Runbot
  33. :target: https://runbot.odoo-community.org/runbot/162/9.0
  34. Known issues / Roadmap
  35. ======================
  36. * Migrate to v9 JS API both normal code and QUnit tests.
  37. Bug Tracker
  38. ===========
  39. Bugs are tracked on `GitHub Issues
  40. <https://github.com/OCA/web/issues>`_. In case of trouble, please
  41. check there if your issue has already been reported. If you spotted it first,
  42. help us smashing it by providing a detailed and welcomed feedback.
  43. Credits
  44. =======
  45. Contributors
  46. ------------
  47. * Jonathan Nemry <jonathan.nemry@acsone.eu>
  48. * Laetitia Gangloff <laetitia.gangloff@acsone.eu>
  49. * Pierre Verkest <pverkest@anybox.fr>
  50. * Jairo Llopis <jairo.llopis@tecnativa.com>
  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 https://odoo-community.org.