document readonly_by_pass

pull/164/head
Pierre Verkest 2015-07-14 14:05:31 +02:00
parent 790a8536b9
commit d650d93a69
1 changed files with 19 additions and 5 deletions

View File

@ -9,8 +9,8 @@ This module provides a solution to the problem of the interaction between
saving onchange modifications to readonly fields. saving onchange modifications to readonly fields.
Behavior: add readonly fields changed by `on_change` methods to the values Behavior: add readonly fields changed by `on_change` methods to the values
passed to write or create. If `filter_out_readonly` is in the context and passed to write or create. If `readonly_by_pass` is in the context and
True then apply native behavior. True then by pass readonly fields and save its change.
Installation Installation
============ ============
@ -25,11 +25,23 @@ There is nothing to configure.
Usage Usage
===== =====
This module changes the default behaviour of Odoo by propagating This module changes the behaviour of Odoo by propagating
on_change modifications to readonly fields to the backend create and write on_change modifications to readonly fields to the backend create and write
methods. methods.
To restore the standard behaviour, set `filter_out_readonly` in the context. 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 allow 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: For further information, please visit:
@ -38,7 +50,9 @@ For further information, please visit:
Known issues / Roadmap Known issues / Roadmap
====================== ======================
None * At this point, bypass on a field on o2m field (like field on sale order line)
are not working, because context from action is not take on consideration
when loosing focus on the line in the ``BufferedDataSet`` js Class.
Bug Tracker Bug Tracker
=========== ===========