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