跳至內容
選單
此問題已被標幟
1 回覆
4912 瀏覽次數

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 ?

頭像
捨棄
最佳答案

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()
頭像
捨棄
作者

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.

相關帖文 回覆 瀏覽次數 活動
2
2月 24
15370
2
12月 22
14311
2
6月 22
6150
2
6月 22
4562
0
5月 22
3796