Correction projet
[OpenERP/cmmi.git] / mo.py
diff --git a/mo.py b/mo.py
index 9c2a81f..1726e40 100644 (file)
--- a/mo.py
+++ b/mo.py
@@ -28,10 +28,10 @@ class RoleMO(osv.Model):
         "type_mo": fields.selection(_types_mo,
                                     string="Type de MO",
                                     required=True),
-        "structures": fields.one2many("projet.structure",
+        "structures": fields.one2many("cmmi.mo.structure",
                                       "role_mo_id",
                                       string="MOs"),
-        "mo_ids": fields.one2many("projet.mo",
+        "mo_ids": fields.one2many("cmmi.mo",
                                   "role_mo_id",
                                   string="MOs"),
     }
@@ -47,15 +47,15 @@ class Mo(osv.Model):
     _columns = {
         "name": fields.char(string="Title"),
         "description": fields.text(string="Description"),
-        "rang": fields.selection(_rangs, string="Chose", required=True),
-        "role_mo_id": fields.many2one("projet.role_mo", string="Role"),
-        "charges": fields.one2many("projet.charge",
-                                   "mo_id",
-                                   string="Charges"),
+        "rang": fields.selection(_rangs, string="Rang", required=True),
+        "role_mo_id": fields.many2one("cmmi.mo.role", string="Role"),
+#        "charges": fields.one2many("cmmi.evolution.charge", # TODO: Faire l'association teammember MO plutôt que MO.
+#                                   "mo_id",
+#                                   string="Charges"),
     }
 
     _defaults = {
-        "chose": "generique"}
+        "rang": "primaire"}
 
 
 class Moe(osv.Model):
@@ -63,18 +63,19 @@ class Moe(osv.Model):
     _inherit = "cmmi.mo"
 
     _columns = {
-        "projets": fields.one2many("projet.projet",
+        "projets": fields.one2many("cmmi.projet",
                                    "moe_id",
                                    string="Projets"),
     }
 
 
+
 class Moa(osv.Model):
     _name = "cmmi.mo.moa"
     _inherit = "cmmi.mo"
 
     _columns = {
-        "projets": fields.one2many("projet.projet",
+        "projets": fields.one2many("cmmi.projet",
                                    "moa_id",
                                    string="Projets"),
     }
@@ -90,10 +91,10 @@ class Structure(osv.Model):
         "name": fields.char(string="Title", size=64, required=True),
         "code": fields.char(string="Code", size=8, required=True),
         "description": fields.text(string="Description"),
-        "parent_id": fields.many2one("projet.structure", string="Parent_id"),
+        "parent_id": fields.many2one("cmmi.mo.structure", string="Parent_id"),
         "statut": fields.selection(_statuts, string="Statut"),
-        "role_mo_id": fields.many2one("projet.role_mo", string="Role MO"),
-        "projets": fields.many2many("projet.projet",
+        "role_mo_id": fields.many2one("cmmi.mo.role", string="Role MO"),
+        "projets": fields.many2many("cmmi.projet",
                                     "projet_projet_structure_rel",
                                     "structures",
                                     string="Projets"),