store=True,
string="Nom de la phase"),
"description": fields.text(string="Description"),
+ "charge_init": fields.integer(string="Charge initiale"),
+ "charge_plan": fields.integer(string="Charge plannifiée"),
"phase_id": fields.many2one("cmmi.axes.palier.phase",
string="Phase"),
"evolution_id": fields.many2one("cmmi.evolution",
return osv.Model.create(self, cr, uid, vals, context=context)
+ def commencer(self, cr, uid, ids, context=None):
+ if type(ids) == list:
+ if len(ids) != 1:
+ return
+ ids = ids[0]
+
+ phase = self.read(cr, uid, ids, ['charge_plan'], context)
+
+ self.write(
+ cr,
+ uid,
+ ids, {
+ 'charge_init' : phase['charge_plan'],
+ },
+ context)
+ return self
+
# =========================== EVOLUTION CHARGE ============================== #
class Charge(osv.Model):