diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-02-13 12:16:49 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2019-02-15 10:54:44 +0000 |
| commit | bb7b121206ef9af8f7c365552500b1c51f96638e (patch) | |
| tree | c13d245701ca7f458988dcd46bb447e70146e517 /odoo/addons/test_testing_utilities/menu.xml | |
| parent | 84abddfe904273daaa3be744b974c8cce98c30fb (diff) | |
[FIX] core: various issues & deviations from client's behaviour in Form
* Form would entirely mis-interpret the server's response to some
results: for unmodified o2m records the server sends a (4), which was
un-interpreted by Form, leading to the o2m record being lost entirely
(as it rebuilds the entire o2m on setting)
* on record creation, every field (except id) is considered modified not
just the fields set by default_get
* Form diverged from actual client in that it would send (1, id, {}) for
unmodified o2m records, actual client sends (4, id, False)
* datetimes should be sent stringified
* onchange should not be triggered when none of the modified fields is
flagged as an onchange trigger
* the default value for numerical fields is 0 not False
* convert m2m onchange results to (6, False, ids) instead of (6, 0, ids)
for ease of diffing with actual client's data
There are still a few odd divergences in the actual invocation of
onchange when attempted on an SO, but they look to be of low relevance
/ risk.
Note: making integer fields "required" has pretty much no effect
anymore. This is in line with (my understanding of) the client's
behaviour, but required the alteration of test models as the
specific test on required... was using an integer field.
closes odoo/odoo#31064
Diffstat (limited to 'odoo/addons/test_testing_utilities/menu.xml')
| -rw-r--r-- | odoo/addons/test_testing_utilities/menu.xml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/odoo/addons/test_testing_utilities/menu.xml b/odoo/addons/test_testing_utilities/menu.xml index 99e409708c2..3ca18ef2a50 100644 --- a/odoo/addons/test_testing_utilities/menu.xml +++ b/odoo/addons/test_testing_utilities/menu.xml @@ -10,6 +10,17 @@ name="O2M onchange test thing" action="action_test_o2m_onchange"/> + <record id="action_test_m2o_onchange" model="ir.actions.act_window"> + <field name="name">test_default_and_onchange</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">test_testing_utilities.d</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem id="menu_m2o" parent="base.menu_tests" + name="test_default_and_onchange" + action="action_test_m2o_onchange"/> + <record id="o2m_parent" model="ir.ui.view"> <field name="name">Parent External Form</field> <field name="priority">1</field> @@ -98,7 +109,7 @@ <field name="arch" type="xml"> <form> <field name="f1"/> - <field name="f2" attrs="{'readonly': [['f1', '=', 63], ['f3', '=', 5]]}"/> + <field name="f2" attrs="{'readonly': [['f1', '=', '63'], ['f3', '=', 5]]}"/> <field name="f3"/> <field name="f4"/> <field name="f5" readonly="1"/> |
