From 18cf081c9ac90e923191414bdf15702d2db9bada Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Tue, 11 Jun 2013 17:29:27 +0200 Subject: [PATCH] =?utf8?q?Ajout=20d'un=20wizard=20pour=20les=20=C3=A9volutio?= =?utf8?q?ns?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- wizards/evolution.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 wizards/evolution.py diff --git a/wizards/evolution.py b/wizards/evolution.py new file mode 100644 index 0000000..6491073 --- /dev/null +++ b/wizards/evolution.py @@ -0,0 +1,29 @@ +#-*- coding: utf8 -*- +''' +''' + +from openerp.osv import osv, fields + +class EvolutionWizard(osv.TransientModel): + + _name = "cmmi.evolution.wizard" + + def default_get(self, cr, uid, fields, context=None): + res = osv.TransientModel.default_get(self, cr, uid, fields, context=context) + project_id = context.get('project_id', False) + if project_id: + res['project_id'] = project_id + return res + + + _columns = { + "projet_id": fields.many2one("cmmi.projet", + string="Projet", + required=True), + "palier_id": fields.many2one("cmmi.axes.palier", + string="Palier", + required=True), + "chantier_id": fields.many2one("cmmi.axes.chantier", + string="Chantier", + required=True), + } -- 1.7.10.4