from gtk import TRUE
class Projet(osv.Model):
+
_name = "projet.projet"
_columns = {
"projet_projet_structure_rel",
"projets",
string="Structures"),
+ "structures_moe": fields.many2many("projet.structure",
+ "projet_projet_structure_rel",
+ "projets",
+ string="Structures",
+ domain=[('role_mo_id.type_mo', '=', "MOE")]),
+ "structures_moa": fields.many2many("projet.structure",
+ "projet_projet_structure_rel",
+ "projets",
+ string="Structures",
+ domain=[('role_mo_id.type_mo', '=', "MOA")]),
"team_members": fields.many2many("projet.teammember",
"projet_projet_teammember_rel",
"projets",
string="Evolutions"),
"moe_id": fields.many2one("projet.moe", string="MoE", required=True),
"moa_id": fields.many2one("projet.moa", string="MoA", required=True),
+ "main_domain": fields.many2one("projet.domaine",
+ string="Domaine principal"),
+ "main_structure": fields.many2one("projet.structure",
+ string="Structure principale"),
}
class Structure(osv.Model):
+
_name = "projet.structure"
_statuts = [("actif", "Actif"), ("inactif", "Inactif")]
_statuts = [("actif", "Actif"), ("inactif", "Inactif")]
+ _types_mo = [("MOE", "MOE"), ("MOA", "MOA")]
_columns = {
"name": fields.char(string="Title", size=64, required=True),
"code": fields.char(string="Code", size=8, required=True),
"description": fields.text(string="Description"),
"statut": fields.selection(_statuts, string="Statut"),
+ "type_mo": fields.selection(_types_mo, string="Type de MO", required=True),
"structures": fields.one2many("projet.structure",
"role_mo_id",
string="MOs"),
"name": fields.char(string="Title", size=64, required=True),
"description": fields.text(string="Description"),
"statut": fields.selection(_statuts, string="Statut"),
- "type_phase_id": fields.many2one("projet.type_phase", string="Type phase"),
+ "type_phase_id": fields.many2one("projet.type_phase",
+ string="Type phase"),
"projet_id": fields.many2one("projet.projet",
string="Projet",
required=True),
class Palier(osv.Model):
_name = "projet.palier"
- _types_palier = [("normal", "Normal"), ("exceptionnel", "Exceptionnel"), ("correctif", "Correctif"), ("autre", "Autre")]
-
+ _types_palier = [("normal", "Normal"), ("exceptionnel", "Exceptionnel"),
+ ("correctif", "Correctif"), ("autre", "Autre")]
_inherit = "projet.qqch"