3 from openerp.osv import osv, fields
5 # TODO: finir PalierPhaseWizard
6 class PalierPhaseWizard(osv.TransientModel):
8 _name = "cmmi.palier.phase.wizard"
11 def default_get(self, cr, uid, fields, context=None):
12 result = osv.TransientModel.default_get(self, cr, uid, fields, context=context)
13 palier_id = context.get('palier_id', False)
15 result['palier_id'] = palier_id
20 def _phases_selection(self, cr, uid, context=None):
21 phase_model = self.pool.get("cmmi.phase")
22 palier_phase_model = self.pool.get("cmmi.axes.palier.phase")
24 if context is None or not context.has_key("palier_id"):
30 "palier_id": fields.many2one("cmmi.axes.palier",
33 # "phase_id": fields.selection("cmmi.projet.phase",
36 # domain=[("selectionne", "=", True)]),
37 "phase_id": fields.function(_phases_selection,