[MERGE]merge with main branch.

bzr revid: vme@tinyerp.com-20111209055746-gel0yr4aum3gb76k
This commit is contained in:
Vidhin Mehta (OpenERP) 2011-12-09 11:27:46 +05:30
commit 57aecd6bb1
29 changed files with 942 additions and 467 deletions

View File

@ -103,6 +103,7 @@ class WebClient(openerpweb.Controller):
addons = self.server_wide_modules(req)
else:
addons = addons.split(',')
r = []
for addon in addons:
manifest = openerpweb.addons_manifest.get(addon, None)
if not manifest:
@ -112,7 +113,8 @@ class WebClient(openerpweb.Controller):
globlist = manifest.get(key, [])
for pattern in globlist:
for path in glob.glob(os.path.normpath(os.path.join(addons_path, addon, pattern))):
yield path, path[len(addons_path):]
r.append( (path, path[len(addons_path):]))
return r
def manifest_list(self, req, mods, extension):
if not req.debug:

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-12-03 10:42+0000\n"
"PO-Revision-Date: 2011-12-08 09:00+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:58+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web/static/src/js/data_import.js:73
#: addons/web/static/src/js/view_form.js:2799
@ -25,15 +25,15 @@ msgstr "Schließen"
#: addons/web/static/src/js/data_import.js:74
msgid "Import File"
msgstr ""
msgstr "Datei importieren"
#: addons/web/static/src/js/data_import.js:109
msgid "External ID"
msgstr ""
msgstr "Externe ID"
#: addons/web/static/src/js/search.js:231
msgid "Filter Entry"
msgstr ""
msgstr "Eintrag filtern"
#: addons/web/static/src/js/search.js:233
#: addons/web/static/src/js/search.js:274 addons/web/static/src/xml/base.xml:0
@ -43,40 +43,40 @@ msgstr "Abbrechen"
#: addons/web/static/src/js/search.js:236
#: addons/web/static/src/js/search.js:277
msgid "OK"
msgstr ""
msgstr "OK"
#: addons/web/static/src/js/search.js:272 addons/web/static/src/xml/base.xml:0
msgid "Add to Dashboard"
msgstr ""
msgstr "Zur Anzeigetafel hinzufügen"
#: addons/web/static/src/js/search.js:401
msgid "Invalid Search"
msgstr ""
msgstr "Ungültige Suche"
#: addons/web/static/src/js/search.js:401
msgid "triggered from search view"
msgstr ""
msgstr "von der Suchansicht ausgelöst"
#: addons/web/static/src/js/search.js:483
#, python-format
msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s"
msgstr ""
msgstr "Ungültiger Wert für Feld %(fieldname)s: [%(value)s] is %(message)s"
#: addons/web/static/src/js/search.js:804
msgid "not a valid integer"
msgstr ""
msgstr "ungültiger Trigger"
#: addons/web/static/src/js/search.js:818
msgid "not a valid number"
msgstr ""
msgstr "ungültige Nummer"
#: addons/web/static/src/js/search.js:1234
msgid "contains"
msgstr ""
msgstr "enthält"
#: addons/web/static/src/js/search.js:1235
msgid "doesn't contain"
msgstr ""
msgstr "enthält nicht"
#: addons/web/static/src/js/search.js:1236
#: addons/web/static/src/js/search.js:1251
@ -84,7 +84,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1291
#: addons/web/static/src/js/search.js:1313
msgid "is equal to"
msgstr ""
msgstr "Ist gleich"
#: addons/web/static/src/js/search.js:1237
#: addons/web/static/src/js/search.js:1252
@ -92,7 +92,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1292
#: addons/web/static/src/js/search.js:1314
msgid "is not equal to"
msgstr ""
msgstr "ist ungleich"
#: addons/web/static/src/js/search.js:1238
#: addons/web/static/src/js/search.js:1253
@ -100,7 +100,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1293
#: addons/web/static/src/js/search.js:1315
msgid "greater than"
msgstr ""
msgstr "ist größer als"
#: addons/web/static/src/js/search.js:1239
#: addons/web/static/src/js/search.js:1254
@ -108,7 +108,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1294
#: addons/web/static/src/js/search.js:1316
msgid "less than"
msgstr ""
msgstr "ist kleiner als"
#: addons/web/static/src/js/search.js:1240
#: addons/web/static/src/js/search.js:1255
@ -116,7 +116,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1295
#: addons/web/static/src/js/search.js:1317
msgid "greater or equal than"
msgstr ""
msgstr "ist größer oder gleich als"
#: addons/web/static/src/js/search.js:1241
#: addons/web/static/src/js/search.js:1256
@ -124,36 +124,36 @@ msgstr ""
#: addons/web/static/src/js/search.js:1296
#: addons/web/static/src/js/search.js:1318
msgid "less or equal than"
msgstr ""
msgstr "ist kleiner oder gleich als"
#: addons/web/static/src/js/search.js:1307
#: addons/web/static/src/js/search.js:1332
msgid "is"
msgstr ""
msgstr "ist"
#: addons/web/static/src/js/search.js:1333
msgid "is not"
msgstr ""
msgstr "ist nicht"
#: addons/web/static/src/js/search.js:1346
msgid "is true"
msgstr ""
msgstr "ist Wahr"
#: addons/web/static/src/js/search.js:1347
msgid "is false"
msgstr ""
msgstr "ist falsch"
#: addons/web/static/src/js/view_editor.js:182
msgid "Do you really want to remove this view?"
msgstr ""
msgstr "Möchten Sie diese Sicht wirklich entfernen"
#: addons/web/static/src/js/view_editor.js:454
msgid "Do you really want to remove this node?"
msgstr ""
msgstr "Möchten Sie diesen Knoten wirklich entfernen?"
#: addons/web/static/src/js/view_form.js:433
msgid "Do you really want to delete this record?"
msgstr ""
msgstr "Möchten Sie diesen Datensatz wirklich löschen?"
#: addons/web/static/src/js/view_form.js:448
msgid ""
@ -163,7 +163,7 @@ msgstr ""
#: addons/web/static/src/js/view_form.js:656
msgid "Attachments"
msgstr ""
msgstr "Anhänge"
#: addons/web/static/src/js/view_form.js:1880
msgid "<em>   Search More...</em>"
@ -185,52 +185,52 @@ msgstr "Erzeugen"
#: addons/web/static/src/js/view_list.js:263
msgid "Unlimited"
msgstr ""
msgstr "Unbegrenzt"
#: addons/web/static/src/js/view_list.js:483
msgid "Do you really want to remove these records?"
msgstr ""
msgstr "Möchten Sie diese Datensätze wirklich löschen"
#: addons/web/static/src/js/view_list.js:1159
msgid "Undefined"
msgstr ""
msgstr "Undefiniert"
#: addons/web/static/src/js/views.js:482
msgid "Search: "
msgstr ""
msgstr "Suche: "
#: addons/web/static/src/js/views.js:581
msgid "Customize"
msgstr ""
msgstr "Anpassen"
#: addons/web/static/src/js/views.js:584
msgid "Manage Views"
msgstr ""
msgstr "Ansichten verwalten"
#: addons/web/static/src/js/views.js:586 addons/web/static/src/js/views.js:590
#: addons/web/static/src/js/views.js:595
msgid "Manage views of the current object"
msgstr ""
msgstr "Ansichten des aktuelllen Objekts verwalten"
#: addons/web/static/src/js/views.js:588
msgid "Edit Workflow"
msgstr ""
msgstr "Workflow bearbeiten"
#: addons/web/static/src/js/views.js:593
msgid "Customize Object"
msgstr ""
msgstr "Objekt anpassen"
#: addons/web/static/src/js/views.js:597
msgid "Translate"
msgstr ""
msgstr "Übersetzen"
#: addons/web/static/src/js/views.js:599
msgid "Technical translation"
msgstr ""
msgstr "Technische Übersetzung"
#: addons/web/static/src/js/views.js:604
msgid "Other Options"
msgstr ""
msgstr "Weitere Optionen"
#: addons/web/static/src/js/views.js:607 addons/web/static/src/xml/base.xml:0
msgid "Import"
@ -242,19 +242,19 @@ msgstr "Export"
#: addons/web/static/src/js/views.js:613
msgid "View Log"
msgstr ""
msgstr "Protokoll anzeigen"
#: addons/web/static/src/js/views.js:622
msgid "Reports"
msgstr ""
msgstr "Berichte"
#: addons/web/static/src/js/views.js:622
msgid "Actions"
msgstr ""
msgstr "Aktionen"
#: addons/web/static/src/js/views.js:622
msgid "Links"
msgstr ""
msgstr "Links"
#: addons/web/static/src/js/views.js:702
msgid "You must choose at least one record."
@ -278,11 +278,11 @@ msgstr "x"
#: addons/web/static/src/xml/base.xml:0
msgid "#{title}"
msgstr ""
msgstr "#{title}"
#: addons/web/static/src/xml/base.xml:0
msgid "#{text}"
msgstr ""
msgstr "#{text}"
#: addons/web/static/src/xml/base.xml:0
msgid "Powered by"
@ -493,7 +493,7 @@ msgstr "Ansicht#"
#: addons/web/static/src/xml/base.xml:0
msgid "More…"
msgstr ""
msgstr "Mehr ..."
#: addons/web/static/src/xml/base.xml:0
msgid "Field"
@ -525,7 +525,7 @@ msgstr "Ende"
#: addons/web/static/src/xml/base.xml:0
msgid "Edit"
msgstr ""
msgstr "Bearbeiten"
#: addons/web/static/src/xml/base.xml:0
msgid "Duplicate"
@ -561,11 +561,11 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "\""
msgstr ""
msgstr "\""
#: addons/web/static/src/xml/base.xml:0
msgid "Modifiers:"
msgstr ""
msgstr "Modifikatoren:"
#: addons/web/static/src/xml/base.xml:0
msgid "?"
@ -577,31 +577,31 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Field:"
msgstr ""
msgstr "Feld:"
#: addons/web/static/src/xml/base.xml:0
msgid "Object:"
msgstr ""
msgstr "Objekt:"
#: addons/web/static/src/xml/base.xml:0
msgid "Type:"
msgstr ""
msgstr "Typ:"
#: addons/web/static/src/xml/base.xml:0
msgid "Widget:"
msgstr ""
msgstr "Bedienelement:"
#: addons/web/static/src/xml/base.xml:0
msgid "Size:"
msgstr ""
msgstr "Größe:"
#: addons/web/static/src/xml/base.xml:0
msgid "Context:"
msgstr ""
msgstr "Kontext:"
#: addons/web/static/src/xml/base.xml:0
msgid "Domain:"
msgstr ""
msgstr "Domäne:"
#: addons/web/static/src/xml/base.xml:0
msgid "On change:"
@ -609,23 +609,23 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Relation:"
msgstr ""
msgstr "Relation:"
#: addons/web/static/src/xml/base.xml:0
msgid "Selection:"
msgstr ""
msgstr "Auswahl:"
#: addons/web/static/src/xml/base.xml:0
msgid "["
msgstr ""
msgstr "["
#: addons/web/static/src/xml/base.xml:0
msgid "]"
msgstr ""
msgstr "]"
#: addons/web/static/src/xml/base.xml:0
msgid "-"
msgstr ""
msgstr "-"
#: addons/web/static/src/xml/base.xml:0
msgid "#"
@ -665,7 +665,7 @@ msgstr "Leeren"
#: addons/web/static/src/xml/base.xml:0
msgid "Button"
msgstr ""
msgstr "Schaltfläche"
#: addons/web/static/src/xml/base.xml:0
msgid "(no string)"
@ -673,19 +673,19 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Special:"
msgstr ""
msgstr "Spezial:"
#: addons/web/static/src/xml/base.xml:0
msgid "Button Type:"
msgstr ""
msgstr "Schaltfläche Typ:"
#: addons/web/static/src/xml/base.xml:0
msgid "Method:"
msgstr ""
msgstr "Methode:"
#: addons/web/static/src/xml/base.xml:0
msgid "Action ID:"
msgstr ""
msgstr "Aktion ID:"
#: addons/web/static/src/xml/base.xml:0
msgid "Advanced Filter"
@ -709,11 +709,11 @@ msgstr "(Jeder existierende Filter mit dem selben Namen wird ersetzt)"
#: addons/web/static/src/xml/base.xml:0
msgid "Select Dashboard to add this filter to:"
msgstr ""
msgstr "Anzeigetafel wählen, zu der der Filter hinzugefügt werden soll"
#: addons/web/static/src/xml/base.xml:0
msgid "Title of new Dashboard item:"
msgstr ""
msgstr "Titel des neuen Elements einer Anzeigetafel"
#: addons/web/static/src/xml/base.xml:0
msgid "Any of the following conditions must match"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-11-28 14:05+0000\n"
"PO-Revision-Date: 2011-12-08 16:49+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:58+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web/static/src/js/data_import.js:73
#: addons/web/static/src/js/view_form.js:2799
@ -25,15 +25,15 @@ msgstr "Zatvori"
#: addons/web/static/src/js/data_import.js:74
msgid "Import File"
msgstr ""
msgstr "Uvezi datoteku"
#: addons/web/static/src/js/data_import.js:109
msgid "External ID"
msgstr ""
msgstr "External ID"
#: addons/web/static/src/js/search.js:231
msgid "Filter Entry"
msgstr ""
msgstr "Upis filtera"
#: addons/web/static/src/js/search.js:233
#: addons/web/static/src/js/search.js:274 addons/web/static/src/xml/base.xml:0
@ -43,11 +43,11 @@ msgstr "Odustani"
#: addons/web/static/src/js/search.js:236
#: addons/web/static/src/js/search.js:277
msgid "OK"
msgstr ""
msgstr "U redu"
#: addons/web/static/src/js/search.js:272 addons/web/static/src/xml/base.xml:0
msgid "Add to Dashboard"
msgstr ""
msgstr "Dodaj na nadzornu ploču"
#: addons/web/static/src/js/search.js:401
msgid "Invalid Search"
@ -61,22 +61,23 @@ msgstr ""
#, python-format
msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s"
msgstr ""
"neispravna vrijednost za polje %(fieldname)s: [%(value)s] is %(message)s"
#: addons/web/static/src/js/search.js:804
msgid "not a valid integer"
msgstr ""
msgstr "nije cijeli broj"
#: addons/web/static/src/js/search.js:818
msgid "not a valid number"
msgstr ""
msgstr "nije ispravan broj"
#: addons/web/static/src/js/search.js:1234
msgid "contains"
msgstr ""
msgstr "sadrži"
#: addons/web/static/src/js/search.js:1235
msgid "doesn't contain"
msgstr ""
msgstr "ne sadrži"
#: addons/web/static/src/js/search.js:1236
#: addons/web/static/src/js/search.js:1251
@ -84,7 +85,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1291
#: addons/web/static/src/js/search.js:1313
msgid "is equal to"
msgstr ""
msgstr "je jednako"
#: addons/web/static/src/js/search.js:1237
#: addons/web/static/src/js/search.js:1252
@ -92,7 +93,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1292
#: addons/web/static/src/js/search.js:1314
msgid "is not equal to"
msgstr ""
msgstr "nije jednako"
#: addons/web/static/src/js/search.js:1238
#: addons/web/static/src/js/search.js:1253
@ -100,7 +101,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1293
#: addons/web/static/src/js/search.js:1315
msgid "greater than"
msgstr ""
msgstr "veće od"
#: addons/web/static/src/js/search.js:1239
#: addons/web/static/src/js/search.js:1254
@ -108,7 +109,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1294
#: addons/web/static/src/js/search.js:1316
msgid "less than"
msgstr ""
msgstr "manje od"
#: addons/web/static/src/js/search.js:1240
#: addons/web/static/src/js/search.js:1255
@ -116,7 +117,7 @@ msgstr ""
#: addons/web/static/src/js/search.js:1295
#: addons/web/static/src/js/search.js:1317
msgid "greater or equal than"
msgstr ""
msgstr "veće ili jednako"
#: addons/web/static/src/js/search.js:1241
#: addons/web/static/src/js/search.js:1256
@ -124,36 +125,36 @@ msgstr ""
#: addons/web/static/src/js/search.js:1296
#: addons/web/static/src/js/search.js:1318
msgid "less or equal than"
msgstr ""
msgstr "manje ili jednako"
#: addons/web/static/src/js/search.js:1307
#: addons/web/static/src/js/search.js:1332
msgid "is"
msgstr ""
msgstr "je"
#: addons/web/static/src/js/search.js:1333
msgid "is not"
msgstr ""
msgstr "nije"
#: addons/web/static/src/js/search.js:1346
msgid "is true"
msgstr ""
msgstr "je istina"
#: addons/web/static/src/js/search.js:1347
msgid "is false"
msgstr ""
msgstr "je laž"
#: addons/web/static/src/js/view_editor.js:182
msgid "Do you really want to remove this view?"
msgstr ""
msgstr "Želite ukloniti ovaj pogled?"
#: addons/web/static/src/js/view_editor.js:454
msgid "Do you really want to remove this node?"
msgstr ""
msgstr "Da li zaista želite obrisati ovaj čvor?"
#: addons/web/static/src/js/view_form.js:433
msgid "Do you really want to delete this record?"
msgstr ""
msgstr "Da li zaista želite obrisati ovaj zapis?"
#: addons/web/static/src/js/view_form.js:448
msgid ""
@ -162,7 +163,7 @@ msgstr "Upozorenje, zapis je promjenjen. Promjene se neće zapisati."
#: addons/web/static/src/js/view_form.js:656
msgid "Attachments"
msgstr ""
msgstr "Privici"
#: addons/web/static/src/js/view_form.js:1880
msgid "<em>   Search More...</em>"
@ -184,52 +185,52 @@ msgstr "Kreiraj"
#: addons/web/static/src/js/view_list.js:263
msgid "Unlimited"
msgstr ""
msgstr "Neograničen"
#: addons/web/static/src/js/view_list.js:483
msgid "Do you really want to remove these records?"
msgstr ""
msgstr "Zaista želite obrisati ove zapise?"
#: addons/web/static/src/js/view_list.js:1159
msgid "Undefined"
msgstr ""
msgstr "Nedefiniran"
#: addons/web/static/src/js/views.js:482
msgid "Search: "
msgstr ""
msgstr "Traži: "
#: addons/web/static/src/js/views.js:581
msgid "Customize"
msgstr ""
msgstr "Prilagodi"
#: addons/web/static/src/js/views.js:584
msgid "Manage Views"
msgstr ""
msgstr "Upravljanje pogledima"
#: addons/web/static/src/js/views.js:586 addons/web/static/src/js/views.js:590
#: addons/web/static/src/js/views.js:595
msgid "Manage views of the current object"
msgstr ""
msgstr "Pogledi trenutnog objekta"
#: addons/web/static/src/js/views.js:588
msgid "Edit Workflow"
msgstr ""
msgstr "Uredi tijek rada"
#: addons/web/static/src/js/views.js:593
msgid "Customize Object"
msgstr ""
msgstr "Prilagodi objekt"
#: addons/web/static/src/js/views.js:597
msgid "Translate"
msgstr ""
msgstr "Prevedi"
#: addons/web/static/src/js/views.js:599
msgid "Technical translation"
msgstr ""
msgstr "Tehnički prijevod"
#: addons/web/static/src/js/views.js:604
msgid "Other Options"
msgstr ""
msgstr "Ostale postavke"
#: addons/web/static/src/js/views.js:607 addons/web/static/src/xml/base.xml:0
msgid "Import"
@ -241,19 +242,19 @@ msgstr "Izvoz"
#: addons/web/static/src/js/views.js:613
msgid "View Log"
msgstr ""
msgstr "Prikaži zapisnik"
#: addons/web/static/src/js/views.js:622
msgid "Reports"
msgstr ""
msgstr "Izvještaji"
#: addons/web/static/src/js/views.js:622
msgid "Actions"
msgstr ""
msgstr "Akcije"
#: addons/web/static/src/js/views.js:622
msgid "Links"
msgstr ""
msgstr "Poveznice"
#: addons/web/static/src/js/views.js:702
msgid "You must choose at least one record."
@ -277,23 +278,23 @@ msgstr "x"
#: addons/web/static/src/xml/base.xml:0
msgid "#{title}"
msgstr ""
msgstr "#{title}"
#: addons/web/static/src/xml/base.xml:0
msgid "#{text}"
msgstr ""
msgstr "#{text}"
#: addons/web/static/src/xml/base.xml:0
msgid "Powered by"
msgstr ""
msgstr "Powered by"
#: addons/web/static/src/xml/base.xml:0
msgid "openerp.com"
msgstr ""
msgstr "openerp.com"
#: addons/web/static/src/xml/base.xml:0
msgid "."
msgstr ""
msgstr "."
#: addons/web/static/src/xml/base.xml:0
msgid "Loading..."
@ -444,11 +445,11 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "("
msgstr ""
msgstr "("
#: addons/web/static/src/xml/base.xml:0
msgid ")"
msgstr ""
msgstr ")"
#: addons/web/static/src/xml/base.xml:0
msgid "LOGOUT"
@ -456,19 +457,19 @@ msgstr "ODJAVA"
#: addons/web/static/src/xml/base.xml:0
msgid "&laquo;"
msgstr ""
msgstr "&laquo;"
#: addons/web/static/src/xml/base.xml:0
msgid "&raquo;"
msgstr ""
msgstr "&raquo;"
#: addons/web/static/src/xml/base.xml:0
msgid "oe_secondary_menu_item"
msgstr ""
msgstr "oe_secondary_menu_item"
#: addons/web/static/src/xml/base.xml:0
msgid "oe_secondary_submenu_item"
msgstr ""
msgstr "oe_secondary_submenu_item"
#: addons/web/static/src/xml/base.xml:0
msgid "Hide this tip"
@ -484,7 +485,7 @@ msgstr "Pogled#"
#: addons/web/static/src/xml/base.xml:0
msgid "More…"
msgstr ""
msgstr "Više..."
#: addons/web/static/src/xml/base.xml:0
msgid "Field"
@ -516,7 +517,7 @@ msgstr "Posljednji"
#: addons/web/static/src/xml/base.xml:0
msgid "Edit"
msgstr ""
msgstr "Uredi"
#: addons/web/static/src/xml/base.xml:0
msgid "Duplicate"
@ -552,7 +553,7 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "\""
msgstr ""
msgstr "\""
#: addons/web/static/src/xml/base.xml:0
msgid "Modifiers:"
@ -564,51 +565,51 @@ msgstr "?"
#: addons/web/static/src/xml/base.xml:0
msgid "(nolabel)"
msgstr ""
msgstr "(bezlabele)"
#: addons/web/static/src/xml/base.xml:0
msgid "Field:"
msgstr ""
msgstr "Polje:"
#: addons/web/static/src/xml/base.xml:0
msgid "Object:"
msgstr ""
msgstr "Objekt:"
#: addons/web/static/src/xml/base.xml:0
msgid "Type:"
msgstr ""
msgstr "Tip:"
#: addons/web/static/src/xml/base.xml:0
msgid "Widget:"
msgstr ""
msgstr "Widget:"
#: addons/web/static/src/xml/base.xml:0
msgid "Size:"
msgstr ""
msgstr "Veličina"
#: addons/web/static/src/xml/base.xml:0
msgid "Context:"
msgstr ""
msgstr "Kontekst:"
#: addons/web/static/src/xml/base.xml:0
msgid "Domain:"
msgstr ""
msgstr "Domena:"
#: addons/web/static/src/xml/base.xml:0
msgid "On change:"
msgstr ""
msgstr "On change:"
#: addons/web/static/src/xml/base.xml:0
msgid "Relation:"
msgstr ""
msgstr "Relacija:"
#: addons/web/static/src/xml/base.xml:0
msgid "Selection:"
msgstr ""
msgstr "Odabir:"
#: addons/web/static/src/xml/base.xml:0
msgid "["
msgstr ""
msgstr "["
#: addons/web/static/src/xml/base.xml:0
msgid "]"
@ -616,7 +617,7 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "-"
msgstr ""
msgstr "-"
#: addons/web/static/src/xml/base.xml:0
msgid "#"
@ -656,7 +657,7 @@ msgstr "Očisti"
#: addons/web/static/src/xml/base.xml:0
msgid "Button"
msgstr ""
msgstr "Gumb"
#: addons/web/static/src/xml/base.xml:0
msgid "(no string)"
@ -672,11 +673,11 @@ msgstr ""
#: addons/web/static/src/xml/base.xml:0
msgid "Method:"
msgstr ""
msgstr "Metoda:"
#: addons/web/static/src/xml/base.xml:0
msgid "Action ID:"
msgstr ""
msgstr "Action ID:"
#: addons/web/static/src/xml/base.xml:0
msgid "Advanced Filter"

