Ajout d'un wizard pour les évolutions
authorAlicia FLOREZ <alicflorez@gmail.com>
Tue, 11 Jun 2013 15:29:27 +0000 (17:29 +0200)
committerAlicia FLOREZ <alicflorez@gmail.com>
Tue, 11 Jun 2013 15:29:27 +0000 (17:29 +0200)
wizards/evolution.py [new file with mode: 0644]

diff --git a/wizards/evolution.py b/wizards/evolution.py
new file mode 100644 (file)
index 0000000..6491073
--- /dev/null
@@ -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),
+    }