+ def _chantier_selection(self, cr, uid, context=None):
+ chantier_model = self.pool.get("cmmi.axes.palier")
+
+ if context is None or not context.has_key("project_id"):
+ return
+
+ chantier_ids = chantier_model.search(
+ cr,
+ uid,
+ [('projet_id', '=', context["projet_id"])],
+ context=context
+ )
+
+ print [(c["id"], c["name"]) for c in chantier_model.read(
+ cr,
+ uid,
+ chantier_ids,
+ fields=["id", "name"],
+ context=context
+ )]
+ return [(c["id"], c["name"]) for c in chantier_model.read(
+ cr,
+ uid,
+ chantier_ids,
+ fields=["id", "name"],
+ context=context
+ )]
+
+