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:
202995e
)
Ajout d'un warning pour la fonction 'commencer' de Mesurable, à fixer
author
Alicia FLOREZ
<alicflorez@gmail.com>
Tue, 4 Jun 2013 14:59:54 +0000
(16:59 +0200)
committer
Alicia FLOREZ
<alicflorez@gmail.com>
Tue, 4 Jun 2013 14:59:54 +0000
(16:59 +0200)
axes.py
patch
|
blob
|
history
diff --git
a/axes.py
b/axes.py
index
522dfab
..
6c73ba9
100644
(file)
--- a/
axes.py
+++ b/
axes.py
@@
-70,13
+70,18
@@
class Mesurable(osv.Model):
def commencer(self, cr, uid, ids, context=None):
if type(ids) == list:
if len(ids) != 1:
def commencer(self, cr, uid, ids, context=None):
if type(ids) == list:
if len(ids) != 1:
- return # TODO: message d'avertissement
+ return
ids = ids[0]
palier = self.read(cr, uid, ids, ['date_plan_deb', 'date_plan_fin', 'state'], context)
if palier['state'] != 'cree':
ids = ids[0]
palier = self.read(cr, uid, ids, ['date_plan_deb', 'date_plan_fin', 'state'], context)
if palier['state'] != 'cree':
- return
+ return {
+ 'warning': { # FIXME: ne fonctionne pas
+ 'title' : "Warning: not a list",
+ 'message' : "You cannot have negative number of seats",
+ },
+ }
self.write(
cr,
self.write(
cr,
@@
-334,7
+339,6
@@
class PalierPhase(osv.Model):
return osv.Model.create(self, cr, uid, vals, context=context)
return osv.Model.create(self, cr, uid, vals, context=context)
-
# ================================ CHANTIER ================================= #
class Chantier(osv.Model):
_name = "cmmi.axes.chantier"
# ================================ CHANTIER ================================= #
class Chantier(osv.Model):
_name = "cmmi.axes.chantier"