XML display parent object in ODOO 14

296 Views Asked by At

I have created a new many2many(x_recruiters) field to hr.recruitment.stage via user interface, and I am trying to access it in the tree view of the applicant, like

<?xml version="1.0"?>
<tree string="Applicants" multi_edit="1" sample="1">
  <field name="stage_id.x_recruiters"/>
</tree>

But it showing an error

Error while validating view: Field "stage_id.x_recruiters" does not exist in model "hr.applicant"

Can you please guide me to achieve this in the tree view, it will be very helpful for me. thanks in advance.

1

There are 1 best solutions below

11
On BEST ANSWER

You can find in the documentation of the List view that the field name is the name of the field to display in the current model.

The satge_id field is of type Many2one related to hr.recruitment.stage so you can add a related field to x_recruiters in hr.applicant then add it to the list view.