Diagram View Odoo Bug

There is an Odoo bug that raises an error on the diagram view. It appears when the diagram object has 2 fields (one2many + many2one) that points to related nodes.

For example, we have the following model to display diagram view on in:

object:

  • stage_ids: one2many('object.stage', 'object_id')
  • start_stage_id: many2one('object.stage')

When clicking on the diagram view, the following error is raised:

File "/home/katyukha/projects/OpenERP/odoo-10.0/odoo/addons/web_diagram/controllers/main.py", line 82, in get_diagram_info
    search_acts = node_act.search([(field.relation_field, '=', id)])
  File "/home/katyukha/projects/OpenERP/odoo-10.0/odoo/odoo/fields.py", line 864, in __get__
    record.ensure_one()
  File "/home/katyukha/projects/OpenERP/odoo-10.0/odoo/odoo/models.py", line 4822, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: ir.model.fields(6706, 6713)

To fix the diagram view: