From b54e3bbe44c5278a6824b604fec6098cdde84748 Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Thu, 11 Apr 2013 12:23:10 +0200 Subject: [PATCH] Ajout relation evolution/charge --- projet.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/projet.py b/projet.py index 586fbf1..c8e80e7 100644 --- 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): -- 1.7.10.4