Skip to Content
Menu
This question has been flagged
1 Reply
3860 Views

I'm using module recruitment of odoo v11 and I want to create a fixed columns in the kanban view.
For example when I create a new application, I want it to be created under the column CV in progress automatically instead of been created under a column entitled "undefined" ?

Any idea for help please ?

Avatar
Discard
Best Answer

You need to set your "CV in progress" stage to stage_id field.

class Applicant(models.Model):
_inherit = "hr.applicant"

    def _default_stage_id(self):
        # Search your stage
    stage_id = self.env.ref('default_stage_job').id  # Update: Get the stage id by XML ID
     if stage_id:
            return stage_id
        return super(Applicant, self)._default_stage_id()
Avatar
Discard
Author

Thanks for your answer, the stage "my default stage" is added automatically but i notice my new applicant is always created under state undefined

Make sure the stage name is correct and matching with the domain condition : [('name', '=', 'CV in progress')]

See my updated answer.

stage_id = self.env.ref('default_stage_job').id

Put a print statement in the method and check if you are getting stage_id (CV in progress) or not.

Related Posts Replies Views Activity
2
Feb 24
13193
2
Dec 22
12725
2
Jun 22
4688
2
Jun 22
3504
0
May 22
2945