1. the default_get has no value for the m2o field
2. but triggers an onchange which does set a value on the m2o field
3. and the m2o's name_get is fast
Problem is the following:
1. default_get triggers m2ofield.set_value(false)
which launches a $.async_when(set internal value to false for real)
2. onchange triggers m2ofield.set_value(some_id)
which launches a name_get([some_id])
3. if the name_get request returns before $.async_when triggers (~10ms in most browsers I think), then it will set `false` over the correct value of `some_id`
See qdp for model/view which exposes this behavior, reproduction is random (since depends on async name_get call/speed), but if a breakpoint is added inside m2o's set_value then we got it to trigger every time in Chrome on his machine.
Issue happens when creating a new object where:
1. the default_get has no value for the m2o field
2. but triggers an onchange which does set a value on the m2o field
3. and the m2o's name_get is fast
Problem is the following:
1. default_get triggers m2ofield. set_value( false) set_value( some_id)
which launches a $.async_when(set internal value to false for real)
2. onchange triggers m2ofield.
which launches a name_get([some_id])
3. if the name_get request returns before $.async_when triggers (~10ms in most browsers I think), then it will set `false` over the correct value of `some_id`
See qdp for model/view which exposes this behavior, reproduction is random (since depends on async name_get call/speed), but if a breakpoint is added inside m2o's set_value then we got it to trigger every time in Chrome on his machine.