I added a new custom field(many2many) to the model hr.recruitment.stage ,please refer to the below image for reference,
And trying to display it in the grouped kanban column view of hr.applicant, please refer to the below image for reference
Here I added the subtitle text by writing a custom addon, in the path static/src/xml/filename.xml
<?xml version="1.0"?>
<templates>
<t t-inherit="web.KanbanView.Group" t-inherit-mode="primary">
<xpath expr="//div[hasclass('o_kanban_header_title')]" position="after">
<span>Subtitle</span>
</xpath>
</t>
</templates>
in the place of subtitle, I want to display the newly added many2many field values from the hr.recruitment.stage model, here I referred to kanban_column.js and I'm not able to figure out how to pass the value of the newly added field(many2many) to the javascript and display the value in the grouped kanban column view of hr.applicant. I request you to please guide me to achieve this and it will be very useful for me, thanks in advance.
First, you need to add the
x_recruiters
field to the kanban fields:It will automatically read and add the
x_recruiters
field to thedata
object.Then add the
recruiters
names instead of theSubtitle
text:Edit:
You can alter the kanban column to read the recruiters from the stage model and show them after it is rendered.
Add the js file to the assets backend: