Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4890 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

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.

Publications associées Réponses Vues Activité
2
févr. 24
15308
2
déc. 22
14268
2
juin 22
6111
2
juin 22
4538
0
mai 22
3776