projects
/
OpenERP
/
cmmi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2359958
)
Ajout à la classe cmmi.evolution.phase une méthode commencer
author
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 13 Jun 2013 09:22:37 +0000
(11:22 +0200)
committer
Alicia FLOREZ
<alicflorez@gmail.com>
Thu, 13 Jun 2013 09:22:37 +0000
(11:22 +0200)
evolution.py
patch
|
blob
|
history
diff --git
a/evolution.py
b/evolution.py
index
f1d7fa7
..
8db0df3
100644
(file)
--- a/
evolution.py
+++ b/
evolution.py
@@
-198,6
+198,23
@@
class Phase(osv.Model):
return osv.Model.create(self, cr, uid, vals, context=context)
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):
# =========================== EVOLUTION CHARGE ============================== #
class Charge(osv.Model):