diff --git a/addons/web/http.py b/addons/web/http.py index 25cbecc56fc..8595e38446f 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -478,10 +478,9 @@ class Root(object): """ def __init__(self): self.addons = {} + self.statics = {} - static_dirs = self._load_addons() - app = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs) - self.dispatch = DisableCacheMiddleware(app) + self.load_addons() # Setup http sessions path = session_path() @@ -530,12 +529,10 @@ class Root(object): return response(environ, start_response) - def _load_addons(self): - """ - Loads all addons at the specified addons path, returns a mapping of - static URLs to the corresponding directories - """ - statics = {} + def load_addons(self): + """ Load all addons from addons patch containg static files and + controllers and configure them. """ + for addons_path in openerp.modules.module.ad_paths: for module in sorted(os.listdir(addons_path)): if module not in addons_module: @@ -551,14 +548,17 @@ class Root(object): m = __import__(module) addons_module[module] = m addons_manifest[module] = manifest - statics['/%s/static' % module] = path_static + self.statics['/%s/static' % module] = path_static + for k, v in controllers_class: if k not in controllers_object: o = v() controllers_object[k] = o if hasattr(o, '_cp_path'): controllers_path[o._cp_path] = o - return statics + + app = werkzeug.wsgi.SharedDataMiddleware(self.dispatch, self.statics) + self.dispatch = DisableCacheMiddleware(app) def find_handler(self, *l): """ diff --git a/addons/web/i18n/bs.po b/addons/web/i18n/bs.po index 2ceb7ca993d..5ff39dc1371 100644 --- a/addons/web/i18n/bs.po +++ b/addons/web/i18n/bs.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openerp-web\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-11-30 18:13+0000\n" -"PO-Revision-Date: 2012-04-13 20:46+0000\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2012-12-17 17:31+0000\n" +"Last-Translator: Goran Kliska \n" "Language-Team: Bosnian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-01 05:20+0000\n" -"X-Generator: Launchpad (build 16319)\n" +"X-Launchpad-Export-Date: 2012-12-18 05:08+0000\n" +"X-Generator: Launchpad (build 16372)\n" #. module: web #. openerp-web @@ -29,7 +29,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:593 #, python-format msgid "%d minutes ago" -msgstr "" +msgstr "prije %d minuta" #. module: web #. openerp-web diff --git a/addons/web/i18n/et.po b/addons/web/i18n/et.po index fb193daa6d5..552ab8a62d9 100644 --- a/addons/web/i18n/et.po +++ b/addons/web/i18n/et.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openerp-web\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-11-30 18:13+0000\n" -"PO-Revision-Date: 2012-12-16 20:42+0000\n" +"PO-Revision-Date: 2012-12-18 18:50+0000\n" "Last-Translator: Ahti Hinnov \n" "Language-Team: Estonian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-17 04:58+0000\n" -"X-Generator: Launchpad (build 16372)\n" +"X-Launchpad-Export-Date: 2012-12-19 05:22+0000\n" +"X-Generator: Launchpad (build 16378)\n" #. module: web #. openerp-web @@ -36,7 +36,7 @@ msgstr "%d minuti eest" #: code:addons/web/static/src/js/coresetup.js:621 #, python-format msgid "Still loading...
Please be patient." -msgstr "" +msgstr "Ikka laen...
Palun ole kannatlik." #. module: web #. openerp-web @@ -147,7 +147,7 @@ msgstr "Fail" #: code:addons/web/controllers/main.py:842 #, python-format msgid "You cannot leave any password empty." -msgstr "" +msgstr "Sa ei saa jätta ühtegi salasõna tühjaks." #. module: web #. openerp-web @@ -192,7 +192,7 @@ msgstr "Versioon" #: code:addons/web/static/src/xml/base.xml:564 #, python-format msgid "Latest Modification Date:" -msgstr "" +msgstr "Viimase muudatuse kuupäev:" #. module: web #. openerp-web @@ -213,7 +213,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1583 #, python-format msgid "Share with all users" -msgstr "" +msgstr "Jaga kõigi kasutajatega" #. module: web #. openerp-web @@ -221,7 +221,7 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:319 #, python-format msgid "Form" -msgstr "" +msgstr "Vorm" #. module: web #. openerp-web @@ -242,7 +242,7 @@ msgstr "" #: code:addons/web/static/src/js/search.js:1299 #, python-format msgid "not a valid number" -msgstr "" +msgstr "ei ole korrektne number" #. module: web #. openerp-web @@ -263,7 +263,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:1319 #, python-format msgid "Undefined" -msgstr "" +msgstr "Määramata" #. module: web #. openerp-web @@ -277,7 +277,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:598 #, python-format msgid "about a month ago" -msgstr "" +msgstr "umbes kuu eest" #. module: web #. openerp-web @@ -291,21 +291,21 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1311 #, python-format msgid "Button Type:" -msgstr "" +msgstr "Nupu tüüp:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:419 #, python-format msgid "OpenERP SA Company" -msgstr "" +msgstr "OpenERP SA Ettevõte" #. module: web #. openerp-web #: code:addons/web/static/src/js/search.js:1555 #, python-format msgid "Custom Filter" -msgstr "" +msgstr "Kohandatud filter" #. module: web #. openerp-web @@ -356,7 +356,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:415 #, python-format msgid "Group" -msgstr "" +msgstr "Grupp" #. module: web #. openerp-web @@ -370,27 +370,27 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:960 #, python-format msgid "Selection:" -msgstr "" +msgstr "Valik:" #. module: web #. openerp-web #: code:addons/web/static/src/js/view_form.js:869 #, python-format msgid "The following fields are invalid:" -msgstr "" +msgstr "Järgnevad väljad on vigased:" #. module: web #: code:addons/web/controllers/main.py:863 #, python-format msgid "Languages" -msgstr "" +msgstr "Keeled" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1245 #, python-format msgid "...Upload in progress..." -msgstr "" +msgstr "...Toimub üleslaadimine..." #. module: web #. openerp-web @@ -433,7 +433,7 @@ msgstr "Halda filtreid" #: code:addons/web/static/src/js/search.js:1869 #, python-format msgid "contains" -msgstr "" +msgstr "sisaldab" #. module: web #. openerp-web @@ -447,7 +447,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:413 #, python-format msgid "Activate the developer mode" -msgstr "" +msgstr "Aktiveeri arendusreziim" #. module: web #. openerp-web @@ -468,7 +468,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:684 #, python-format msgid "You must select at least one record." -msgstr "" +msgstr "Sa pead valima vähemalt ühe kirje." #. module: web #. openerp-web @@ -489,21 +489,21 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:956 #, python-format msgid "Relation:" -msgstr "" +msgstr "Seos:" #. module: web #. openerp-web #: code:addons/web/static/src/js/coresetup.js:591 #, python-format msgid "less than a minute ago" -msgstr "" +msgstr "vähe kui minuti eest" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:829 #, python-format msgid "Condition:" -msgstr "" +msgstr "Seisukord:" #. module: web #. openerp-web @@ -524,7 +524,7 @@ msgstr "" #: code:addons/web/static/src/js/chrome.js:549 #, python-format msgid "Restored" -msgstr "" +msgstr "Taastatud" #. module: web #. openerp-web @@ -559,7 +559,7 @@ msgstr "" #: code:addons/web/static/src/js/search.js:1963 #, python-format msgid "is not" -msgstr "" +msgstr "ei ole" #. module: web #. openerp-web @@ -587,21 +587,21 @@ msgstr "UTF-8" #: code:addons/web/static/src/xml/base.xml:421 #, python-format msgid "For more information visit" -msgstr "" +msgstr "Rohkema info saamiseks külastage" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1834 #, python-format msgid "Add All Info..." -msgstr "" +msgstr "Lisa kogu info..." #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1658 #, python-format msgid "Export Formats" -msgstr "" +msgstr "Ekspordi formaadid" #. module: web #. openerp-web @@ -629,7 +629,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:8 #, python-format msgid "List" -msgstr "" +msgstr "Loend" #. module: web #. openerp-web @@ -638,14 +638,14 @@ msgstr "" #: code:addons/web/static/src/js/search.js:1942 #, python-format msgid "greater than" -msgstr "" +msgstr "suurem kui" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:540 #, python-format msgid "View" -msgstr "" +msgstr "Vaade" #. module: web #. openerp-web @@ -659,14 +659,14 @@ msgstr "Salvesta filter" #: code:addons/web/static/src/xml/base.xml:1319 #, python-format msgid "Action ID:" -msgstr "" +msgstr "Toimingu ID:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:453 #, python-format msgid "Your user's preference timezone does not match your browser timezone:" -msgstr "" +msgstr "Sinu kasutaja ajatsoon ei ühti brauseri ajatsooniga." #. module: web #. openerp-web @@ -737,7 +737,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:596 #, python-format msgid "a day ago" -msgstr "" +msgstr "päeva eest" #. module: web #. openerp-web @@ -751,7 +751,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:325 #, python-format msgid "Unlimited" -msgstr "" +msgstr "Piiramatu" #. module: web #. openerp-web @@ -775,7 +775,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:538 #, python-format msgid "Technical translation" -msgstr "" +msgstr "Tehniline tõlge" #. module: web #. openerp-web @@ -789,14 +789,14 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:458 #, python-format msgid "Browser's timezone" -msgstr "" +msgstr "Brauseri ajatsoon" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1580 #, python-format msgid "Filter name" -msgstr "" +msgstr "Filtri nimi" #. module: web #. openerp-web @@ -827,21 +827,21 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:421 #, python-format msgid "OpenERP.com" -msgstr "" +msgstr "OpenERP.com" #. module: web #. openerp-web #: code:addons/web/static/src/js/view_form.js:2316 #, python-format msgid "Can't send email to invalid e-mail address" -msgstr "" +msgstr "Ei saa saata kirja vigasele e-posti aadressile" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:614 #, python-format msgid "Add..." -msgstr "" +msgstr "Lisa..." #. module: web #. openerp-web @@ -870,7 +870,7 @@ msgstr "Andmebaasi Hülgamine" #: code:addons/web/static/src/xml/base.xml:462 #, python-format msgid "Click here to change your user's timezone." -msgstr "" +msgstr "Klõpsa siia, et vahetada oma kasutaja ajatsooni." #. module: web #. openerp-web @@ -884,7 +884,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:605 #, python-format msgid "Delete this attachment" -msgstr "" +msgstr "Kustuta see manus" #. module: web #. openerp-web @@ -992,7 +992,7 @@ msgstr "Vaata Logi (%s)" #: code:addons/web/static/src/xml/base.xml:558 #, python-format msgid "Creation Date:" -msgstr "" +msgstr "Loomiskuupäev:" #. module: web #: code:addons/web/controllers/main.py:806 @@ -1062,7 +1062,7 @@ msgstr "" #: code:addons/web/static/src/js/formats.js:274 #, python-format msgid "'%s' is not a correct date" -msgstr "" +msgstr "'%s' ei ole korrektne kuupäev" #. module: web #. openerp-web @@ -1076,7 +1076,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:597 #, python-format msgid "%d days ago" -msgstr "" +msgstr "%d päeva eest" #. module: web #. openerp-web @@ -1108,7 +1108,7 @@ msgstr "Laadimine..." #: code:addons/web/static/src/xml/base.xml:561 #, python-format msgid "Latest Modification by:" -msgstr "" +msgstr "Viimase muudatuse tegija:" #. module: web #. openerp-web @@ -1130,14 +1130,14 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:426 #, python-format msgid "%d / %d" -msgstr "" +msgstr "%d / %d" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1757 #, python-format msgid "2. Check your file format" -msgstr "" +msgstr "2. Kontrolli oma faili formaati" #. module: web #. openerp-web @@ -1160,7 +1160,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:599 #, python-format msgid "%d months ago" -msgstr "" +msgstr "%d kuu eest" #. module: web #. openerp-web @@ -1261,14 +1261,14 @@ msgstr "" #: code:addons/web/static/src/js/views.js:1090 #, python-format msgid "You must choose at least one record." -msgstr "" +msgstr "Sa pead valima vähemalt ühe kirje." #. module: web #. openerp-web #: code:addons/web/static/src/js/coresetup.js:622 #, python-format msgid "Don't leave yet,
it's still loading..." -msgstr "" +msgstr "Ära veel lahku,
ikka veel laen..." #. module: web #. openerp-web @@ -1296,7 +1296,7 @@ msgstr "Eemalda kõik" #: code:addons/web/static/src/xml/base.xml:1315 #, python-format msgid "Method:" -msgstr "" +msgstr "Meetod:" #. module: web #. openerp-web @@ -1324,7 +1324,7 @@ msgstr "Salvesta kui..." #: code:addons/web/static/src/js/view_form.js:4971 #, python-format msgid "Could not display the selected image." -msgstr "" +msgstr "Ei saa kuvada valitud pilti." #. module: web #. openerp-web @@ -1347,14 +1347,14 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:393 #, python-format msgid "99+" -msgstr "" +msgstr "99+" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1749 #, python-format msgid "1. Import a .CSV file" -msgstr "" +msgstr "1. Impordi .CSV fail" #. module: web #. openerp-web @@ -1438,7 +1438,7 @@ msgstr "Loo" #: code:addons/web/static/src/js/search.js:1870 #, python-format msgid "doesn't contain" -msgstr "" +msgstr "ei sisalda" #. module: web #. openerp-web @@ -1452,7 +1452,7 @@ msgstr "Impordi valikud" #: code:addons/web/static/src/js/view_form.js:2909 #, python-format msgid "Add %s" -msgstr "" +msgstr "Lisa %s" #. module: web #. openerp-web @@ -1468,7 +1468,7 @@ msgstr "Admin salasõna:" #: code:addons/web/static/src/xml/base.xml:1369 #, python-format msgid "Close" -msgstr "" +msgstr "Sulge" #. module: web #. openerp-web @@ -1483,7 +1483,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1754 #, python-format msgid "CSV File:" -msgstr "" +msgstr "CSV Fail:" #. module: web #. openerp-web @@ -1517,7 +1517,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:855 #, python-format msgid "All users" -msgstr "" +msgstr "Kõik kasutajad" #. module: web #. openerp-web @@ -1561,28 +1561,28 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:948 #, python-format msgid "Yes" -msgstr "" +msgstr "Jah" #. module: web #. openerp-web #: code:addons/web/static/src/js/view_form.js:4831 #, python-format msgid "There was a problem while uploading your file" -msgstr "" +msgstr "Faili üleslaadimisel esines tõrge" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:552 #, python-format msgid "XML ID:" -msgstr "" +msgstr "XML ID:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:932 #, python-format msgid "Size:" -msgstr "" +msgstr "Suurus:" #. module: web #. openerp-web @@ -1603,7 +1603,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:601 #, python-format msgid "%d years ago" -msgstr "" +msgstr "%d aasta eest" #. module: web #. openerp-web @@ -1711,7 +1711,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:533 #, python-format msgid "JS Tests" -msgstr "" +msgstr "JS Testid" #. module: web #. openerp-web @@ -1754,7 +1754,7 @@ msgstr "Kinnita Uus Salasõna:" #: code:addons/web/static/src/js/view_list.js:573 #, python-format msgid "Do you really want to remove these records?" -msgstr "" +msgstr "Kas sa tõesti tahad eemaldada need kirjed?" #. module: web #. openerp-web @@ -1776,21 +1776,21 @@ msgstr "" #: code:addons/web/static/src/js/data_export.js:6 #, python-format msgid "Export Data" -msgstr "" +msgstr "Ekspordi andmed" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:940 #, python-format msgid "Domain:" -msgstr "" +msgstr "Domeen:" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:812 #, python-format msgid "Default:" -msgstr "" +msgstr "Vaikimisi:" #. module: web #. openerp-web @@ -1815,28 +1815,28 @@ msgstr "Andmebaas:" #: code:addons/web/static/src/xml/base.xml:1215 #, python-format msgid "Uploading ..." -msgstr "" +msgstr "Üleslaadimine ..." #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1828 #, python-format msgid "Name:" -msgstr "" +msgstr "Nimi:" #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome.js:1027 #, python-format msgid "About" -msgstr "" +msgstr "Infot" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1406 #, python-format msgid "Search Again" -msgstr "" +msgstr "Otsi Uuesti" #. module: web #. openerp-web @@ -1858,7 +1858,7 @@ msgstr "Tühjenda" #: code:addons/web/static/src/xml/base.xml:1655 #, python-format msgid "Export all Data" -msgstr "" +msgstr "Ekspordi kõik andmed" #. module: web #. openerp-web @@ -1906,7 +1906,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:924 #, python-format msgid "Type:" -msgstr "" +msgstr "Tüüp:" #. module: web #. openerp-web @@ -1920,7 +1920,7 @@ msgstr "Vigane super-administaatori salasõna" #: code:addons/web/static/src/xml/base.xml:920 #, python-format msgid "Object:" -msgstr "" +msgstr "Objekt:" #. module: web #. openerp-web @@ -1935,7 +1935,7 @@ msgstr "Laadimine" #: code:addons/web/static/src/js/coresetup.js:600 #, python-format msgid "about a year ago" -msgstr "" +msgstr "umbes aasta eest" #. module: web #. openerp-web @@ -1961,7 +1961,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:595 #, python-format msgid "%d hours ago" -msgstr "" +msgstr "%d tunni eest" #. module: web #. openerp-web @@ -1976,7 +1976,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1833 #, python-format msgid "Quick Add" -msgstr "" +msgstr "Kiirlisamine" #. module: web #. openerp-web @@ -2004,7 +2004,7 @@ msgstr "Ok" #: code:addons/web/static/src/js/views.js:1163 #, python-format msgid "Uploading..." -msgstr "" +msgstr "Üleslaadimine..." #. module: web #. openerp-web @@ -2071,7 +2071,7 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:3880 #, python-format msgid "Add an item" -msgstr "" +msgstr "Lisa element" #. module: web #. openerp-web @@ -2085,7 +2085,7 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:1926 #, python-format msgid "Confirm" -msgstr "" +msgstr "Kinnita" #. module: web #. openerp-web @@ -2099,14 +2099,14 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:2185 #, python-format msgid "Download \"%s\"" -msgstr "" +msgstr "Lae alla \"%s\"" #. module: web #. openerp-web #: code:addons/web/static/src/js/view_form.js:324 #, python-format msgid "New" -msgstr "" +msgstr "Uus" #. module: web #. openerp-web @@ -2144,7 +2144,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1296 #, python-format msgid "Button" -msgstr "" +msgstr "Nupp" #. module: web #. openerp-web @@ -2179,7 +2179,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:404 #, python-format msgid "About OpenERP" -msgstr "" +msgstr "OpenERP -ist" #. module: web #. openerp-web @@ -2206,7 +2206,7 @@ msgstr "Andmebaaside Haldamine" #: code:addons/web/static/src/js/view_form.js:4971 #, python-format msgid "Image" -msgstr "" +msgstr "Pilt" #. module: web #. openerp-web @@ -2246,7 +2246,7 @@ msgstr "" #: code:addons/web/static/src/js/search.js:1383 #, python-format msgid "No" -msgstr "" +msgstr "Ei" #. module: web #. openerp-web @@ -2285,7 +2285,7 @@ msgstr "" #: code:addons/web/static/src/js/coresetup.js:620 #, python-format msgid "Still loading..." -msgstr "" +msgstr "Ikka laen..." #. module: web #. openerp-web @@ -2327,7 +2327,7 @@ msgstr "" #: code:addons/web/static/src/js/view_list.js:1327 #, python-format msgid "%s (%d)" -msgstr "" +msgstr "%s (%d)" #. module: web #. openerp-web @@ -2341,14 +2341,14 @@ msgstr "" #: code:addons/web/static/src/js/search.js:980 #, python-format msgid "Filter" -msgstr "" +msgstr "Filter" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:928 #, python-format msgid "Widget:" -msgstr "" +msgstr "Vidin:" #. module: web #. openerp-web @@ -2362,7 +2362,7 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:549 #, python-format msgid "ID:" -msgstr "" +msgstr "ID:" #. module: web #. openerp-web @@ -2383,21 +2383,21 @@ msgstr "" #: code:addons/web/static/src/js/views.js:1172 #, python-format msgid "Do you really want to delete this attachment ?" -msgstr "" +msgstr "Kas sa tõesti tahad kustutada seda manust?" #. module: web #. openerp-web #: code:addons/web/static/src/js/views.js:838 #, python-format msgid "Technical Translation" -msgstr "" +msgstr "Tehniline tõlge" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:916 #, python-format msgid "Field:" -msgstr "" +msgstr "Väli:" #. module: web #. openerp-web @@ -2411,7 +2411,7 @@ msgstr "Andmebaas %s on eemaldatud" #: code:addons/web/static/src/xml/base.xml:456 #, python-format msgid "User's timezone" -msgstr "" +msgstr "Kasutaja ajatsoon" #. module: web #. openerp-web @@ -2426,7 +2426,7 @@ msgstr "" #: code:addons/web/static/src/js/views.js:996 #, python-format msgid "Print" -msgstr "" +msgstr "Prindi" #. module: web #. openerp-web @@ -2454,7 +2454,7 @@ msgstr "" #: code:addons/web/static/src/js/view_form.js:767 #, python-format msgid "Do you really want to delete this record?" -msgstr "" +msgstr "Kas sa tõesti tahad kustutada seda kirjet?" #. module: web #. openerp-web @@ -2485,7 +2485,7 @@ msgstr "Salasõna" #: code:addons/web/static/src/xml/base.xml:1153 #, python-format msgid "Edit" -msgstr "" +msgstr "Muuda" #. module: web #. openerp-web @@ -2499,7 +2499,7 @@ msgstr "Eemalda" #: code:addons/web/static/src/xml/base.xml:1040 #, python-format msgid "Select date" -msgstr "" +msgstr "Vali kuupäev" #. module: web #. openerp-web @@ -2513,14 +2513,14 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1252 #, python-format msgid "Delete this file" -msgstr "" +msgstr "Kustuta see fail" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:109 #, python-format msgid "Create Database" -msgstr "Andmebaasi loomine" +msgstr "Andmebaasi Loomine" #. module: web #. openerp-web @@ -2549,7 +2549,7 @@ msgstr "Tagasi sisenemiskuvale" #: code:addons/web/static/src/xml/base.xml:1429 #, python-format msgid "Filters" -msgstr "" +msgstr "Filtrid" #~ msgid "Translations" #~ msgstr "Tõlked" diff --git a/addons/web/i18n/pl.po b/addons/web/i18n/pl.po index 00b950ac364..3043b19643a 100644 --- a/addons/web/i18n/pl.po +++ b/addons/web/i18n/pl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openerp-web\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-11-30 18:13+0000\n" -"PO-Revision-Date: 2012-12-10 13:05+0000\n" +"PO-Revision-Date: 2012-12-17 20:10+0000\n" "Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-12-11 05:03+0000\n" -"X-Generator: Launchpad (build 16356)\n" +"X-Launchpad-Export-Date: 2012-12-18 05:08+0000\n" +"X-Generator: Launchpad (build 16372)\n" #. module: web #. openerp-web @@ -36,7 +36,7 @@ msgstr "%d minut temu" #: code:addons/web/static/src/js/coresetup.js:621 #, python-format msgid "Still loading...
Please be patient." -msgstr "Trwa ładowanie...
Bądź cierpliwy." +msgstr "Trwa pobieranie...
Bądź cierpliwy." #. module: web #. openerp-web @@ -441,7 +441,7 @@ msgstr "zawiera" #: code:addons/web/static/src/js/coresetup.js:624 #, python-format msgid "Take a minute to get a coffee,
because it's loading..." -msgstr "Przerwa na kawę,
ładowanie potrwa..." +msgstr "Przerwa na kawę,
pobieranie potrwa..." #. module: web #. openerp-web @@ -1204,7 +1204,7 @@ msgstr "Odtwórz danych" #: code:addons/web/static/src/js/chrome.js:645 #, python-format msgid "Login" -msgstr "" +msgstr "Logowanie" #. module: web #. openerp-web @@ -1486,7 +1486,7 @@ msgstr "Zamknij" #, python-format msgid "" "You may not believe it,
but the application is actually loading..." -msgstr "Może nie wierzysz,
ale aplikacja ciągle się ładuje..." +msgstr "Może nie wierzysz,
ale aplikacja ciągle się pobiera..." #. module: web #. openerp-web @@ -1548,14 +1548,14 @@ msgstr "" #: code:addons/web/static/src/xml/base.xml:1403 #, python-format msgid "Advanced Search..." -msgstr "" +msgstr "Zaawansowane wyszukiwanie..." #. module: web #. openerp-web #: code:addons/web/static/src/js/chrome.js:499 #, python-format msgid "Dropping database" -msgstr "" +msgstr "Usuwanie bazy" #. module: web #. openerp-web @@ -1578,7 +1578,7 @@ msgstr "Tak" #: code:addons/web/static/src/js/view_form.js:4831 #, python-format msgid "There was a problem while uploading your file" -msgstr "" +msgstr "Pojawił się problem przy wysyłaniu pliku" #. module: web #. openerp-web @@ -1599,7 +1599,7 @@ msgstr "Rozmiar:" #: code:addons/web/static/src/xml/base.xml:1799 #, python-format msgid "--- Don't Import ---" -msgstr "" +msgstr "--- Nie importuj ---" #. module: web #. openerp-web @@ -1944,7 +1944,7 @@ msgstr "Obiekt:" #: code:addons/web/static/src/js/chrome.js:326 #, python-format msgid "Loading" -msgstr "Wczytywanie" +msgstr "Pobieranie" #. module: web #. openerp-web @@ -2027,7 +2027,7 @@ msgstr "Wysyłanie..." #: code:addons/web/static/src/xml/base.xml:125 #, python-format msgid "Load Demonstration data:" -msgstr "Wczytaj dane demonstracyjne:" +msgstr "Pobierz dane demonstracyjne:" #. module: web #. openerp-web @@ -2195,7 +2195,7 @@ msgstr "nie jest prawdą" #: code:addons/web/static/src/xml/base.xml:404 #, python-format msgid "About OpenERP" -msgstr "" +msgstr "O OpenERP" #. module: web #. openerp-web @@ -2523,21 +2523,21 @@ msgstr "Wybierz datę" #: code:addons/web/static/src/js/search.js:1251 #, python-format msgid "Search %(field)s for: %(value)s" -msgstr "" +msgstr "W %(field)s szukaj: %(value)s" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:1252 #, python-format msgid "Delete this file" -msgstr "" +msgstr "Usuń plik" #. module: web #. openerp-web #: code:addons/web/static/src/xml/base.xml:109 #, python-format msgid "Create Database" -msgstr "" +msgstr "Utwórz bazę danych" #. module: web #. openerp-web diff --git a/addons/web/static/lib/jquery/jquery-1.8.3.js b/addons/web/static/lib/jquery/jquery-1.8.3.js index a86bf797a8b..c54e2bedb3b 100644 --- a/addons/web/static/lib/jquery/jquery-1.8.3.js +++ b/addons/web/static/lib/jquery/jquery-1.8.3.js @@ -6484,9 +6484,9 @@ jQuery.uaMatch = function( ua ) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || + (/(webkit)[ \/]([\w.]+)/.exec( ua )) || + (/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua )) || + (/(msie) ([\w.]+)/.exec( ua )) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || []; diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2665ee263a9..7e8242a8d5c 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -819,6 +819,16 @@ margin-top: 1px; background-color: #f6cf3b; } +.openerp .oe_dialog_warning { + width: 100%; +} +.openerp .oe_dialog_warning p { + text-align: center; +} +.openerp .oe_dialog_icon { + padding: 5px; + width: 32px; +} .openerp .oe_login { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=); text-align: center; @@ -1182,6 +1192,7 @@ padding-bottom: 16px; } .openerp a.oe_logo { + position: relative; width: 220px; display: block; text-align: center; @@ -1190,6 +1201,24 @@ margin: 14px 0; border: 0; } +.openerp a.oe_logo .oe_logo_edit { + margin: 14px 0; + position: absolute; + top: 1px; + padding: 4px; + width: 100%; + display: none; + text-align: center; + color: #eeeeee; + background: rgba(37, 37, 37, 0.9); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.openerp a.oe_logo:hover .oe_logo_edit_admin { + display: block; +} .openerp .oe_footer { position: fixed; bottom: 0; @@ -1236,7 +1265,7 @@ color: white; padding: 2px 4px; margin: 1px 6px 0 0; - border: 1px solid lightGray; + border: 1px solid lightgrey; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -1261,7 +1290,7 @@ transform: scale(1.1); } .openerp .oe_secondary_submenu .oe_active { - border-top: 1px solid lightGray; + border-top: 1px solid lightgrey; border-bottom: 1px solid #dedede; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2); @@ -2210,7 +2239,7 @@ } .openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span { font-size: 80%; - color: darkGreen; + color: darkgreen; vertical-align: top; position: relative; top: -4px; @@ -3201,3 +3230,7 @@ div.ui-widget-overlay { overflow: hidden !important; } } +.blockUI.blockOverlay { + background-color: black; + opacity: 0.6; +} diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index a8445f0ff06..0369f5fd4b5 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -696,6 +696,15 @@ $sheet-padding: 16px margin-top: 1px background-color: #f6cf3b // }}} + // CrashManager {{{ + .oe_dialog_warning + width: 100% + p + text-align: center + .oe_dialog_icon + padding: 5px + width: 32px + // }}} // Login {{{ .oe_login background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=) @@ -958,12 +967,26 @@ $sheet-padding: 16px text-shadow: 0 1px 1px white padding-bottom: 16px a.oe_logo + position: relative width: 220px display: block text-align: center img margin: 14px 0 border: 0 + .oe_logo_edit + margin: 14px 0 + position: absolute + top: 1px + padding: 4px + width: 100% + display: none + text-align: center + color: #eee + background: rgba(37,37,37,0.9) + @include box-sizing(border) + &:hover .oe_logo_edit_admin + display: block .oe_footer position: fixed bottom: 0 @@ -2536,5 +2559,9 @@ div.ui-widget-overlay overflow: hidden !important // }}} +.blockUI.blockOverlay + background-color: black + opacity: 0.6000000238418579 + // au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers > "%:p:r.css" // vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker: diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index b06dda90eca..3812a00d8f3 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -691,6 +691,7 @@ instance.web.Login = instance.web.Widget.extend({ }); instance.web.client_actions.add("login", "instance.web.Login"); + /** * Redirect to url by replacing window.location * If wait is true, sleep 1s and wait for the server i.e. after a restart. @@ -1136,6 +1137,9 @@ instance.web.Client = instance.web.Widget.extend({ instance.web.WebClient = instance.web.Client.extend({ _template: 'WebClient', + events: { + 'click .oe_logo_edit_admin': 'logo_edit' + }, init: function(parent) { this._super(parent); this._current_state = null; @@ -1206,7 +1210,29 @@ instance.web.WebClient = instance.web.Client.extend({ }, update_logo: function() { var img = this.session.url('/web/binary/company_logo'); - this.$el.find('.oe_logo img').attr('src', '').attr('src', img); + this.$('.oe_logo img').attr('src', '').attr('src', img); + this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', this.session.uid === 1); + }, + logo_edit: function(ev) { + var self = this; + new instance.web.Model("res.users").get_func("read")(this.session.uid, ["company_id"]).then(function(res) { + self.rpc("/web/action/load", { action_id: "base.action_res_company_form" }).done(function(result) { + result.res_id = res['company_id'][0]; + result.target = "new"; + result.views = [[false, 'form']]; + result.flags = { + action_buttons: true, + }; + self.action_manager.do_action(result); + var form = self.action_manager.dialog_widget.views.form.controller; + form.on("on_button_cancel", self.action_manager.dialog, self.action_manager.dialog.close); + form.on('record_saved', self, function() { + self.action_manager.dialog.close(); + self.update_logo(); + }); + }); + }); + return false; }, check_timezone: function() { var self = this; @@ -1319,12 +1345,21 @@ instance.web.WebClient = instance.web.Client.extend({ result.context, {search_default_message_unread: true}); } - return $.when(self.action_manager.do_action(result, { + var completed = $.Deferred(); + $.when(self.action_manager.do_action(result, { clear_breadcrumbs: true, action_menu_id: self.menu.current_menu, })).fail(function() { self.menu.open_menu(options.previous_menu_id); + }).always(function() { + completed.resolve(); }); + setTimeout(function() { + completed.resolve(); + }, 2000); + // We block the menu when clicking on an element until the action has correctly finished + // loading. If something crash, there is a 2 seconds timeout before it's unblocked. + return completed; }); }); }, @@ -1352,17 +1387,17 @@ instance.web.EmbeddedClient = instance.web.Client.extend({ _template: 'EmbedClient', init: function(parent, origin, dbname, login, key, action_id, options) { this._super(parent, origin); - - this.dbname = dbname; - this.login = login; - this.key = key; + this.bind_credentials(dbname, login, key); this.action_id = action_id; this.options = options || {}; }, start: function() { var self = this; return $.when(this._super()).then(function() { - return instance.session.session_authenticate(self.dbname, self.login, self.key, true).then(function() { + return self.authenticate().then(function() { + if (!self.action_id) { + return; + } return self.rpc("/web/action/load", { action_id: self.action_id }).done(function(result) { var action = result; action.flags = _.extend({ @@ -1373,11 +1408,30 @@ instance.web.EmbeddedClient = instance.web.Client.extend({ //pager : false }, self.options, action.flags || {}); - self.action_manager.do_action(action); + self.do_action(action); }); }); }); }, + + do_action: function(action) { + return this.action_manager.do_action(action); + }, + + authenticate: function() { + var s = instance.session; + if (s.session_is_valid() && s.db === this.dbname && s.login === this.login) { + return $.when(); + } + return instance.session.session_authenticate(this.dbname, this.login, this.key, true); + }, + + bind_credentials: function(dbname, login, key) { + this.dbname = dbname; + this.login = login; + this.key = key; + }, + }); instance.web.embed = function (origin, dbname, login, key, action, options) { diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index c88e0ca0512..eac26520301 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -30,6 +30,12 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess * Setup a sessionm */ session_bind: function(origin) { + if (!_.isUndefined(this.origin)) { + if (this.origin === origin) { + return $.when(); + } + throw new Error('Session already bound to ' + this.origin); + } var self = this; this.setup(origin); instance.web.qweb.default_dict['_s'] = this.origin; diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index cfc8be391b4..299d579803d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -213,7 +213,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }); //bounce effect on red button when click on statusbar. this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) { - if((self.get("actual_mode") == "view")) { + if((self.get("actual_mode") == "view")) { var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'}); $button.effect('bounce', {distance:18, times: 5}, 150); e.stopPropagation(); @@ -919,7 +919,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM this.do_update_pager(); if (this.sidebar) { this.sidebar.do_attachement_update(this.dataset, this.datarecord.id); - } + } //openerp.log("The record has been created with id #" + this.datarecord.id); return $.when(this.reload()).then(function () { self.trigger('record_created', r); @@ -2289,7 +2289,10 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we }); instance.web.form.FieldID = instance.web.form.FieldChar.extend({ - + process_modifiers: function () { + this._super(); + this.set({ readonly: true }); + }, }); instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({ @@ -2389,7 +2392,7 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({ var self = this; this.$input = this.$el.find('input.oe_datepicker_master'); this.$input_picker = this.$el.find('input.oe_datepicker_container'); - + this.picker({ onClose: this.on_picker_select, onSelect: this.on_picker_select, @@ -5092,7 +5095,7 @@ instance.web.form.FieldMany2ManyBinaryMultiFiles = instance.web.form.AbstractFie _.each(datas, function (data) { data.no_unlink = true; data.url = self.session.url('/web/binary/saveas', {model: 'ir.attachment', field: 'datas', filename_field: 'datas_fname', id: data.id}); - + _.each(self.get('value'), function (val, key) { if(val == data.id) { self.get('value')[key] = data; @@ -5258,7 +5261,8 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ if (this.field.type == "many2one") { var domain = []; if(!_.isEmpty(this.field.domain) || !_.isEmpty(this.node.attrs.domain)) { - domain = new instance.web.CompoundDomain(['|'], self.build_domain(), [['id', '=', self.get('value')]]); + var d = instance.web.pyeval.eval('domain', self.build_domain()); + domain = ['|', ['id', '=', self.get('value')]].concat(d); } var ds = new instance.web.DataSetSearch(this, this.field.relation, self.build_context(), domain); return ds.read_slice(['name'], {}).then(function (records) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 62e123f6695..a3fd74bfb00 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -36,11 +36,11 @@ - +

- var message = d.message ? d.message : d.error.data.fault_code; + var message = d.error.message ? d.error.message : d.error.data.fault_code; d.html_error = context.engine.tools.html_escape(message) .replace(/\n/g, '
');
@@ -437,7 +437,10 @@

- +