~opencrea/+junk/helpdesk

« back to all changes in this revision

Viewing changes to helpdesk_mgmt/models/helpdesk_ticket_stage.py

  • Committer: joannes
  • Date: 2019-10-22 09:02:37 UTC
  • Revision ID: joannes@debian-20191022090237-vr18rv7p9drjamc4
helpdesk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from odoo import fields, models
 
2
 
 
3
 
 
4
class HelpdeskTicketStage(models.Model):
 
5
    _name = 'helpdesk.ticket.stage'
 
6
    _description = 'Helpdesk Ticket Stage'
 
7
    _order = 'sequence, id'
 
8
 
 
9
    name = fields.Char(string='Stage Name', required=True, translate=True)
 
10
    description = fields.Text(translate=True)
 
11
    sequence = fields.Integer(default=1)
 
12
    active = fields.Boolean(default=True)
 
13
    unattended = fields.Boolean(
 
14
        string='Unattended')
 
15
    closed = fields.Boolean(
 
16
        string='Closed')
 
17
    mail_template_id = fields.Many2one(
 
18
        'mail.template',
 
19
        string='Email Template',
 
20
        domain=[('model', '=', 'helpdesk.ticket')],
 
21
        help="If set an email will be sent to the "
 
22
             "customer when the ticket"
 
23
             "reaches this step.")
 
24
    fold = fields.Boolean(
 
25
        string='Folded in Kanban',
 
26
        help="This stage is folded in the kanban view "
 
27
             "when there are no records in that stage "
 
28
             "to display.")
 
29
    company_id = fields.Many2one(
 
30
        'res.company',
 
31
        string="Company",
 
32
        default=lambda self: self.env['res.company']._company_default_get(
 
33
            'helpdesk.ticket')
 
34
    )