Rajout de relation entre role_mo et mo
authorAlicia FLOREZ <alicflorez@gmail.com>
Mon, 22 Apr 2013 08:47:13 +0000 (10:47 +0200)
committerAlicia FLOREZ <alicflorez@gmail.com>
Mon, 22 Apr 2013 08:47:13 +0000 (10:47 +0200)
projet.py

index fc1945c..2567c4f 100644 (file)
--- a/projet.py
+++ b/projet.py
@@ -109,6 +109,12 @@ class Role_MO(osv.Model):
         "code": fields.char(string="Code", size=8, required=True),
         "description": fields.text(string="Description"),
         "statut": fields.selection(_statuts, string="Statut"),
+        "structures": fields.one2many("projet.structure",
+                                   "role_mo_id",
+                                   string="MOs"),
+        "mo_ids": fields.one2many("projet.mo",
+                                   "role_mo_id",
+                                   string="MOs"),
     }
 
 class Module(osv.Model):
@@ -306,6 +312,7 @@ class mo(osv.Model):
         "name": fields.char(string="Title"),
         "description": fields.text(string="Description"),
         "chose": fields.selection(_choses, string="Chose", required=True),
+        "role_mo_id": fields.many2one("projet.role_mo", string="Role"),
         "charges": fields.one2many("projet.charge",
                                    "mo_id",
                                    string="Charges"),