From ef65086d1b629a10166d0f1af5a3d32a24ad862e Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Thu, 13 Jun 2013 11:50:47 +0200 Subject: [PATCH] =?utf8?q?=C3=89volution=20:=20ajout=20d'un=20champ=20calcul?= =?utf8?q?=C3=A9=20pour=20les=20charges=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- evolution.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/evolution.py b/evolution.py index 05426ed..485ef59 100644 --- a/evolution.py +++ b/evolution.py @@ -31,6 +31,13 @@ class Evolution(osv.Model): return result + def _get_charge_plan(self, cr, uid, ids, field, arg, context=None): + result = {} + for evo in self.browse(cr, uid, context=context): + result[evo.id] = sum([p.charge_plan for p in evo.phases]) + return result + + _columns = { "pid": fields.integer(string="PID"), "name": fields.char(string="Title", size=64, required=True), -- 1.7.10.4