Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

License: AGPL-3

Read Only ByPass

This module provides a solution to the problem of the interaction between ‘readonly’ attribute and ‘on_change’ attribute when used together. It allows saving onchange modifications to readonly fields.

Behavior: add readonly fields changed by on_change methods to the values passed to write or create. If readonly_by_pass is in the context and True then it will by pass readonly fields and save its data provide by onchange method.

Usage

This module changes the behaviour of Odoo by propagating on_change modifications to readonly fields to the backend create and write methods.

To change that behavior you have to set context on ir.actions.act_window:

<record id="sale.action_quotations" model="ir.actions.act_window">
    <field name="context">{'readonly_by_pass': True}</field>
</record>

or by telling fields allowed to change:

<record id="sale.action_quotations" model="ir.actions.act_window">
    <field name="context">
        {'readonly_by_pass': ['readonly_field_1', 'readonly_field_2',]}
    </field>
</record>

On one2many fields, you can also pass the context in the field definition:

<field name=”one2many_field” context=”{‘readonly_by_pass’: True}”/>

Try me on Runbot

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

Release files for odoo10-addon-web-readonly-bypass 10.0.1.0.1.99.dev4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo10-addon-web-readonly-bypass 10.0.1.0.1.99.dev4
File Interpreter ABI Platform
odoo10_addon_web_readonly_bypass-10.0.1.0.1.99.dev4-py2-none-any.whl Python 2 none any Details

Release files / odoo10_addon_web_readonly_bypass-10.0.1.0.1.99.dev4-py2-none-any.whl

Download URL odoo10_addon_web_readonly_bypass-10.0.1.0.1.99.dev4-py2-none-any.whl
Size 19.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
2d4a7970754d23dfc1b444e72315ab9746175b9f2d84c11ba778a30ad20fe044
BLAKE2b-256 checksum
How to use checksums
3460d49d32e2d3fd5f84e65f1e0984b7d078784bfd8df01d6631423ed4e5d343
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/30.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page