Rajout fichiers oubliƩs
[OpenERP/cmmi.git] / phase.py
1 #-*- coding: utf8 -*-
2 '''
3 '''
4
5 from openerp.osv import osv, fields
6
7
8 class Type_Phase(osv.Model):
9     _name = "projet.type_phase"
10
11     _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
12
13     _columns = {
14         "name": fields.char(string="Title", size=64, required=True),
15         "description": fields.text(string="Description"),
16         "statut": fields.selection(_statuts, string="Statut"),
17     }
18
19
20 class Phase(osv.Model):
21     _name = "projet.phase"
22
23     _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
24
25     _columns = {
26         "name": fields.char(string="Title", size=64, required=True),
27         "description": fields.text(string="Description"),
28         "statut": fields.selection(_statuts, string="Statut"),
29         "type_phase_id": fields.many2one("projet.type_phase",
30                                          string="Type phase"),
31         "projet_id": fields.many2one("projet.projet",
32                                      string="Projet",
33                                      required=True),
34         "charges": fields.one2many("projet.charge",
35                                    "phase_id",
36                                    string="Charges"),
37         "evolutions": fields.one2many("projet.evolution",
38                                       "phase_id",
39                                       string="Evolutions"),
40         "palier_id": fields.many2one("projet.palier",
41                                      string="Palier"),
42     }