3
0
Fork 0
web_techsystech/web_readonly_bypass
Jairo Llopis 8a852be42a [FIX][web_readonly_bypass] Fix wrong test suite.
- Test was not migrated to v9.
- It is not still 100% migrated, but it works now.
- Add to known issues that it must migrate.
- Cosmetic fixes.
- Run tests in bots always.
2016-11-02 13:32:26 +01:00
..
static [FIX][web_readonly_bypass] Fix wrong test suite. 2016-11-02 13:32:26 +01:00
tests [FIX][web_readonly_bypass] Fix wrong test suite. 2016-11-02 13:32:26 +01:00
views cherry-pick 790a853 by pass readonly fields only if context is set with 2015-08-07 12:15:14 +02:00
README.rst [FIX][web_readonly_bypass] Fix wrong test suite. 2016-11-02 13:32:26 +01:00
__init__.py [IMP] web_readonly_bypass: port to OCA from acsone-addons 2015-07-02 14:36:54 +02:00
__openerp__.py [FIX][web_readonly_bypass] Fix wrong test suite. 2016-11-02 13:32:26 +01:00

README.rst

.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
   :alt: 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 ``ur.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>

For further information, please visit:

* https://www.odoo.com/forum/help-1

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
   :alt: Try me on Runbot
   :target: https://runbot.odoo-community.org/runbot/162/9.0

Known issues / Roadmap
======================

* Migrate to v9 JS API both normal code and QUnit tests.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/web/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
------------

* Jonathan Nemry <jonathan.nemry@acsone.eu>
* Laetitia Gangloff <laetitia.gangloff@acsone.eu>
* Pierre Verkest <pverkest@anybox.fr>
* Jairo Llopis <jairo.llopis@tecnativa.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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 https://odoo-community.org.