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:
fb8a661
)
Rajout d'une méthode permettant de reprendre un mesurable
author
Alicia FLOREZ
<alicflorez@gmail.com>
Tue, 4 Jun 2013 09:04:21 +0000
(11:04 +0200)
committer
Alicia FLOREZ
<alicflorez@gmail.com>
Tue, 4 Jun 2013 09:04:21 +0000
(11:04 +0200)
axes.py
patch
|
blob
|
history
diff --git
a/axes.py
b/axes.py
index
df046d6
..
56f3463
100644
(file)
--- a/
axes.py
+++ b/
axes.py
@@
-144,9
+144,23
@@
class Mesurable(osv.Model):
)
return self
)
return self
+ def reprendre(self, cr, uid, ids, context=None):
+ if type(ids) == list:
+ if len(ids) != 1:
+ return # TODO: message d'avertissement
+ ids = ids[0]
-
-
+ mesurable = self.read(cr, uid, ids, ['state'], context, context)
+ if mesurable['state'] != 'suspendu':
+ return
+ self.write(
+ cr,
+ uid,
+ ids,
+ {'state': 'encours'},
+ context,
+ )
+ return self
#------------ TRAVAIL CALCUL JOURS OUVRES ------------
@staticmethod
#------------ TRAVAIL CALCUL JOURS OUVRES ------------
@staticmethod