From 249319588df9166d240228cd3f85f76553de98fe Mon Sep 17 00:00:00 2001 From: Alicia FLOREZ Date: Tue, 4 Jun 2013 10:07:29 +0200 Subject: [PATCH] Mesurable : changement du champ 'statut' en 'state' --- axes.py | 18 +++++++++--------- views/chantier.xml | 4 ++-- views/palier.xml | 4 ++-- views/projet.xml | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/axes.py b/axes.py index 8b2233d..a48e86a 100644 --- a/axes.py +++ b/axes.py @@ -11,7 +11,7 @@ class Mesurable(osv.Model): _description = "Table de reference des mesusrables." - _statuts = [("cree", "Crée"), ("encours", "En cours"), + _states = [("cree", "Crée"), ("encours", "En cours"), ("termine", "Terminé"), ("abandonne", "Abandonné"), ("suspendu", "Suspendu"), ("generique", "Générique")] @@ -30,7 +30,7 @@ class Mesurable(osv.Model): "name": fields.char(string="Title", size=64, required=True), "description": fields.text(string="Description"), "commentaire": fields.text(string="Commentaire"), - "statut": fields.selection(_statuts, string="Statut"), + "state": fields.selection(_states, string="State"), "version": fields.char(string="Version", size=16), "date_jalon": fields.date(string="Jalon"), "date_init_deb": fields.date(string="Init début"), @@ -45,7 +45,7 @@ class Mesurable(osv.Model): } _defaults = { - "statut": "cree", + "state": "cree", } _sql_constraints = [ @@ -73,9 +73,9 @@ class Mesurable(osv.Model): return # TODO: message d'avertissement ids = ids[0] - palier = self.read(cr, uid, ids, ['date_plan_deb', 'date_plan_fin', 'statut'], context) + palier = self.read(cr, uid, ids, ['date_plan_deb', 'date_plan_fin', 'state'], context) - if palier['statut'] != 'cree': + if palier['state'] != 'cree': return self.write( @@ -84,7 +84,7 @@ class Mesurable(osv.Model): ids, { 'date_init_deb' : palier['date_plan_deb'], 'date_init_fin' : palier['date_plan_fin'], - 'statut': 'encours' + 'state': 'encours' }, context) return self @@ -96,14 +96,14 @@ class Mesurable(osv.Model): return # TODO: message d'avertissement ids = ids[0] - mesurable = self.read(cr, uid, ids, ['statut'], context, context) - if mesurable['statut'] != 'encours': + mesurable = self.read(cr, uid, ids, ['state'], context, context) + if mesurable['state'] != 'encours': return self.write( cr, uid, ids, - {'statut': 'suspendu'}, + {'state': 'suspendu'}, context, ) diff --git a/views/chantier.xml b/views/chantier.xml index ec090c3..1369f09 100644 --- a/views/chantier.xml +++ b/views/chantier.xml @@ -21,8 +21,8 @@