Rajout fichiers oubliƩs
[OpenERP/cmmi.git] / phase.py
diff --git a/phase.py b/phase.py
new file mode 100644 (file)
index 0000000..035c8c2
--- /dev/null
+++ b/phase.py
@@ -0,0 +1,42 @@
+#-*- coding: utf8 -*-
+'''
+'''
+
+from openerp.osv import osv, fields
+
+
+class Type_Phase(osv.Model):
+    _name = "projet.type_phase"
+
+    _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
+
+    _columns = {
+        "name": fields.char(string="Title", size=64, required=True),
+        "description": fields.text(string="Description"),
+        "statut": fields.selection(_statuts, string="Statut"),
+    }
+
+
+class Phase(osv.Model):
+    _name = "projet.phase"
+
+    _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
+
+    _columns = {
+        "name": fields.char(string="Title", size=64, required=True),
+        "description": fields.text(string="Description"),
+        "statut": fields.selection(_statuts, string="Statut"),
+        "type_phase_id": fields.many2one("projet.type_phase",
+                                         string="Type phase"),
+        "projet_id": fields.many2one("projet.projet",
+                                     string="Projet",
+                                     required=True),
+        "charges": fields.one2many("projet.charge",
+                                   "phase_id",
+                                   string="Charges"),
+        "evolutions": fields.one2many("projet.evolution",
+                                      "phase_id",
+                                      string="Evolutions"),
+        "palier_id": fields.many2one("projet.palier",
+                                     string="Palier"),
+    }