View File

@ -768,13 +768,17 @@ label.error {
padding: 1px 2px;
}
.openerp .oe-record-delete button{
.openerp .oe-record-delete button,
.openerp button.oe-edit-row-save {
border: none;
height: 12px;
width: 12px;
background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent;
cursor: pointer;
}
.openerp button.oe-edit-row-save {
background-image: url('/web/static/src/img/icons/save-document.png');
}
/* Could use :not selectors if they were supported by MSIE8... */
.openerp .oe-listview tbody td {
@ -952,13 +956,19 @@ label.error {
background: #f9f9f9;
}
/* Unedit Form */
.openerp .field_char, .openerp .field_date, .openerp .field_float, .openerp .oe_form_field_many2one a {
.openerp .field_char,
.openerp .field_date,
.openerp .field_float,
.openerp .field_selection,
.openerp .oe_form_field_many2one a,
.openerp .oe_form_field_reference a{
vertical-align: middle;
padding-top: 3px;
font-size: 90%;
color: #222;
}
.openerp .oe_form_field_many2one a {
.openerp .oe_form_field_many2one a,
.openerp .oe_form_field_reference a {
color: #9A0404;
line-height: 12px;
}
@ -1061,6 +1071,7 @@ label.error {
.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help {
margin: 4px 0 0 3px;
white-space: nowrap;
}
.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */
margin: 3px 0 0 3px;
@ -1153,9 +1164,9 @@ label.error {
.openerp .oe_input_icon {
position: absolute;
cursor: pointer;
right: 5px;
top: 3px;
z-index: 2;
right: 4px;
top: 5px;
z-index: 1;
}
.openerp .oe_datepicker_container {
position: absolute;
@ -1164,7 +1175,6 @@ label.error {
display: none;
}
.openerp .oe_datepicker_root {
position: relative;
display: inline-block;
}
.openerp .oe_forms.oe_frame .oe_datepicker_root {
@ -1178,13 +1188,6 @@ label.error {
right: 5px;
top: 3px;
}
.openerp img.oe_field_translate {
margin-left: -21px;
vertical-align: top;
cursor: pointer;
position: relative;
top: 4px;
}
.openerp .oe_trad_field.touched {
border: 1px solid green !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -837,7 +837,8 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
init: function(parent, element_id, secondary_menu_id) {
this._super(parent, element_id);
this.secondary_menu_id = secondary_menu_id;
this.$secondary_menu = $("#" + secondary_menu_id).hide();
this.$secondary_menu = $("#" + secondary_menu_id);
this.$secondary_menu.hide();
this.menu = false;
this.folded = false;
if (window.localStorage) {
@ -911,7 +912,10 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
sub_menu_visible = $sub_menu.is(':visible');
this.$secondary_menu.find('.oe_secondary_menu').hide();
$('.active', this.$element.add(this.$secondary_menu.show())).removeClass('active');
if (this.$secondary_menu.hasClass('oe_folded')) {
this.$secondary_menu.show();
}
$('.active', this.$element.add(this.$secondary_menu)).removeClass('active');
$main_menu.add($clicked_menu).add($sub_menu).addClass('active');
if (!(this.folded && manual)) {
@ -1076,15 +1080,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
// TODO: add actual loading if there is url state to unpack, test on window.location.hash
// not logged in
if (!this.session.uid) { return; }
var ds = new openerp.web.DataSetSearch(this, 'res.users');
ds.read_ids([this.session.uid], ['action_id'], function (users) {
var home_action = users[0].action_id;
if (!home_action) {
self.default_home();
return;
}
self.execute_home_action(home_action[0], ds);
})
self.action_manager.do_action({type: 'ir.actions.client', tag: 'default_home'});
},
default_home: function () {
},

View File

@ -356,8 +356,8 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
},
on_button_save: function() {
var self = this;
return this.do_save().then(function() {
self.do_prev_view();
return this.do_save().then(function(result) {
self.do_prev_view(result.created);
});
},
on_button_cancel: function() {
@ -423,22 +423,22 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
self.on_invalid();
return $.Deferred().reject();
} else {
var save_deferral;
if (!self.datarecord.id) {
openerp.log("FormView(", self, ") : About to create", values);
return self.dataset.create(values).pipe(function(r) {
save_deferral = self.dataset.create(values).pipe(function(r) {
return self.on_created(r, undefined, prepend_on_create);
}).then(success);
}, null);
} else if (_.isEmpty(values)) {
openerp.log("FormView(", self, ") : Nothing to save");
if (success) {
success();
}
save_deferral = $.Deferred().resolve({}).promise();
} else {
openerp.log("FormView(", self, ") : About to save", values);
return self.dataset.write(self.datarecord.id, values, {}).pipe(function(r) {
save_deferral = self.dataset.write(self.datarecord.id, values, {}).pipe(function(r) {
return self.on_saved(r);
}).then(success);
}, null);
}
return save_deferral.then(success);
}
} catch (e) {
console.error(e);
@ -1582,7 +1582,7 @@ openerp.web.form.FieldSelection = openerp.web.form.Field.extend({
.change(function () { ischanging = true; })
.click(function () { ischanging = false; })
.keyup(function (e) {
if (e.which !== 13 || !ischanging) { return; }
if (!_([13, 38, 40]).contains(e.which) || !ischanging) { return; }
e.stopPropagation();
ischanging = false;
});
@ -1790,13 +1790,16 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
minLength: 0,
delay: 0
});
// used to correct a bug when selecting an element by pushing 'enter' in an editable list
// Don't propagate KEY_UP and KEY_DOWN event to parent (for editable
// list), don't propagate KEY_RETURN either when the autocomplete
// control is currently open
this.$input.keyup(function(e) {
if (e.which === 13) {
if (isSelecting)
e.stopPropagation();
if (e.which === 38 || e.which === 40) {
e.stopPropagation();
} else if (isSelecting && e.which === 13) {
e.stopPropagation();
isSelecting = false;
}
isSelecting = false;
});
},
// autocomplete component content handling
@ -2449,7 +2452,9 @@ openerp.web.form.Many2ManyListView = openerp.web.ListView.extend(/** @lends open
do_activate_record: function(index, id) {
var self = this;
var pop = new openerp.web.form.FormOpenPopup(this);
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {});
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {
readonly: this.widget_parent.is_readonly()
});
pop.on_write_completed.add_last(function() {
self.reload_content();
});
@ -2782,6 +2787,7 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
name: 'selection',
widget: 'selection'
}});
this.reference_ready = true;
this.selection.on_value_changed.add_last(this.on_selection_changed);
this.m2o = new openerp.web.form.FieldMany2One(this, { attrs: {
name: 'm2o',
@ -2791,10 +2797,12 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
on_nop: function() {
},
on_selection_changed: function() {
var sel = this.selection.get_value();
this.m2o.field.relation = sel;
this.m2o.set_value(null);
this.m2o.$element.toggle(sel !== false);
if (this.reference_ready) {
var sel = this.selection.get_value();
this.m2o.field.relation = sel;
this.m2o.set_value(null);
this.m2o.$element.toggle(sel !== false);
}
},
start: function() {
this._super();
@ -2809,11 +2817,18 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
},
set_value: function(value) {
this._super(value);
this.reference_ready = false;
var vals = [], sel_val, m2o_val;
if (typeof(value) === 'string') {
var vals = value.split(',');
this.selection.set_value(vals[0]);
this.m2o.set_value(parseInt(vals[1], 10));
vals = value.split(',');
}
sel_val = vals[0] || false;
m2o_val = vals[1] ? parseInt(vals[1], 10) : false;
this.selection.set_value(sel_val);
this.m2o.field.relation = sel_val;
this.m2o.set_value(m2o_val);
this.m2o.$element.toggle(sel_val !== false);
this.reference_ready = true;
},
get_value: function() {
var model = this.selection.get_value(),

View File

@ -391,7 +391,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
* @param {String} [view="page"] the view type to switch to
*/
select_record:function (index, view) {
view = view || 'page';
view = view || index == null ? 'form' : 'page';
this.dataset.index = index;
_.delay(_.bind(function () {
this.do_switch_view(view);
@ -1279,6 +1279,7 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
list.$current.sortable({
axis: 'y',
items: '> tr[data-id]',
containment: 'parent',
stop: function (event, ui) {
var to_move = list.records.get(ui.item.data('id')),
target_id = ui.item.prev().data('id'),

View File

@ -3,8 +3,11 @@
* @namespace
*/
openerp.web.list_editable = function (openerp) {
// https://developer.mozilla.org/en/DOM/KeyboardEvent#Virtual_key_codes
var KEY_RETURN = 13,
KEY_ESCAPE = 27;
KEY_ESCAPE = 27,
KEY_UP = 38,
KEY_DOWN = 40;
var QWeb = openerp.web.qweb;
// editability status of list rows
@ -166,6 +169,68 @@ openerp.web.list_editable = function (openerp) {
view.arch.attrs.col = 2 * view.arch.children.length;
return view;
},
on_row_keyup: function (e) {
var self = this;
switch (e.which) {
case KEY_RETURN:
this.save_row().then(function (result) {
if (result.created) {
self.new_record();
return;
}
var next_record_id,
next_record = self.records.at(
self.records.indexOf(result.edited_record) + 1);
if (next_record) {
next_record_id = next_record.get('id');
self.dataset.index = _(self.dataset.ids)
.indexOf(next_record_id);
} else {
self.dataset.index = 0;
next_record_id = self.records.at(0).get('id');
}
self.edit_record(next_record_id);
});
break;
case KEY_DOWN:
this.save_row().then(function (result) {
var next_record_id,
next_record = self.records.at(
self.records.indexOf(result.edited_record) + 1);
if (next_record) {
next_record_id = next_record.get('id');
self.dataset.index = _(self.dataset.ids)
.indexOf(next_record_id);
} else {
self.dataset.index = 0;
next_record_id = self.records.at(0).get('id');
}
self.edit_record(next_record_id);
});
break;
case KEY_UP:
this.save_row().then(function (result) {
var previous_record_id,
previous_record = self.records.at(
self.records.indexOf(result.edited_record) - 1);
if (previous_record) {
previous_record_id = previous_record.get('id');
self.dataset.index = _(self.dataset.ids)
.indexOf(previous_record_id);
} else {
var last = self.records.length - 1;
self.dataset.index = last;
previous_record_id = self.records.at(last).get('id');
}
self.edit_record(previous_record_id);
});
break;
case KEY_ESCAPE:
this.cancel_edition();
break;
}
},
render_row_as_form: function (row) {
var self = this;
this.cancel_pending_edition().then(function () {
@ -179,24 +244,10 @@ openerp.web.list_editable = function (openerp) {
.delegate('button.oe-edit-row-save', 'click', function () {
self.save_row();
})
.delegate('button.oe-edit-row-cancel', 'click', function () {
self.cancel_edition();
})
.delegate('button', 'keyup', function (e) {
e.stopImmediatePropagation();
})
.keyup(function (e) {
switch (e.which) {
case KEY_RETURN:
self.save_row(true);
break;
case KEY_ESCAPE:
self.cancel_edition();
break;
default:
return;
}
});
.keyup($.proxy(self, 'on_row_keyup'));
if (row) {
$new_row.replaceAll(row);
} else if (self.options.editable) {
@ -231,20 +282,18 @@ openerp.web.list_editable = function (openerp) {
.addClass('oe-field-cell')
.removeAttr('width')
.end()
.find('td:first').removeClass('oe-field-cell').end()
.find('td:last').removeClass('oe-field-cell').end();
if (self.options.selectable) {
$new_row.prepend('<td>');
}
// pad in case of groupby
_(self.columns).each(function (column) {
if (column.meta) {
$new_row.prepend('<td>');
}
});
// Add columns for the cancel and save buttons, if
// there are none in the list
if (!self.options.selectable) {
self.view.pad_columns(
1, {except: $new_row, position: 'before'});
}
// Add column for the save, if
// there is none in the list
if (!self.options.deletable) {
self.view.pad_columns(
1, {except: $new_row});
@ -274,53 +323,43 @@ openerp.web.list_editable = function (openerp) {
});
},
/**
* Saves the current row, and triggers the edition of its following
* sibling if asked.
* Saves the current row, and returns a Deferred resolving to an object
* with the following properties:
*
* @param {Boolean} [edit_next=false] should the next row become editable
* @returns {$.Deferred}
* ``created``
* Boolean flag indicating whether the record saved was being created
* (``true`` or edited (``false``)
* ``edited_record``
* The result of saving the record (either the newly created record,
* or the post-edition record), after insertion in the Collection if
* needs be.
*
* @returns {$.Deferred<{created: Boolean, edited_record: Record}>}
*/
save_row: function (edit_next) {
save_row: function () {
//noinspection JSPotentiallyInvalidConstructorUsage
var self = this, done = $.Deferred();
this.edition_form.do_save(function (result) {
if (result.created && !self.edition_id) {
self.records.add({id: result.result},
{at: self.options.editable === 'top' ? 0 : null});
self.edition_id = result.result;
}
var edited_record = self.records.get(self.edition_id),
next_record = self.records.at(
self.records.indexOf(edited_record) + 1);
return this.edition_form
.do_save(null, this.options.editable === 'top')
.pipe(function (result) {
if (result.created && !self.edition_id) {
self.records.add({id: result.result},
{at: self.options.editable === 'top' ? 0 : null});
self.edition_id = result.result;
}
var edited_record = self.records.get(self.edition_id);
$.when(
self.handle_onwrite(self.edition_id),
self.cancel_pending_edition().then(function () {
$(self).trigger('saved', [self.dataset]);
if (!edit_next) {
return;
}
if (result.created) {
self.new_record();
return;
}
var next_record_id;
if (next_record) {
next_record_id = next_record.get('id');
self.dataset.index = _(self.dataset.ids)
.indexOf(next_record_id);
} else {
self.dataset.index = 0;
next_record_id = self.records.at(0).get('id');
}
self.edit_record(next_record_id);
})).then(function () {
done.resolve();
});
}, this.options.editable === 'top').fail(function () {
done.reject();
});
return done.promise();
return $.when(
self.handle_onwrite(self.edition_id),
self.cancel_pending_edition().then(function () {
$(self).trigger('saved', [self.dataset]);
})).pipe(function () {
return {
created: result.created || false,
edited_record: edited_record
};
}, null);
}, null);
},
/**
* If the current list is being edited, ensures it's saved

View File

@ -7,7 +7,7 @@ openerp.web.page = function (openerp) {
form_template: "PageView",
init: function () {
this._super.apply(this, arguments);
this.registry = openerp.web.form.readonly;
this.registry = openerp.web.page.readonly;
},
on_loaded: function(data) {
this._super(data);
@ -55,10 +55,14 @@ openerp.web.page = function (openerp) {
return def.promise();
}
});
openerp.web.form.FieldReadonly = openerp.web.form.Field.extend({
/** @namespace */
openerp.web.page = {};
openerp.web.page.FieldReadonly = openerp.web.form.Field.extend({
});
openerp.web.form.FieldCharReadonly = openerp.web.form.FieldReadonly.extend({
openerp.web.page.FieldCharReadonly = openerp.web.page.FieldReadonly.extend({
template: 'FieldChar.readonly',
init: function(view, node) {
this._super(view, node);
@ -74,7 +78,7 @@ openerp.web.page = function (openerp) {
return show_value;
}
});
openerp.web.form.FieldURIReadonly = openerp.web.form.FieldCharReadonly.extend({
openerp.web.page.FieldURIReadonly = openerp.web.page.FieldCharReadonly.extend({
template: 'FieldURI.readonly',
scheme: null,
set_value: function (value) {
@ -84,10 +88,10 @@ openerp.web.page = function (openerp) {
.text(displayed);
}
});
openerp.web.form.FieldEmailReadonly = openerp.web.form.FieldURIReadonly.extend({
openerp.web.page.FieldEmailReadonly = openerp.web.page.FieldURIReadonly.extend({
scheme: 'mailto'
});
openerp.web.form.FieldUrlReadonly = openerp.web.form.FieldURIReadonly.extend({
openerp.web.page.FieldUrlReadonly = openerp.web.page.FieldURIReadonly.extend({
set_value: function (value) {
var s = /(\w+):(.+)/.exec(value);
if (!s || !(s[1] === 'http' || s[1] === 'https')) { return; }
@ -95,12 +99,12 @@ openerp.web.page = function (openerp) {
this._super(s[2]);
}
});
openerp.web.form.FieldBooleanReadonly = openerp.web.form.FieldCharReadonly.extend({
openerp.web.page.FieldBooleanReadonly = openerp.web.page.FieldCharReadonly.extend({
set_value: function (value) {
this._super(value ? '\u2611' : '\u2610');
}
});
openerp.web.form.FieldSelectionReadonly = openerp.web.form.FieldReadonly.extend({
openerp.web.page.FieldSelectionReadonly = openerp.web.page.FieldReadonly.extend({
template: 'FieldChar.readonly',
init: function(view, node) {
// lifted straight from r/w version
@ -123,7 +127,7 @@ openerp.web.page = function (openerp) {
this.$element.find('div').text(option ? option[1] : this.values[0][1]);
}
});
openerp.web.form.FieldMany2OneReadonly = openerp.web.form.FieldURIReadonly.extend({
openerp.web.page.FieldMany2OneReadonly = openerp.web.page.FieldURIReadonly.extend({
set_value: function (value) {
value = value || null;
this.invalid = false;
@ -168,29 +172,47 @@ openerp.web.page = function (openerp) {
}
}
});
openerp.web.form.FieldMany2ManyReadonly = openerp.web.form.FieldMany2Many.extend({
openerp.web.page.FieldReferenceReadonly = openerp.web.page.FieldMany2OneReadonly.extend({
set_value: function (value) {
if (!value) {
return this._super(null);
}
var reference = value.split(',');
this.field.relation = reference[0];
var id = parseInt(reference[1], 10);
return this._super(id);
},
get_value: function () {
if (!this.value) {
return null;
}
return _.str.sprintf('%s,%d', this.field.relation, this.value[0]);
}
});
openerp.web.page.FieldMany2ManyReadonly = openerp.web.form.FieldMany2Many.extend({
force_readonly: true
});
openerp.web.form.FieldOne2ManyReadonly = openerp.web.form.FieldOne2Many.extend({
openerp.web.page.FieldOne2ManyReadonly = openerp.web.form.FieldOne2Many.extend({
force_readonly: true
});
openerp.web.form.readonly = openerp.web.form.widgets.clone({
'char': 'openerp.web.form.FieldCharReadonly',
'email': 'openerp.web.form.FieldEmailReadonly',
'url': 'openerp.web.form.FieldUrlReadonly',
'text': 'openerp.web.form.FieldCharReadonly',
'text_wiki' : 'openerp.web.form.FieldCharReadonly',
'date': 'openerp.web.form.FieldCharReadonly',
'datetime': 'openerp.web.form.FieldCharReadonly',
'selection' : 'openerp.web.form.FieldSelectionReadonly',
'many2one': 'openerp.web.form.FieldMany2OneReadonly',
'many2many' : 'openerp.web.form.FieldMany2ManyReadonly',
'one2many' : 'openerp.web.form.FieldOne2ManyReadonly',
'one2many_list' : 'openerp.web.form.FieldOne2ManyReadonly',
'boolean': 'openerp.web.form.FieldBooleanReadonly',
'float': 'openerp.web.form.FieldCharReadonly',
'integer': 'openerp.web.form.FieldCharReadonly',
'float_time': 'openerp.web.form.FieldCharReadonly'
openerp.web.page.readonly = openerp.web.form.widgets.clone({
'char': 'openerp.web.page.FieldCharReadonly',
'email': 'openerp.web.page.FieldEmailReadonly',
'url': 'openerp.web.page.FieldUrlReadonly',
'text': 'openerp.web.page.FieldCharReadonly',
'text_wiki' : 'openerp.web.page.FieldCharReadonly',
'date': 'openerp.web.page.FieldCharReadonly',
'datetime': 'openerp.web.page.FieldCharReadonly',
'selection' : 'openerp.web.page.FieldSelectionReadonly',
'many2one': 'openerp.web.page.FieldMany2OneReadonly',
'many2many' : 'openerp.web.page.FieldMany2ManyReadonly',
'one2many' : 'openerp.web.page.FieldOne2ManyReadonly',
'one2many_list' : 'openerp.web.page.FieldOne2ManyReadonly',
'reference': 'openerp.web.page.FieldReferenceReadonly',
'boolean': 'openerp.web.page.FieldBooleanReadonly',
'float': 'openerp.web.page.FieldCharReadonly',
'integer': 'openerp.web.page.FieldCharReadonly',
'float_time': 'openerp.web.page.FieldCharReadonly'
});
};

View File

@ -75,6 +75,10 @@ session.web.ActionManager = session.web.Widget.extend({
}
},
do_action: function(action, on_close) {
if (!action.type) {
console.error("No type for action", action);
return;
}
var type = action.type.replace(/\./g,'_');
var popup = action.target === 'new';
action.flags = _.extend({
@ -85,7 +89,7 @@ session.web.ActionManager = session.web.Widget.extend({
pager : !popup
}, action.flags || {});
if (!(type in this)) {
console.log("Action manager can't handle action of type " + action.type, action);
console.error("Action manager can't handle action of type " + action.type, action);
return;
}
return this[type](action, on_close);
@ -197,7 +201,6 @@ session.web.ViewManager = session.web.Widget.extend(/** @lends session.web.View
this.views = {};
this.flags = this.flags || {};
this.registry = session.web.views;
this.views = [];
this.views_history = [];
},
render: function() {
@ -301,10 +304,23 @@ session.web.ViewManager = session.web.Widget.extend(/** @lends session.web.View
});
return view_promise;
},
on_prev_view: function () {
this.views_history.pop();
/**
* Returns to the view preceding the caller view in this manager's
* navigation history (the navigation history is appended to via
* on_mode_switch)
*
* @param {Boolean} [created=false] returning from a creation
* @returns {$.Deferred} switching end signal
*/
on_prev_view: function (created) {
var current_view = this.views_history.pop();
var previous_view = this.views_history[this.views_history.length - 1];
this.on_mode_switch(previous_view, true);
// APR special case: "If creation mode from list (and only from a list),
// after saving, go to page view (don't come back in list)"
if (created && current_view === 'form' && previous_view === 'list') {
return this.on_mode_switch('page');
}
return this.on_mode_switch(previous_view, true);
},
/**
* Sets up the current viewmanager's search view.
@ -393,10 +409,16 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
}
this.dataset = dataset;
this.flags = this.action.flags || {};
if (action.res_model == 'board.board' && action.views.length == 1 && action.views) {
// Not elegant but allows to avoid form chrome (pager, save/new
// buttons, sidebar, ...) displaying
this.flags.display_title = this.flags.search_view = this.flags.pager = this.flags.sidebar = this.flags.action_buttons = false;
if (action.res_model == 'board.board' && action.view_mode === 'form') {
// Special case for Dashboards
_.extend(this.flags, {
views_switcher : false,
display_title : false,
search_view : false,
pager : false,
sidebar : false,
action_buttons : false
});
}
// setup storage for session-wise menu hiding
@ -431,10 +453,11 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
var manager_ready = $.when(searchview_loaded, main_view_loaded);
this.$element.find('.oe_get_xml_view').click(function () {
// TODO: add search view?
$('<pre>').text(session.web.json_node_to_xml(
self.views[self.active_view].controller.fields_view.arch, true))
.dialog({ width: '95%'});
var view = self.views[self.active_view].controller,
view_id = view.fields_view.view_id;
if (view_id) {
view.on_sidebar_edit_resource('ir.ui.view', view_id);
}
});
if (this.action.help && !this.flags.low_profile) {
var Users = new session.web.DataSet(self, 'res.users'),
@ -480,7 +503,7 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
self.$element.find('.oe-view-manager-logs:first')
.addClass('oe-folded').removeClass('oe-has-more')
.find('ul').empty();
self.shortcut_check(self.views[view_type])
self.shortcut_check(self.views[view_type]);
});
return $.when(
switched
@ -595,25 +618,29 @@ session.web.Sidebar = session.web.Widget.extend({
});
},
add_default_sections: function() {
var self = this,
view = this.widget_parent,
view_manager = view.widget_parent,
action = view_manager.action;
if (this.session.uid === 1) {
this.add_section(_t('Customize'), 'customize');
this.add_items('customize', [
{
label: _t("Manage Views"),
callback: this.widget_parent.on_sidebar_manage_views,
callback: view.on_sidebar_manage_views,
title: _t("Manage views of the current object")
}, {
label: _t("Edit Workflow"),
callback: this.widget_parent.on_sidebar_edit_workflow,
callback: view.on_sidebar_edit_workflow,
title: _t("Manage views of the current object"),
classname: 'oe_hide oe_sidebar_edit_workflow'
}, {
label: _t("Customize Object"),
callback: this.widget_parent.on_sidebar_customize_object,
callback: view.on_sidebar_customize_object,
title: _t("Manage views of the current object")
}, {
label: _t("Translate"),
callback: this.widget_parent.on_sidebar_translate,
callback: view.on_sidebar_translate,
title: _t("Technical translation")
}
]);
@ -623,16 +650,36 @@ session.web.Sidebar = session.web.Widget.extend({
this.add_items('other', [
{
label: _t("Import"),
callback: this.widget_parent.on_sidebar_import
callback: view.on_sidebar_import
}, {
label: _t("Export"),
callback: this.widget_parent.on_sidebar_export
callback: view.on_sidebar_export
}, {
label: _t("View Log"),
callback: this.widget_parent.on_sidebar_view_log,
callback: view.on_sidebar_view_log,
classname: 'oe_hide oe_sidebar_view_log'
}
]);
if (session.connection.debug) {
this.add_section("Debug", 'debug');
if (action && action.id) {
this.add_items('debug', [{
label: "Edit Action",
callback: function() {
view.on_sidebar_edit_resource(action.type, action.id);
}
}]);
}
if (view_manager.searchview && view_manager.searchview.view_id) {
this.add_items('debug', [{
label: "Edit SearchView",
callback: function() {
view.on_sidebar_edit_resource('ir.ui.view', view_manager.searchview.view_id);
}
}]);
}
}
},
add_toolbar: function(toolbar) {
@ -993,7 +1040,14 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
console.log('Todo');
},
on_sidebar_customize_object: function() {
console.log('Todo');
var self = this;
this.rpc('/web/dataset/search_read', {
model: 'ir.model',
fields: ['id'],
domain: [['model', '=', self.dataset.model]]
}, function (result) {
self.on_sidebar_edit_resource('ir.model', result.ids[0]);
});
},
on_sidebar_import: function() {
var import_view = new session.web.DataImport(this, this.dataset);
@ -1013,6 +1067,27 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
view_mode : "list"
});
},
on_sidebar_edit_resource: function(model, id, domain) {
var action = {
res_model : model,
type : 'ir.actions.act_window',
view_type : 'form',
view_mode : 'form',
target : 'new',
flags : {
action_buttons : true
}
}
if (id) {
action.res_id = id,
action.views = [[false, 'form']];
} else if (domain) {
action.views = [[false, 'list'], [false, 'form']];
action.domain = domain;
action.flags.views_switcher = true;
}
this.do_action(action);
},
on_sidebar_view_log: function() {
},
sidebar_context: function () {

View File

@ -460,7 +460,7 @@
</tr>
</t>
<t t-jquery="h2.oe_view_title" t-operation="prepend">
<a class="oe-shortcut-toggle" title="Add / Remove Shortcut..."
<a t-if="self.flags.display_title !== false" class="oe-shortcut-toggle" title="Add / Remove Shortcut..."
href="javascript: void(0)"> </a>
</t>
<t t-jquery="h2.oe_view_title" t-operation="after">
@ -726,7 +726,6 @@
<t t-foreach="row" t-as="td">
<td t-att-colspan="td.colspan gt 1 ? td.colspan : undefined"
t-att-width="td.width"
t-att-nowrap="td.nowrap or td.is_field_m2o? 'true' : undefined"
t-att-valign="td.table ? 'top' : undefined"
t-attf-class="oe_form_frame_cell #{td.classname} #{td.element_class}"
>
@ -863,15 +862,15 @@
t-att-name="widget.name"
t-att-id="widget.element_id"
t-attf-class="field_#{widget.type} #{_(['integer', 'float', 'float_time']).contains(widget.type) ? 'oe-number' : ''}"
t-attf-style="width: #{widget.field.translate ? '99' : '100'}%"
style="width: 100%"
/>
<img class="oe_field_translate" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
<img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
</t>
<t t-name="FieldChar.readonly">
<div
t-att-id="widget.element_id"
t-attf-class="field_#{widget.type} #{_(['integer', 'float', 'float_time']).contains(widget.type) ? 'oe-number' : ''}"
t-attf-style="width: #{widget.field.translate ? '99' : '100'}%">
style="width: 100%">
</div>
</t>
<t t-name="FieldURI.readonly">
@ -880,7 +879,7 @@
<t t-name="FieldEmail">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="100%">
<td width="100%" style="position: relative">
<t t-call="FieldChar"/>
</td>
<td width="16">
@ -894,7 +893,7 @@
<t t-name="FieldUrl">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="100%">
<td width="100%" style="position: relative">
<t t-call="FieldChar"/>
</td>
<td width="16">
@ -910,9 +909,9 @@
t-att-name="widget.name"
t-att-id="widget.element_id"
t-attf-class="field_#{widget.type}"
t-attf-style="width: #{widget.field.translate ? '99' : '100'}%"
style="width: 100%"
></textarea>
<img class="oe_field_translate" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
<img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" src="/web/static/src/img/icons/terp-translate.png" width="16" height="16" border="0"/>
</t>
<t t-name="web.datetimepicker">
<div class="oe_datepicker_root">
@ -1413,10 +1412,8 @@
.replaceAll(this)
.after($(document.createElement('td')).append(
$(document.createElement('button')).attr({
'class': 'oe-edit-row-save', 'type': 'button'}).text('Save')))
.before($(document.createElement('td')).append(
$(document.createElement('button')).attr({
'class': 'oe-edit-row-cancel', 'type': 'button'}).text('Cancel')))
'class': 'oe-edit-row-save', 'type': 'button'})
.html(' ')))
.unwrap();
</t>
</t>

View File

@ -8,22 +8,22 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-10-10 12:36+0000\n"
"Last-Translator: Felix Schubert <Unknown>\n"
"PO-Revision-Date: 2011-12-08 08:35+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:59+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_calendar/static/src/js/calendar.js:409
msgid "Responsible"
msgstr ""
msgstr "Verantwortlich"
#: addons/web_calendar/static/src/js/calendar.js:438
msgid "Navigator"
msgstr ""
msgstr "Browser"
#: addons/web_calendar/static/src/xml/web_calendar.xml:0
msgid "&nbsp;"

View File

@ -8,22 +8,22 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-11-28 12:04+0000\n"
"PO-Revision-Date: 2011-12-08 16:34+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:59+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_calendar/static/src/js/calendar.js:409
msgid "Responsible"
msgstr ""
msgstr "Odgovoran"
#: addons/web_calendar/static/src/js/calendar.js:438
msgid "Navigator"
msgstr ""
msgstr "Navigator"
#: addons/web_calendar/static/src/xml/web_calendar.xml:0
msgid "&nbsp;"

View File

@ -0,0 +1,30 @@
# Ukrainian translation for openerp-web
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-12-07 16:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Ukrainian <uk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-08 06:06+0000\n"
"X-Generator: Launchpad (build 14443)\n"
#: addons/web_calendar/static/src/js/calendar.js:409
msgid "Responsible"
msgstr ""
#: addons/web_calendar/static/src/js/calendar.js:438
msgid "Navigator"
msgstr ""
#: addons/web_calendar/static/src/xml/web_calendar.xml:0
msgid "&nbsp;"
msgstr ""

View File

@ -25,6 +25,7 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
'#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00',
'#905000', '#9b0000', '#840067', '#510090', '#0000c9', '#009b00', '#9abe00', '#ffc900' ];
this.color_map = {};
this.last_search = [];
},
start: function() {
this._super();
@ -106,9 +107,12 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
scheduler.config.api_date = "%Y-%m-%d %H:%i";
scheduler.config.multi_day = true; //Multi day events are not rendered in daily and weekly views
scheduler.config.start_on_monday = true;
scheduler.config.time_step = 15;
scheduler.config.scroll_hour = 8;
scheduler.config.drag_resize = true;
scheduler.config.drag_create = true;
scheduler.config.mark_now = true;
scheduler.config.day_date = '%l %j';
scheduler.init('openerp_scheduler', null, this.mode || 'month');
@ -120,6 +124,7 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
scheduler.attachEvent('onEventDeleted', this.do_delete_event);
scheduler.attachEvent('onEventChanged', this.do_save_event);
scheduler.attachEvent('onDblClick', this.do_edit_event);
scheduler.attachEvent('onClick', this.do_edit_event);
scheduler.attachEvent('onBeforeLightbox', this.do_edit_event);
if (this.options.sidebar) {
@ -162,9 +167,6 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
for (var e = 0; e < events.length; e++) {
var evt = events[e];
if (!evt[this.date_start]) {
if (this.session.debug) {
this.do_warn("Start date is not defined for event :", evt['id']);
}
break;
}
@ -333,10 +335,14 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({
return data;
},
do_search: function(domain, context, group_by) {
var self = this;
var self = this
if (!domain) {
this.do_search.apply(this, this.last_search);
} else {
this.last_search = [domain, context, group_by];
}
scheduler.clearAll();
$.when(this.has_been_loaded).then(function() {
// TODO: handle non-empty results.group_by with read_group
self.dataset.read_slice(_.keys(self.fields), {
offset: 0,
limit: self.limit

View File

@ -1,6 +1,5 @@
<template>
<t t-name="CalendarView">
<h3 class="title"><t t-esc="fields_view.arch.attrs.string"/></h3>
<div id="openerp_scheduler" class="dhx_cal_container" style="height: 600px;">
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button">&amp;nbsp;</div>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-10-10 12:38+0000\n"
"Last-Translator: Felix Schubert <Unknown>\n"
"PO-Revision-Date: 2011-12-08 08:36+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:59+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Reset"
@ -49,24 +49,24 @@ msgstr "%"
msgid ""
"Click on the functionalites listed below to launch them and configure your "
"system"
msgstr ""
msgstr "Wähle untenstehende Funktionen um diese zu konfigurieren"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Welcome to your new OpenERP instance."
msgstr ""
msgstr "Willkommen zu Ihrer neuen OpenERP Instanz."
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Remember to bookmark this page."
msgstr ""
msgstr "Denken Sie daran ein Lesezeichen für diese Seite zu setzen."
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Remember your login:"
msgstr ""
msgstr "Anmeldung speichern"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Choose the first OpenERP Application you want to install.."
msgstr ""
msgstr "Wählen Sie die erste OpenERP Anwendung die Sie installieren möchten."
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Install"
msgstr ""
msgstr "Installiere"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-11-28 12:07+0000\n"
"PO-Revision-Date: 2011-12-08 16:33+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:59+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Reset"
@ -31,7 +31,7 @@ msgstr "Promijeni raspored"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "&nbsp;"
msgstr ""
msgstr "&nbsp;"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Choose dashboard layout"
@ -53,20 +53,20 @@ msgstr ""
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Welcome to your new OpenERP instance."
msgstr ""
msgstr "Dobrodošli u Vašu novu OpenERP instancu"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Remember to bookmark this page."
msgstr ""
msgstr "Zabilježite ovu stranicu."
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Remember your login:"
msgstr ""
msgstr "Vaše korisničko ime:"
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Choose the first OpenERP Application you want to install.."
msgstr ""
msgstr "Instalirajte prvu OpenERP aplikaciju."
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
msgid "Install"
msgstr ""
msgstr "Instaliraj"

View File

@ -3,7 +3,7 @@
}
.openerp .oe-dashboard-links {
text-align: right;
margin: -2em 0.4em 1em 0;
margin: 0 4px 6px 0;
}
.openerp .oe-dashboard-action {
margin: 0 0.5em 0.5em 0;
@ -309,3 +309,62 @@
.oe-static-home-tile-text p {
margin: 0.5em 0;
}
.openerp .oe_app_tiles {
width: 980px;
}
.openerp .oe_app_tiles h1, .openerp .oe_app_tiles h3 {
margin: 16px 24px;
color: #555
}
.openerp .oe_app_tiles li {
float: left;
list-style: none;
}
.openerp .oe_app_tiles li img {
display: block;
margin: 12px auto 16px;
height: 64px;
width: 64px;
}
.openerp .oe_app_tiles li img.hover {
display: none;
}
.openerp .oe_app_tiles li:hover img {
display: none;
}
.openerp .oe_app_tiles li:hover img.hover {
display: block;
}
.openerp .oe_app_tiles li div {
color: #555;
}
.openerp .oe_app_tiles li a {
display: block;
height: 120px;
width: 194px;
border: 1px solid #f4f2f2;
margin: 6px;
padding: 12px;
text-align: center;
text-transform: uppercase;
text-decoration: none;
font-size: 12px;
font-weight: 800;
background: white;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-ms-border-radius: 6px;
border-radius: 6px;
-moz-box-shadow: 0 1px 2px #bbb;
-webkit-box-shadow: 0 1px 2px #bbb;
-o-box-shadow: 0 1px 2px #bbb;
box-shadow: 0 1px 2px #bbb;
}

View File

@ -182,13 +182,29 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
selectable: false
}
};
var am = new openerp.web.ActionManager(this);
var am = new openerp.web.ActionManager(this),
// FIXME: ideally the dashboard view shall be refactored like kanban.
$action = $('#' + this.view.element_id + '_action_' + index);
this.action_managers.push(am);
am.appendTo($('#' + this.view.element_id + '_action_' + index));
am.appendTo($action);
am.do_action(action);
am.do_action = function(action) {
self.do_action(action);
}
if (action_attrs.creatable && action_attrs.creatable !== 'false') {
var form_id = parseInt(action_attrs.creatable, 10);
$action.parent().find('button.oe_dashboard_button_create').click(function() {
var create_action = _.extend({}, action_orig, {
views : [[(isNaN(form_id) ? false : form_id), 'form']]
});
_.each(action.views, function(v) {
if (v[1] !== 'form') {
create_action.views.push(v);
}
});
self.do_action(create_action);
});
}
if (am.inner_viewmanager) {
am.inner_viewmanager.on_mode_switch.add(function(mode) {
var new_views = [];
@ -318,85 +334,6 @@ openerp.web_dashboard.ConfigOverview = openerp.web.View.extend({
}
});
/*
* ApplicationTiles
* This client action designed to be used as a dashboard widget display
* either a list of application to install (if none is installed yet) or
* a list of root menu
*/
openerp.web.client_actions.add( 'board.home.applications', 'openerp.web_dashboard.ApplicationTiles');
openerp.web_dashboard.apps = {
applications: [
[
{
module: 'crm', name: 'CRM',
help: "Acquire leads, follow opportunities, manage prospects and phone calls, \u2026"
}, {
module: 'sale', name: 'Sales',
help: "Do quotations, follow sales orders, invoice and control deliveries"
}, {
module: 'account_voucher', name: 'Invoicing',
help: "Send invoice, track payments and reminders"
}, {
module: 'point_of_sale', name: 'Point of Sales',
help: "Manage shop sales, use touch-screen POS"
}
], [
{
module: 'purchase', name: 'Purchase',
help: "Do purchase orders, control invoices and reception, follow your suppliers, \u2026"
}, {
module: 'stock', name: 'Warehouse',
help: "Track your stocks, schedule product moves, manage incoming and outgoing shipments, \u2026"
}, {
module: 'mrp', name: 'Manufacturing',
help: "Manage your manufacturing, control your supply chain, personalize master data, \u2026"
}, {
module: 'account_accountant', name: 'Accounting and Finance',
help: "Record financial operations, automate followup, manage multi-currency, \u2026"
}
], [
{
module: 'project', name: 'Projects',
help: "Manage projects, track tasks, invoice task works, follow issues, \u2026"
}, {
module: 'hr', name: 'Human Resources',
help: "Manage employees and their contracts, follow laves, recruit people, \u2026"
}, {
module: 'marketing', name: 'Marketing',
help: "Manage campaigns, follow activities, automate emails, \u2026"
}, {
module: 'knowledge', name: 'Knowledge',
help: "Track your documents, browse your files, \u2026"
}
]
]
};
openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({
template: 'ApplicationTiles',
start: function () {
this._super();
return this.do_display_root_menu();
},
do_display_root_menu: function() {
var self = this;
return new openerp.web.DataSetSearch( this, 'ir.ui.menu', null, [['parent_id', '=', false]])
.read_slice( ['name', 'web_icon_data', 'web_icon_hover_data'], {}, function (applications) {
// Create a matrix of 3*x applications
var rows = [];
while (applications.length) {
rows.push(applications.splice(0, 3));
}
var tiles = QWeb.render( 'ApplicationTiles.content', {rows: rows});
self.$element.append(tiles)
.find('.oe-dashboard-home-tile')
.click(function () {
openerp.webclient.menu.on_menu_click(null, $(this).data('menuid'))
});
});
}
});
/*
* Widgets
* This client action designed to be used as a dashboard widget display
@ -437,4 +374,83 @@ openerp.web_dashboard.Widget = openerp.web.View.extend(/** @lends openerp.web_da
}
});
/*
* HomeTiles this client action display either the list of application to
* install (if none is installed yet) or a list of root menu items
*/
openerp.web.client_actions.add('default_home', 'session.web_dashboard.ApplicationTiles');
openerp.web_dashboard.ApplicationTiles = openerp.web.Widget.extend({
template: 'web_dashboard.ApplicationTiles',
init: function(parent) {
this._super(parent);
},
start: function() {
var self = this;
var domain = [['application','=',true], ['state','=','installed'], ['name', '!=', 'base']];
var ds = new openerp.web.DataSetSearch(this, 'ir.module.module',{},domain);
ds.read_slice(['id'], {}, function(result) {
console.log(result);
if(result.length) {
self.on_installed_database();
} else {
self.on_uninstalled_database();
}
});
},
on_uninstalled_database: function() {
installer = new openerp.web_dashboard.ApplicationInstaller(this);
installer.appendTo(this.$element);
},
on_installed_database: function() {
var self = this;
var ds = new openerp.web.DataSetSearch(this, 'ir.ui.menu', null, [['parent_id', '=', false]]);
var r = ds.read_slice( ['name', 'web_icon_data', 'web_icon_hover_data', 'module'], {}, function (applications) {
//// Create a matrix of 3*x applications
//var rows = [];
//while (applications.length) {
// rows.push(applications.splice(0, 3));
//}
//var tiles = QWeb.render('ApplicationTiles.content', {rows: rows});
var tiles = QWeb.render('ApplicationTiles.content', {applications: applications});
$(tiles).appendTo(self.$element).find('.oe_install-module-link').click(function () {
openerp.webclient.menu.on_menu_click(null, $(this).data('menu'))
});
});
}
});
/**
* ApplicationInstaller
* This client action display a list of applications to install.
*/
openerp.web.client_actions.add( 'board.application.installer', 'openerp.web_dashboard.ApplicationInstaller');
openerp.web_dashboard.ApplicationInstaller = openerp.web.Widget.extend({
template: 'web_dashboard.ApplicationInstaller',
start: function () {
var r = this._super();
//$('.secondary_menu', this.$element.closest('.openerp')).hide();
this.action_manager = new openerp.web.ActionManager(this);
this.action_manager.appendTo(this.$element.find('.oe_installer'));
this.action_manager.do_action({
type: 'ir.actions.act_window',
res_model: 'ir.module.module',
views: [[false, 'kanban']],
flags: {
display_title:false,
search_view: false,
views_switcher: false,
action_buttons: false,
sidebar: false,
pager: false
},
});
return r;
},
stop: function() {
this.action_manager.stop();
return this._super();
},
});
};

View File

@ -29,6 +29,7 @@
<span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span>
<span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span>
</h2>
<button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_dashboard_button_create">Create</button>
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe-dashboard-action-content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
</div>
</t>
@ -82,26 +83,41 @@
</dl>
</t>
<div t-name="ApplicationTiles" class="oe-dashboard-home-tiles"/>
<table t-name="ApplicationTiles.content" width="100%">
<tr t-foreach="rows" t-as="row">
<td t-foreach="row" t-as="application" width="33.3%">
<div class="oe-dashboard-home-tile"
t-att-data-menuid="application.id">
<div class="oe-dashboard-home-tile-icon">
<img t-if="application.web_icon_data"
t-att-src="'data:image/png;base64,' + application.web_icon_data"
/><img t-if="application.web_icon_hover_data" class="hover"
t-att-src="'data:image/png;base64,' + application.web_icon_hover_data"/>
</div>
<span><t t-esc="application.name"/></span>
</div>
</td>
</tr>
</table>
<div t-name="HomeWidget" class="oe-dashboard-home-widget"/>
<t t-name="HomeWidget.content">
<h3><t t-esc="widget.title"/></h3>
<iframe width="100%" frameborder="0" t-att-src="url"/>
</t>
<t t-name="ApplicationTiles.content">
<ul class="oe_app_tiles">
<t t-foreach="applications" t-as="application" >
<li>
<a href="#" class="oe_install-module-link" t-att-data-module="application.module" t-att-data-menu="application.id" >
<img t-if="application.web_icon_data" t-att-src="'data:image/png;base64,' + application.web_icon_data"
/><img t-if="application.web_icon_hover_data" class="hover" t-att-src="'data:image/png;base64,' + application.web_icon_hover_data"/>
<span><t t-esc="application.name"/></span>
</a>
</li>
</t>
</ul>
</t>
<t t-name="web_dashboard.ApplicationTiles">
<div>
<h1>Welcome to OpenERP</h1>
</div>
</t>
<div t-name="web_dashboard.ApplicationInstaller">
<ul>
<li>Remember to bookmark this page.</li>
<li>Remember your login: <t t-esc="widget.session.username"/></li>
<li>Choose the first OpenERP Application you want to install..</li>
</ul>
<h3>Please choose the first application to install.</h3>
<div class="oe_installer" />
</div>
</template>

View File

@ -0,0 +1,46 @@
# Croatian translation for openerp-web
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-12-08 16:31+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "New Node"
msgstr "Novi čvor"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "First"
msgstr "Prvi"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "<<"
msgstr "<<"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "0"
msgstr "0"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "/"
msgstr "/"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid ">>"
msgstr ">>"
#: addons/web_diagram/static/src/xml/base_diagram.xml:0
msgid "Last"
msgstr "Zadnji"

View File

@ -62,7 +62,7 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
.then(function (fields_result, view_result) {
self.fields = fields_result[0];
self.fields_view = view_result[0];
self.on_loaded();
self.on_loaded(self.fields_view);
});
},
/**

View File

@ -429,7 +429,9 @@ openerp.web_kanban.KanbanRecord = openerp.web.Widget.extend({
var $action = $(this),
type = $action.data('type') || 'button',
method = 'do_action_' + (type === 'action' ? 'object' : type);
if (typeof self[method] === 'function') {
if (_.str.startsWith(type, 'switch_')) {
self.view.do_switch_view(type.substr(7));
} else if (typeof self[method] === 'function') {
self[method]($action);
} else {
self.do_warn("Kanban: no action for type : " + type);

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-10-10 12:36+0000\n"
"Last-Translator: Felix Schubert <Unknown>\n"
"PO-Revision-Date: 2011-12-08 08:39+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-06 05:59+0000\n"
"X-Generator: Launchpad (build 14435)\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "OpenERP"
@ -43,7 +43,7 @@ msgstr "Falscher Benutzername oder Passwort"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Powered by openerp.com"
msgstr ""
msgstr "Powered by openerp.com"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Favourite"
@ -67,8 +67,8 @@ msgstr ":"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "On"
msgstr ""
msgstr "Ein"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Off"
msgstr ""
msgstr "Aus"

View File

@ -0,0 +1,74 @@
# Croatian translation for openerp-web
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-12-08 16:29+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-09 05:17+0000\n"
"X-Generator: Launchpad (build 14450)\n"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "OpenERP"
msgstr "OpenERP"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Database:"
msgstr "Baza podataka:"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Login:"
msgstr "Prijava:"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Password:"
msgstr "Zaporka:"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Login"
msgstr "Prijava"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Bad username or password"
msgstr "Neispravno korisničko ime ili lozinka"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Powered by openerp.com"
msgstr "Powered by openerp.com"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Favourite"
msgstr "Omiljeno"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Preference"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Logout"
msgstr "Odjava"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "There is no records to show."
msgstr "Nema zapisa."
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid ":"
msgstr ":"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "On"
msgstr "On"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Off"
msgstr "Off"

View File

@ -0,0 +1,74 @@
# Ukrainian translation for openerp-web
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openerp-web package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-12-05 11:50+0100\n"
"PO-Revision-Date: 2011-12-07 16:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Ukrainian <uk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-12-08 06:06+0000\n"
"X-Generator: Launchpad (build 14443)\n"
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "OpenERP"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Database:"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Login:"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Password:"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Login"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Bad username or password"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Powered by openerp.com"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Favourite"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Preference"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Logout"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "There is no records to show."
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid ":"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "On"
msgstr ""
#: addons/web_mobile/static/src/xml/web_mobile.xml:0
msgid "Off"
msgstr ""

View File

@ -1,7 +1,9 @@
<template>
<!-- vim:fdl=1:
-->
<t t-extend="ViewManager" t-name="ViewManagerAction">
<t t-jquery=".oe-view-manager-header" t-operation="append">
<a class="oe-process-view" title="Process View" href="javascript: void(0)"></a>
<a t-if="self.flags.display_title !== false" class="oe-process-view" title="Process View" href="javascript: void(0)"></a>
</t>
</t>
<t t-name="ProcessView">
@ -140,4 +142,4 @@
</tr>
</table>
</t>
</template>
</template>