Ajout de la classe phase
authorAlicia FLOREZ <alicflorez@gmail.com>
Thu, 11 Apr 2013 09:56:25 +0000 (11:56 +0200)
committerAlicia FLOREZ <alicflorez@gmail.com>
Thu, 11 Apr 2013 09:56:25 +0000 (11:56 +0200)
projet.py

index ee0c65c..8398167 100644 (file)
--- a/projet.py
+++ b/projet.py
@@ -31,6 +31,9 @@ class Projet(osv.Model):
         "paliers": fields.one2many("projet.palier",
                                    "projet_id",
                                    string="Paliers"),
+        "phases": fields.one2many("projet.phase",
+                                   "projet_id",
+                                   string="Phases"),
         "moe_id": fields.many2one("projet.moe", string="MoEs", required=True),
         "moa_id": fields.many2one("projet.moa", string="MoAs", required=True),
     }
@@ -100,6 +103,17 @@ class Teammember(osv.Model):
     }
 
 
+class Phase(osv.Model):
+    _name = "projet.phase"
+
+    _columns = {
+        "name": fields.char(string="Title", size=64, required=True),
+        "description": fields.text(string="Description"),
+        "projet_id": fields.many2one("projet.projet",
+                                     string="Projet",
+                                     required=True),
+    }
+
 #TODO trouver un nom a cette chose
 class qqch(osv.Model):
     _name = "projet.qqch"