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':
- return
+ return {
+ 'warning': { # FIXME: ne fonctionne pas
+ 'title' : "Warning: not a list",
+ 'message' : "You cannot have negative number of seats",
+ },
+ }
self.write(
cr,
return osv.Model.create(self, cr, uid, vals, context=context)
-
# ================================ CHANTIER ================================= #
class Chantier(osv.Model):
_name = "cmmi.axes.chantier"