Commit 0615ad1c authored by Patrick Colmant's avatar Patrick Colmant

Create staff users from admin

parent 7689f42b
......@@ -8,7 +8,7 @@ from django.contrib.auth.hashers import make_password
from django.contrib.sites.models import Site
from repanier.models import Customer, SiteCustomer
from repanier.models import Producer, SiteProducer
from repanier.models import Staff
from repanier.models import SiteStaff
from repanier.models import Product
from repanier.models import LUT_ProductionMode
from repanier.models import LUT_DepartmentForCustomer
......@@ -192,15 +192,15 @@ def add_all_staffs():
group.user_set.add(user)
customer_responsible = SiteCustomer.objects_without_filter.get(
customer__user__username = row[7], site_id = int(row[0]))
staff_set = Staff.objects_without_filter.filter(user_id = user.id)[:1]
staff_set = SiteStaff.objects_without_filter.filter(user_id = user.id)[:1]
if staff_set:
for staff in staff_set:
staff.login_site_id = int(row[0])
staff.site_id = int(row[0])
staff.customer_responsible_id = customer_responsible.id
staff.save()
else:
staff = Staff.objects.create(user_id = user.id,
login_site_id = int(row[0]),
staff = SiteStaff.objects.create(user_id = user.id,
site_id = int(row[0]),
customer_responsible_id = customer_responsible.id,
long_name = row[6], memo = row[6],
is_active = True)
......
......@@ -155,9 +155,9 @@
46,"repanier","siteproducer","add_siteproducer",,,"x",,
46,"repanier","siteproducer","change_siteproducer",,,"x",,
46,"repanier","siteproducer","delete_siteproducer",,,"x",,
49,"repanier","staff","add_staff","x",,,,
49,"repanier","staff","change_staff","x",,,,
49,"repanier","staff","delete_staff","x",,,,
49,"repanier","sitestaff","add_sitestaff","x",,,,
49,"repanier","sitestaff","change_sitestaff","x",,,,
49,"repanier","sitestaff","delete_sitestaff","x",,,,
39,"reversion","revision","add_revision",,"x",,,
39,"reversion","revision","change_revision",,"x",,,
39,"reversion","revision","delete_revision",,"x",,,
......
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-04 15:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apero_settings.py:16 l_epi_d_ici_settings.py:16
#: lepanierlensois_settings.py:16 producteur_settings.py:16
#: ptidej_settings.py:16 repanier_settings.py:23
msgid "Homepage"
msgstr "Page d'accueil"
#: apero_settings.py:17 l_epi_d_ici_settings.py:17
#: lepanierlensois_settings.py:17 producteur_settings.py:17
#: ptidej_settings.py:17 repanier_settings.py:24
msgid "Secondary Page"
msgstr "Page interne"
#: apero_settings.py:23 l_epi_d_ici_settings.py:23
#: lepanierlensois_settings.py:23 producteur_settings.py:23
#: ptidej_settings.py:23 repanier_settings.py:30
msgid "French"
msgstr "Fançais"
#: apero_settings.py:32 l_epi_d_ici_settings.py:44
#: lepanierlensois_settings.py:32 producteur_settings.py:32
#: ptidej_settings.py:32 repanier_settings.py:51
msgid "Hero"
msgstr "Héro"
#: apero_settings.py:36 l_epi_d_ici_settings.py:48
#: lepanierlensois_settings.py:36 producteur_settings.py:36
#: ptidej_settings.py:36 repanier_settings.py:55
msgid "Column 1"
msgstr "Colonne 1"
#: apero_settings.py:40 l_epi_d_ici_settings.py:52
#: lepanierlensois_settings.py:40 producteur_settings.py:40
#: ptidej_settings.py:40 repanier_settings.py:59
msgid "Column 2"
msgstr "Colonne 2"
#: apero_settings.py:44 l_epi_d_ici_settings.py:56
#: lepanierlensois_settings.py:44 producteur_settings.py:44
#: ptidej_settings.py:44 repanier_settings.py:63
msgid "Column 3"
msgstr "Colonne 3"
#: apero_settings.py:53 l_epi_d_ici_settings.py:65
#: lepanierlensois_settings.py:53 producteur_settings.py:53
#: ptidej_settings.py:53 repanier_settings.py:72
msgid "Content"
msgstr "Contenu"
#: l_epi_d_ici_settings.py:31 repanier_settings.py:38
msgid "Dutch"
msgstr "Néerlandais"
#: l_epi_d_ici_settings.py:37 repanier_settings.py:44
msgid "English"
msgstr "Anglais"
#: templates/base.html:28
msgid "Skip to main content"
msgstr "Aller au contenu principal"
#: templates/base.html:43
msgid "Language"
msgstr "Langue"
#: templates/base.html:51
msgid "Welkom"
msgstr "Bienvenue"
#: templates/base.html:53
msgid "My profile"
msgstr "Mon profil"
#: templates/base.html:54
msgid "Logout"
msgstr "Deconnexion"
#: templates/base.html:59 templates/base.html.py:95 templates/base.html:108
msgid "Login"
msgstr "Connexion"
#: templates/base.html:100 templates/base.html.py:101
msgid "Username"
msgstr "Nom d'utilisateur"
#: templates/base.html:105 templates/base.html.py:106
msgid "Password"
msgstr "Mot de passe"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-04 15:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: collect-static/admin/js/SelectFilter2.js:45
#, c-format
msgid "Available %s"
msgstr "%s disponibles"
#: collect-static/admin/js/SelectFilter2.js:46
#, c-format
msgid ""
"This is the list of available %s. You may choose some by selecting them in "
"the box below and then clicking the \"Choose\" arrow between the two boxes."
msgstr ""
"Ceci est la liste des %s disponibles. Pour en ajouter, veuillez les "
"sélectionner et ensuite cliquer sur la flèche \"Sélectionner\" entre les "
"boîtes."
#: collect-static/admin/js/SelectFilter2.js:53
#, c-format
msgid "Type into this box to filter down the list of available %s."
msgstr "Tapez dans cette boîte pour filtrer la liste des %s disponibles."
#: collect-static/admin/js/SelectFilter2.js:57
msgid "Filter"
msgstr "Filtre"
#: collect-static/admin/js/SelectFilter2.js:61
msgid "Choose all"
msgstr "Tout choisir"
#: collect-static/admin/js/SelectFilter2.js:61
#, c-format
msgid "Click to choose all %s at once."
msgstr "Cliquer pour choisir tous les %s en même temps"
#: collect-static/admin/js/SelectFilter2.js:67
msgid "Choose"
msgstr "Choisir"
#: collect-static/admin/js/SelectFilter2.js:69
msgid "Remove"
msgstr "Supprimer"
#: collect-static/admin/js/SelectFilter2.js:75
#, c-format
msgid "Chosen %s"
msgstr "%s sélectionnés"
#: collect-static/admin/js/SelectFilter2.js:76
#, c-format
msgid ""
"This is the list of chosen %s. You may remove some by selecting them in the "
"box below and then clicking the \"Remove\" arrow between the two boxes."
msgstr ""
"Voici la liste de %s choisis. Pour en supprimer, veuillez les sélectionner "
"et ensuite cliquer sur la flèche \"Supprimer\" entre les boîtes."
#: collect-static/admin/js/SelectFilter2.js:80
msgid "Remove all"
msgstr "Tout supprimer"
#: collect-static/admin/js/SelectFilter2.js:80
#, c-format
msgid "Click to remove all chosen %s at once."
msgstr "Cliquer pour supprimer tous les %s choisis en même temps."
#: collect-static/admin/js/actions.js:18
#: collect-static/admin/js/actions.min.js:1
msgid "%(sel)s of %(cnt)s selected"
msgid_plural "%(sel)s of %(cnt)s selected"
msgstr[0] ""
msgstr[1] ""
#: collect-static/admin/js/actions.js:109
#: collect-static/admin/js/actions.min.js:5
msgid ""
"You have unsaved changes on individual editable fields. If you run an "
"action, your unsaved changes will be lost."
msgstr ""
"Vous voulez quitter sans avoir sauvegarder les modifications. Elles seront "
"perdues."
#: collect-static/admin/js/actions.js:121
#: collect-static/admin/js/actions.min.js:5
msgid ""
"You have selected an action, but you haven't saved your changes to "
"individual fields yet. Please click OK to save. You'll need to re-run the "
"action."
msgstr ""
"Vous voulez sauvegarder sans avoir fait de modification. Ne vous êtes-vous "
"pas trompé de bouton..."
#: collect-static/admin/js/actions.js:123
#: collect-static/admin/js/actions.min.js:6
msgid ""
"You have selected an action, and you haven't made any changes on individual "
"fields. You're probably looking for the Go button rather than the Save "
"button."
msgstr ""
"Vous voulez sauvegarder sans avoir fait de modification. Ne vous êtes-vous "
"pas trompé de bouton..."
#: collect-static/admin/js/calendar.js:8
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"janvier février mars avril mai juin juillet août septembre octobre novembre "
"décembre"
#: collect-static/admin/js/calendar.js:9
msgid "S M T W T F S"
msgstr "D L M M J V S"
#: collect-static/admin/js/collapse.js:8
#: collect-static/admin/js/collapse.js:19
#: collect-static/admin/js/collapse.min.js:1
msgid "Show"
msgstr "Afficher"
#: collect-static/admin/js/collapse.js:16
#: collect-static/admin/js/collapse.min.js:1
msgid "Hide"
msgstr "Masquer"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:52
#: collect-static/admin/js/admin/DateTimeShortcuts.js:88
msgid "Now"
msgstr "Maintenant"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:56
msgid "Clock"
msgstr "Horloge"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:84
msgid "Choose a time"
msgstr "Choisir une heure"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:89
msgid "Midnight"
msgstr "Minuit"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:90
msgid "6 a.m."
msgstr "6 a.m."
#: collect-static/admin/js/admin/DateTimeShortcuts.js:91
msgid "Noon"
msgstr "Midi"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:95
#: collect-static/admin/js/admin/DateTimeShortcuts.js:208
msgid "Cancel"
msgstr "Annuler"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:148
#: collect-static/admin/js/admin/DateTimeShortcuts.js:201
msgid "Today"
msgstr "Aujourd'hui"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:152
msgid "Calendar"
msgstr "Calendrier"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:199
msgid "Yesterday"
msgstr "Hier"
#: collect-static/admin/js/admin/DateTimeShortcuts.js:203
msgid "Tomorrow"
msgstr "Demain"
#: collect-static/cms/js/plugins/cms.changeform.js:60
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Etes-vous sur de changer d'onglet sans avoir d'abord sauvegardé?"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment