--- /dev/null
+#-*- coding: utf8 -*-
+
+from openerp.osv import osv, fields
+
+class ProjetChantierWizard(osv.TransientModel):
+
+ _name = "cmmi.projet.chantier.wizard"
\ No newline at end of file
--- /dev/null
+#-*- coding: utf8 -*-
+
+from openerp.osv import osv, fields
+
+# TODO: finir PalierPhaseWizard
+class PalierPhaseWizard(osv.TransientModel):
+
+ _name = "cmmi.palier.phase.wizard"
+
+
+ def default_get(self, cr, uid, fields, context=None):
+ result = osv.TransientModel.default_get(self, cr, uid, fields, context=context)
+ palier_id = context.get('palier_id', False)
+ if palier_id:
+ result['palier_id'] = palier_id
+ return result
+
+
+
+ def _phases_selection(self, cr, uid, context=None):
+ phase_model = self.pool.get("cmmi.phase")
+ palier_phase_model = self.pool.get("cmmi.axes.palier.phase")
+
+ if context is None or not context.has_key("palier_id"):
+ return []
+
+
+
+ _columns = {
+ "palier_id": fields.many2one("cmmi.axes.palier",
+ string="Palier",
+ required=True),
+# "phase_id": fields.selection("cmmi.projet.phase",
+# string="Phase",
+# required=True,
+# domain=[("selectionne", "=", True)]),
+ "phase_id": fields.function(_phases_selection,
+ string="Phase",
+ required=True),
+ }
\ No newline at end of file