Ajout relation evolution/charge
authorAlicia FLOREZ <alicflorez@gmail.com>
Thu, 11 Apr 2013 10:23:10 +0000 (12:23 +0200)
committerAlicia FLOREZ <alicflorez@gmail.com>
Thu, 11 Apr 2013 10:23:10 +0000 (12:23 +0200)
projet.py

index 586fbf1..c8e80e7 100644 (file)
--- a/projet.py
+++ b/projet.py
@@ -45,6 +45,9 @@ class Evolution(osv.Model):
     _columns = {
         "name": fields.char(string="Title", size=64, required=True),
         "description": fields.text(string="Description"),
+        "charges": fields.one2many("projet.charge",
+                                   "evolution_id",
+                                   string="Charges"),
     }
 
 
@@ -57,7 +60,7 @@ class Structure(osv.Model):
         "projets": fields.many2many("projet.projet",
                                     "projet_projet_structure_rel",
                                     "structures",
-                                    string="Projets (structure)")
+                                    string="Projets (structure)"),
     }
 
 
@@ -114,7 +117,7 @@ class Phase(osv.Model):
                                      required=True),
         "charges": fields.one2many("projet.charge",
                                    "phase_id",
-                                   string="Charges")
+                                   string="Charges"),
     }
 
 #TODO trouver un nom a cette chose
@@ -188,6 +191,9 @@ class Charge(osv.Model):
         "phase_id": fields.many2one("projet.phase",
                                     string="Phase",
                                     required=True),
+        "evolution_id": fields.many2one("projet.evolution",
+                                    string="Evolution",
+                                    required=True),
     }
 
 class mo(osv.Model):