Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4911 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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.

Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Feb. 24
15366
2
Dez. 22
14311
2
Juni 22
6149
2
Juni 22
4558
0
Mai 22
3793