projets
/
auf_rh_dae.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
complement
[auf_rh_dae.git]
/
project
/
dae
/
models.py
diff --git
a/project/dae/models.py
b/project/dae/models.py
index
eb1d5c4
..
f6a0640
100644
(file)
--- a/
project/dae/models.py
+++ b/
project/dae/models.py
@@
-1,8
+1,9
@@
# -=- encoding: utf-8 -=-
# -=- encoding: utf-8 -=-
-from django.db import models
+from django.db import models
+import reversion
import datamaster_modeles.models as ref
import datamaster_modeles.models as ref
-import project.rh_v1.models as rh
+from rh_v1 import models as rh
STATUT_RESIDENCE_CHOICES = (
STATUT_RESIDENCE_CHOICES = (
@@
-153,11
+154,7
@@
class Poste(models.Model):
nom = dossiers[0].complement1
else:
nom = ""
nom = dossiers[0].complement1
else:
nom = ""
-
- if nom == "":
- return None
- else:
- return nom
+ return nom
def get_employe(self):
"""
def get_employe(self):
"""
@@
-204,6
+201,10
@@
class Poste(models.Model):
rh.ValeurPoint.objects.filter(implantation=self.implantation)
super(Subject, self).save(*args, **kwargs)
rh.ValeurPoint.objects.filter(implantation=self.implantation)
super(Subject, self).save(*args, **kwargs)
+# Tester l'enregistrement car les models.py sont importés au complet
+if not reversion.is_registered(Poste):
+ reversion.register(Poste)
+
POSTE_FINANCEMENT_CHOICES = (
('A', 'A - Frais de personnel'),
POSTE_FINANCEMENT_CHOICES = (
('A', 'A - Frais de personnel'),