From 49c069efb824a37ff8f5c1e3b9c0ea5efd7050eb Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Mon, 22 Apr 2013 10:47:13 +0200 Subject: [PATCH] Rajout de relation entre role_mo et mo --- projet.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projet.py b/projet.py index fc1945c..2567c4f 100644 --- 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"), -- 1.7.10.4