<commit_before># Part of Odoo. See LICENSE file for full copyright and licensing details.

from openerp import api, fields, models


class Job(models.Model):
    _inherit = "hr.job"
    _name = "hr.job"
    _inherits = {'mail.alias': 'alias_id'}

    @api.model
    def _default_address_id(self):
        return self.env.user.company_id.partner_id

    address_id = fields.Many2one(
        'res.partner', "Job Location", default=_default_address_id,
        help="Address where employees are working")
    application_ids = fields.One2many('hr.applicant', 'job_id', "Applications")
    application_count = fields.Integer(compute='_compute_application_count', string="Applications")
    manager_id = fields.Many2one(
        'hr.employee', related='department_id.manager_id', string="Department Manager",
        readonly=True, store=True)
    user_id = fields.Many2one('res.users', "Recruitment Responsible", track_visibility='onchange')
    stage_ids = fields.Many2many(
        'hr.recruitment.stage', 'job_stage_rel', 'job_id', 'stage_id',
        'Job Stages')
    document_ids = fields.One2many('ir.attachment', compute='_compute_document_ids', string="Applications")
    documents_count = fields.Integer(compute='_compute_document_ids', string="Documents")
    survey_id = fields.Many2one(
        'survey.survey', "Interview Form",
        help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job")<commit_msg>[IMP] hr_recruitment: have a default stage for newly created jobs as there is no more column sharing anymore. This ease the use of the application by having a lightweight data to customize.<commit_after># Part of Odoo. See LICENSE file for full copyright and licensing details.

from openerp import _, api, fields, models


class Job(models.Model):
    _inherit = "hr.job"
    _name = "hr.job"
    _inherits = {'mail.alias': 'alias_id'}

    @api.model
    def _default_address_id(self):
        return self.env.user.company_id.partner_id

    address_id = fields.Many2one(
        'res.partner', "Job Location", default=_default_address_id,
        help="Address where employees are working")
    application_ids = fields.One2many('hr.applicant', 'job_id', "Applications")
    application_count = fields.Integer(compute='_compute_application_count', string="Applications")
    manager_id = fields.Many2one(
        'hr.employee', related='department_id.manager_id', string="Department Manager",
        readonly=True, store=True)
    user_id = fields.Many2one('res.users', "Recruitment Responsible", track_visibility='onchange')
    stage_ids = fields.Many2many(
        'hr.recruitment.stage', 'job_stage_rel', 'job_id', 'stage_id',
        'Job Stages',
        default=[(0, 0, {'name': _('New')})])
    document_ids = fields.One2many('ir.attachment', compute='_compute_document_ids', string="Applications")
    documents_count = fields.Integer(compute='_compute_document_ids', string="Documents")
    survey_id = fields.Many2one(
        'survey.survey', "Interview Form",
        help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job")
{'fraction_non_alphanumeric': 0.11378353376503238, 'fraction_numerical': 0.004933703361085414, 'mean_word_length': 4.2920065252854815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1869986', 'n_tokens_mistral': 972, 'n_tokens_neox': 932, 'n_words': 252}