+ "projets": fields.one2many("cmmi.projet",
+ "moa_id",
+ string="Projets"),
+ }
+
+
+class Structure(osv.Model):
+
+ _name = "cmmi.mo.structure"
+
+ _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
+
+ _columns = {
+ "name": fields.char(string="Title", size=64, required=True),
+ "code": fields.char(string="Code", size=8, required=True),
+ "description": fields.text(string="Description"),
+ "parent_id": fields.many2one("cmmi.mo.structure", string="Parent_id"),
+ "statut": fields.selection(_statuts, string="Statut"),
+ "role_mo_id": fields.many2one("cmmi.mo.role", string="Role MO"),
+ "projets": fields.many2many("cmmi.projet",
+ "projet_projet_structure_rel",
+ "structures",
+ string="Projets"),