- "phases": fields.one2many("projet.phase",
- "projet_id",
- string="Phases"),
- "evolutions":fields.one2many("projet.evolution",
- "projet_id",
- string="Evolutions"),
- "moe_id": fields.many2one("projet.moe", string="MoE", required=True),
- "moa_id": fields.many2one("projet.moa", string="MoA", required=True),
- }
-
-
-class Evolution(osv.Model):
- _name = "projet.evolution"
-
- _priorites = [("incontournable", "Incontournable"),
- ("necessaire", "Nécéssaire"),
- ("utile", "Utile")]
-
- _statuts = [("cree", "Crée"), ("encours", "En cours"),
- ("termine", "Terminé"), ("abandonne", "Abandonné"),
- ("suspendu", "Suspendu")]
-
- _columns = {
- "pid": fields.integer(string="PID"),
- "name": fields.char(string="Title", size=64, required=True),
- "description": fields.text(string="Description"),
- "objectif": fields.text(string="Objectif"),
- "commentaire": fields.text(string="Commentaire"),
- "keywords": fields.text(string="Mots clés"),
- "priorite": fields.selection(_priorites, string="Priorité"),
- "statut": fields.selection(_statuts, string="Statut"),
- "charges": fields.one2many("projet.charge",
- "evolution_id",
- string="Charges"),
- "module_id": fields.many2one("projet.module",
- string="Modules"),
- "chantier_id": fields.many2one("projet.chantier",
- string="Chantier"),
- "palier_id": fields.many2one("projet.palier",
- string="Palier"),
- "phase_id": fields.many2one("projet.phase",
- string="Phase"),
- "projet_id": fields.many2one("projet.projet",
- string="Projet"),
- }
-
-
-class Structure(osv.Model):
- _name = "projet.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("projet.structure", string="Parent_id"),
- "statut": fields.selection(_statuts, string="Statut"),
- "projets": fields.many2many("projet.projet",
- "projet_projet_structure_rel",
- "structures",
- string="Projets"),
- }
-
-
-class Role_MO(osv.Model):
- _name = "projet.role_mo"
-
- _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"),
- "statut": fields.selection(_statuts, string="Statut"),
- }
-
-class Module(osv.Model):
- _name = "projet.module"
-
- _columns = {
- "name": fields.char(string="Title", size=64, required=True),
- "description": fields.text(string="Description"),
- "projet_id": fields.many2one("projet.projet",
- string="Projet",
- required=True),
- "evolutions": fields.one2many("projet.evolution",
- "module_id",
- string="Evolutions")
- }
-
-
-class Domaine(osv.Model):
- _name = "projet.domaine"
-
- _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
-
- _columns = {
- "name": fields.char(string="Title", size=64, required=True),
- "code": fields.char(string="Code", size=8),
- "description": fields.text(string="Description"),
- "ordre": fields.integer(string="Ordre"),
- "parent_id": fields.many2one("projet.domaine", string="Parent_id"),
- "statut": fields.selection(_statuts, string="Statut"),
- "projets": fields.many2many("projet.projet",
- "projet_projet_structure_rel",
- "domaines",
- string="Projets"),
- }
-
-
-class Teammember(osv.Model):
- _name = "projet.teammember"
-
- _inherit = "res.partner"
-
- _columns = {
- "projets": fields.many2many("projet.projet",
- "projet_projet_teammember_rel",
- "team_members",
- string="Projets"),
- "charges": fields.one2many("projet.projet",
- "team_members",
- string="Charges"),
- }
-
-
-class Type_Phase(osv.Model):
- _name = "projet.type_phase"
-
- _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
-
- _columns = {
- "name": fields.char(string="Title", size=64, required=True),
- "description": fields.text(string="Description"),
- "statut": fields.selection(_statuts, string="Statut"),
- }
-
-
-class Phase(osv.Model):
- _name = "projet.phase"
-
- _statuts = [("actif", "Actif"), ("inactif", "Inactif")]
-
-
- _columns = {
- "name": fields.char(string="Title", size=64, required=True),
- "description": fields.text(string="Description"),
- "statut": fields.selection(_statuts, string="Statut"),
- "projet_id": fields.many2one("projet.projet",
- string="Projet",
- required=True),
- "charges": fields.one2many("projet.charge",
- "phase_id",
- string="Charges"),
- "evolutions": fields.one2many("projet.evolution",
- "phase_id",
- string="Evolutions"),
- "palier_id": fields.many2one("projet.palier",
- string="Palier"),
- }
-
-#TODO trouver un nom a cette chose
-class qqch(osv.Model):
- _name = "projet.qqch"
-
- _statuts = [("cree", "Crée"), ("encours", "En cours"),
- ("termine", "Terminé"), ("abandonne", "Abandonné"),
- ("suspendu", "Suspendu"), ("generique", "Générique")]
-
- _columns = {
- "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"),
- "version": fields.char(string="Version", size=16),
- "date_jalon": fields.date(sring="Jalon"),
- "date_init_deb": fields.date(sring="Date initiale début"),
- "date_init_fin": fields.date(sring="Date initiale de fin"),
- "date_plan_deb": fields.date(string="Date plannifiée début"),
- "date_plan_fin": fields.date(string="Date plannifiée de fin"),
- "date_reel_deb": fields.date(string="Data réelle début"),
- "date_reel_fin": fields.date(string="Data réelle fin"),
- }
-
- _sql_constraints = [
- (
- "date_init_deb_before_date_init_fin",
- "CHECK(date_init_deb<> date_init_fin)",
- "The date_init_deb should be previous date_init_fin",
- ),
- (
- "date_plan_deb_before_date_plan_fin",
- "CHECK(date_plan_deb <> date_plan_fin)",
- "The date_plan_deb should be previous date_plan_fin",
- ),
- (
- "date_reel_deb_before_date_reel_fin",
- "CHECK(date_reel_deb<> date_reel_fin)",
- "The date_reel_deb should be previous date_reel_fin",
- ),
- ]
-
-
-class Chantier(osv.Model):
- _name = "projet.chantier"
-
- _inherit = "projet.qqch"
-
- _columns = {
- "projet_id": fields.many2one("projet.projet",
- string="Projet",
- required=True),
- "evolutions": fields.one2many("projet.evolution",
- "chantier_id",
- string="Evolutions"),
- }
-
-
-class Palier(osv.Model):
- _name = "projet.palier"
-
- _types_palier = [("normal", "Normal"), ("exceptionnel", "Exceptionnel"), ("correctif", "Correctif"), ("autre", "Autre")]
-
-
- _inherit = "projet.qqch"
-
- _columns = {
- "type_palier": fields.selection(_types_palier, string="Type"),
- "projet_id": fields.many2one("projet.projet",
- string="Projet",
- required=True),
- "evolutions": fields.one2many("projet.evolution",
- "palier_id",
- string="Evolutions"),
- "phases": fields.one2many("projet.phase",
- "palier_id",