64910732df7f65d61c08ccc2ef16d35257f61ce1
[OpenERP/cmmi.git] / wizards / evolution.py
1 #-*- coding: utf8 -*-
2 '''
3 '''
4
5 from openerp.osv import osv, fields
6
7 class EvolutionWizard(osv.TransientModel):
8
9     _name = "cmmi.evolution.wizard"
10
11     def default_get(self, cr, uid, fields, context=None):
12         res = osv.TransientModel.default_get(self, cr, uid, fields, context=context)
13         project_id = context.get('project_id', False)
14         if project_id:
15             res['project_id'] = project_id
16         return res
17
18
19     _columns = {
20         "projet_id": fields.many2one("cmmi.projet",
21                                      string="Projet",
22                                      required=True),
23         "palier_id": fields.many2one("cmmi.axes.palier",
24                                      string="Palier",
25                                      required=True),
26         "chantier_id": fields.many2one("cmmi.axes.chantier",
27                                        string="Chantier",
28                                        required=True),
29     }