Rajout fichiers oubliés
authorSébastien CHAZALLET <s.chazallet@gmail.com>
Fri, 3 May 2013 07:19:37 +0000 (09:19 +0200)
committerSébastien CHAZALLET <s.chazallet@gmail.com>
Fri, 3 May 2013 07:19:37 +0000 (09:19 +0200)
description.py [new file with mode: 0644]
evolution.py [new file with mode: 0644]
partner.py [new file with mode: 0644]
phase.py [new file with mode: 0644]

diff --git a/description.py b/description.py
new file mode 100644 (file)
index 0000000..d2e5098
--- /dev/null
@@ -0,0 +1,41 @@
+#-*- coding: utf8 -*-
+'''
+'''
+
+from openerp.osv import osv, fields
+
+
+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"),
+    }
+
+    _order = "id"
diff --git a/evolution.py b/evolution.py
new file mode 100644 (file)
index 0000000..1cb6e65
--- /dev/null
@@ -0,0 +1,61 @@
+#-*- coding: utf8 -*-
+'''
+'''
+
+from openerp.osv import osv, fields
+
+
+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 Charge(osv.Model):
+    _name = "projet.charge"
+
+    _columns = {
+        "name": fields.char(string="Title", size=64, required=True),
+        "description": fields.text(string="Description"),
+        "teammember_id": fields.many2one("projet.teammember",
+                                         string="Team Member",
+                                         required=True),
+        "phase_id": fields.many2one("projet.phase",
+                                    string="Phase",
+                                    required=True),
+        "evolution_id": fields.many2one("projet.evolution",
+                                    string="Evolution",
+                                    required=True),
+        "mo_id": fields.many2one("projet.mo",
+                                 string="Mo"),
+    }
diff --git a/partner.py b/partner.py
new file mode 100644 (file)
index 0000000..4e0a6de
--- /dev/null
@@ -0,0 +1,21 @@
+#-*- coding: utf8 -*-
+'''
+'''
+
+from openerp.osv import osv, fields
+
+
+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"),
+    }
diff --git a/phase.py b/phase.py
new file mode 100644 (file)
index 0000000..035c8c2
--- /dev/null
+++ b/phase.py
@@ -0,0 +1,42 @@
+#-*- coding: utf8 -*-
+'''
+'''
+
+from openerp.osv import osv, fields
+
+
+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"),
+        "type_phase_id": fields.many2one("projet.type_phase",
+                                         string="Type phase"),
+        "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"),
+    }