Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4900 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

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.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
helmik. 24
15350
2
jouluk. 22
14299
2
kesäk. 22
6141
2
kesäk. 22
4551
0
toukok. 22
3786