Files
odoo_source/addons/gamification/views
Denis Ledoux 02174099e2 [FIX] gamification: goal definition for models without inherits
When attempting to define a goal
using a model that does not have any `inherits`
- which happens most the time-,
it was not possible to choose the
`Field to Sum` and the `Date Field`,
due to the domain set in the view
which is no longer working in 9.0.

The domain is no longer working because:
 - The onchange result for a one2many for which
 the value is set to `[(6, 0, [])]` is now `[]`,
 while, in 8.0, the tuple with the command `6` and the empty
 list was preserved
 - the empty list `model_inherited_model_ids` is considered as `True` by py.js,
  and therefore it fallbacks to `model_inherited_model_ids[0]`, but
  as this is an empty list, it crashes.

The solution proposed in this revision solves the issue, while
making the domain applied on these fields less fragile.

opw-658892
2015-12-09 16:39:24 +01:00
..