Files
odoo_source/odoo/addons/base
Nicolas Lempereur 3aa1434164 [FIX] base: fallback on model_id to fill related field
Scenario:

- go to a model in technical
- create a new field and set "Related Field" to id

=> error "Unknown field name 'id' in related field 'id'" because we
get the field in self.model which is not present in the form view.

Fix:

Fallback to self.model_id.model as was the case before 16.0 commit:
76f699ca0b

Note: without the change, the added tests fails with:

  Warning Unknown field name 'id' in related field 'id'
  AssertionError: False != 'integer

opw-3138440
closes #112495

closes odoo/odoo#140583

X-original-commit: aa406352541abd8bbf188da84fc4e370029ffc12
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-11-02 15:11:00 +00:00
..
2023-03-24 12:50:13 +01:00