Modification de la relation projet/phase en many2many : création d'une table de relation
[OpenERP/cmmi.git] / axes.py
diff --git a/axes.py b/axes.py
index 9fc7a31..7989c5b 100644 (file)
--- a/axes.py
+++ b/axes.py
@@ -6,7 +6,7 @@ from openerp.osv import osv, fields
 
 
 class Mesurable(osv.Model):
-    _name = "projet.mesurable"
+    _name = "cmmi.axes.mesurable"
 
     _statuts = [("cree", "Crée"), ("encours", "En cours"),
                 ("termine", "Terminé"), ("abandonne", "Abandonné"),
@@ -47,37 +47,37 @@ class Mesurable(osv.Model):
 
 
 class Chantier(osv.Model):
-    _name = "projet.chantier"
+    _name = "cmmi.axes.chantier"
 
-    _inherit = "projet.mesurable"
+    _inherit = "cmmi.axes.mesurable"
 
     _columns = {
-        "projet_id": fields.many2one("projet.projet",
+        "projet_id": fields.many2one("cmmi.projet",
                                      string="Projet",
                                      required=True),
-        "evolutions": fields.one2many("projet.evolution",
+        "evolutions": fields.one2many("cmmi.evolution",
                                       "chantier_id",
                                       string="Evolutions"),
     }
 
 
 class Palier(osv.Model):
-    _name = "projet.palier"
+    _name = "cmmi.axes.palier"
+
+    _inherit = "cmmi.axes.mesurable"
 
     _types_palier = [("normal", "Normal"), ("exceptionnel", "Exceptionnel"),
                      ("correctif", "Correctif"), ("autre", "Autre")]
 
-    _inherit = "projet.mesurable"
-
     _columns = {
         "type_palier": fields.selection(_types_palier, string="Type"),
-        "projet_id": fields.many2one("projet.projet",
+        "projet_id": fields.many2one("cmmi.projet",
                                      string="Projet",
                                      required=True),
-        "evolutions": fields.one2many("projet.evolution",
+        "evolutions": fields.one2many("cmmi.evolution",
                                       "palier_id",
                                       string="Evolutions"),
-        "phases": fields.one2many("projet.phase",
+        "phases": fields.one2many("cmmi.phase",
                                   "palier_id",
                                   string="Phases"),
     }