[MERGE] merge from trunk

bzr revid: ged@openerp.com-20140225091310-pzkj5ip17esl52kz
This commit is contained in:
Gery Debongnie 2014-02-25 10:13:10 +01:00
commit 893b7041f9
367 changed files with 1106 additions and 1167 deletions

View File

@ -1012,18 +1012,7 @@ class Session(http.Controller):
:return: A key identifying the saved action.
:rtype: integer
"""
saved_actions = request.httpsession.get('saved_actions')
if not saved_actions:
saved_actions = {"next":1, "actions":{}}
request.httpsession['saved_actions'] = saved_actions
# we don't allow more than 10 stored actions
if len(saved_actions["actions"]) >= 10:
del saved_actions["actions"][min(saved_actions["actions"])]
key = saved_actions["next"]
saved_actions["actions"][key] = the_action
saved_actions["next"] = key + 1
request.httpsession['saved_actions'] = saved_actions
return key
return request.httpsession.save_action(the_action)
@http.route('/web/session/get_session_action', type='json', auth="user")
def get_session_action(self, key):
@ -1036,10 +1025,7 @@ class Session(http.Controller):
:return: The saved action or None.
:rtype: anything
"""
saved_actions = request.httpsession.get('saved_actions')
if not saved_actions:
return None
return saved_actions["actions"].get(key)
return request.httpsession.get_action(key)
@http.route('/web/session/check', type='json', auth="user")
def check(self):

View File

@ -52,7 +52,6 @@ TESTING = Template(u"""<!DOCTYPE html>
<script src="/web/static/lib/qunit/qunit.js"></script>
<script type="text/javascript">
var oe_db_info = ${db_info | n};
// List of modules, each module is preceded by its dependencies
var oe_all_dependencies = ${dependencies | n};
QUnit.config.testTimeout = 5 * 60 * 1000;
@ -134,16 +133,10 @@ class TestRunnerController(http.Controller):
for mod, tests in itertools.izip(sorted_mods, tests)
]
# if all three db_info parameters are present, send them to the page
db_info = dict((k, v) for k, v in kwargs.iteritems()
if k in ['source', 'supadmin', 'password'])
if len(db_info) != 3:
db_info = None
return TESTING.render(files=files, dependencies=json.dumps(
[name for name in sorted_mods
if module.get_module_resource(name, 'static')
if manifests[name]['js']]), db_info=json.dumps(db_info))
if manifests[name]['js']]))
def load_manifest(self, name):
manifest = module.load_information_from_description_file(name)

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2014-01-30 17:05+0000\n"
"Last-Translator: Bosko Stojakovic <bluesoft83@gmail.com>\n"
"Last-Translator: Boško Stojaković <bluesoft83@gmail.com>\n"
"Language-Team: Bosnian <bs@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: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
"X-Poedit-Language: Czech\n"
#. module: web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
"Language: es\n"
#. module: web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-17 05:44+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web
@ -853,7 +853,7 @@ msgstr "LIsää"
#: code:addons/web/static/src/xml/base.xml:558
#, python-format
msgid "Toggle Form Layout Outline"
msgstr "Näytä Sijoittelu"
msgstr "Vaihda lomakkeen asettelua"
#. module: web
#. openerp-web
@ -963,7 +963,7 @@ msgstr "Salasana vaihdettu"
#: code:addons/web/static/src/js/view_list_editable.js:793
#, python-format
msgid "The form's data can not be discarded"
msgstr "Asiakirjan dataa ei voida hylätä"
msgstr "Lomakkeen tietoja ei voi hylätä"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:02+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:08+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:01+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:09+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:03+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web
#. openerp-web

View File

@ -1,2 +1,5 @@
sass:
sass -t expanded --compass --unix-newlines --watch base.sass:base.css&
all: *.css
%.css: %.sass
sass -t expanded --compass --unix-newlines $< $@
watch:
sass -t expanded --compass --unix-newlines --watch .:.

View File

@ -78,6 +78,20 @@
.openerp td {
vertical-align: top;
}
.openerp .oe_title {
width: 50%;
float: left;
}
.openerp .oe_title:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.openerp .oe_form_group {
clear: both;
}
.openerp .zebra tbody tr:nth-child(odd) td {
background-color: #f0f0fa;
background-color: #efeff8;
@ -1205,10 +1219,7 @@
.openerp .oe_about .oe_bottom a {
color: #eeeeee;
}
.openerp .oe_form_uri {
color: #7c7bad;
}
.openerp .oe_form_uri:hover {
.openerp a.oe_form_uri:hover {
text-decoration: underline;
}
.openerp .oe_application {
@ -1594,7 +1605,6 @@
border-radius: 0 3px 3px 0;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_category, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value {
height: 18px;
padding: 0 4px;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_category {
@ -2021,7 +2031,6 @@
}
.openerp .oe_form > :not(.oe_form_nosheet) header .oe_button {
margin: 3px 2px 1px;
float: left;
}
.openerp .oe_form > :not(.oe_form_nosheet) header .oe_button:first-child {
margin-left: 6px;
@ -2142,7 +2151,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;
@ -3021,25 +3030,12 @@
font-size: 95%;
line-height: 1.2em;
}
.openerp .oe_debug_view_log label {
display: block;
width: 49%;
text-align: right;
float: left;
font-weight: bold;
color: #000099;
}
.openerp .oe_debug_view_log span {
display: block;
width: 49%;
float: right;
color: #333333;
}
.openerp .navbar {
min-height: 32px;
margin-bottom: 0px;
border: none;
z-index: 1;
position: static;
background-color: #414141;
background-color: #454343;
background-image: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626));
@ -3138,10 +3134,6 @@
border: none;
padding: 10px 0 3px 0;
}
.openerp .jqstooltip {
height: auto !important;
width: auto !important;
}
.openerp h5 {
font-weight: bold;
font-size: smaller;
@ -3153,6 +3145,12 @@
margin: 3px 3px 0 !important;
}
.jqstooltip {
height: auto !important;
width: auto !important;
padding: 0;
}
@-moz-document url-prefix() {
.openerp .oe_searchview .oe_searchview_search {
top: -1px;

View File

@ -189,6 +189,17 @@ $sheet-padding: 16px
vertical-align: middle
td
vertical-align: top
.oe_title
width: 50%
float: left
.oe_title:after
content: "."
display: block
height: 0
clear: both
visibility: hidden
.oe_form_group
clear: both
.zebra tbody tr:nth-child(odd) td
background-color: #f0f0fa
@include vertical-gradient(#f0f0fa, #eeeef6)
@ -1002,10 +1013,8 @@ $sheet-padding: 16px
color: #eee
// }}}
// ActionManager {{{
.oe_form_uri
color: $link-color
&:hover
text-decoration: underline
a.oe_form_uri:hover
text-decoration: underline
.oe_application
width: 100%
height: 100%
@ -1302,7 +1311,6 @@ $sheet-padding: 16px
background: $tag-bg-light
@include radius(0 3px 3px 0)
.oe_facet_category, .oe_facet_value
height: 18px
padding: 0 4px
.oe_facet_category
color: white
@ -1639,7 +1647,6 @@ $sheet-padding: 16px
float: right
.oe_button
margin: 3px 2px 1px
float: left
&:first-child
margin-left: 6px
@ -2419,18 +2426,6 @@ $sheet-padding: 16px
.oe_debug_view_log
font-size: 95%
line-height: 1.2em
.oe_debug_view_log label
display: block
width: 49%
text-align: right
float: left
font-weight: bold
color: #009
.oe_debug_view_log span
display: block
width: 49%
float: right
color: #333
// }}}
// Bootstrap HACKS {{{
.navbar
@ -2438,6 +2433,7 @@ $sheet-padding: 16px
margin-bottom: 0px
border: none
z-index: 1
position: static
background-color: #414141
@include vertical-gradient(#646060, #262626)
.navbar-default
@ -2517,10 +2513,7 @@ $sheet-padding: 16px
border: none
padding: 10px 0 3px 0
// Customize for kanban tooltip
.jqstooltip
height: auto !important
width: auto !important
// Customize for chatter
h5
@ -2531,7 +2524,12 @@ $sheet-padding: 16px
.oe_msg_subtype_check
margin: 3px 3px 0 !important
// }}}
// Customize for kanban tooltip
.jqstooltip
height: auto !important
width: auto !important
padding: 0
@-moz-document url-prefix()
.openerp
.oe_searchview .oe_searchview_search

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1336,10 +1336,15 @@ instance.web.WebClient = instance.web.Client.extend({
var state = $.bbq.getState(true);
if (_.isEmpty(state) || state.action == "login") {
self.menu.has_been_loaded.done(function() {
var first_menu_id = self.menu.$el.find("a:first").data("menu");
if(first_menu_id) {
self.menu.menu_click(first_menu_id);
}
new instance.web.Model("res.users").call("read", [self.session.uid, ["action_id"]]).done(function(data) {
var first_menu_id = self.menu.$el.find("a:first").data("menu");
if(first_menu_id)
self.menu.menu_click(first_menu_id);
if(data.action_id) {
self.action_manager.do_action(data.action_id[0]);
}
});
});
} else {
$(window).trigger('hashchange');

View File

@ -452,6 +452,9 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin,
* @returns {$.Deferred}
*/
read_ids: function (ids, fields, options) {
if (_.isEmpty(ids))
return $.Deferred().resolve([]);
options = options || {};
// TODO: reorder results to match ids list
return this._model.call('read',
@ -872,7 +875,8 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
});
var return_records = function() {
var records = _.map(ids, function(id) {
return _.extend({}, _.detect(self.cache, function(c) {return c.id === id;}).values, {"id": id});
var c = _.find(self.cache, function(c) {return c.id === id;});
return _.isUndefined(c) ? c : _.extend({}, c.values, {"id": id});
});
if (self.debug_mode) {
if (_.include(records, undefined)) {

View File

@ -205,7 +205,7 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
case 'selection': case 'statusbar':
// Each choice is [value, label]
if(_.isArray(value)) {
value = value[0];
return value[1];
}
var result = _(descriptor.selection).detect(function (choice) {
return choice[0] === value;

View File

@ -414,7 +414,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
context: this.dataset.get_context(),
});
$.when(load_view).then(function (r) {
this.alive($.when(load_view)).then(function (r) {
return self.search_view_loaded(r);
}).fail(function () {
self.ready.reject.apply(null, arguments);
@ -473,12 +473,9 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
* Sets up search view's view-wide auto-completion widget
*/
setup_global_completion: function () {
var self = this;
var autocomplete = this.$el.autocomplete({
source: this.proxy('complete_global_search'),
select: this.proxy('select_completion'),
search: function () { self.$el.autocomplete('close'); },
focus: function (e) { e.preventDefault(); },
html: true,
autoFocus: true,
@ -486,6 +483,10 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
delay: 250,
}).data('autocomplete');
this.$el.on('input', function () {
this.$el.autocomplete('close');
}.bind(this));
// MonkeyPatch autocomplete instance
_.extend(autocomplete, {
_renderItem: function (ul, item) {

View File

@ -15,6 +15,37 @@ openerp.testing = {};
list_editable: ['list', 'form', 'data'],
};
var initialized = [];
/**
* openerp.init is a broken-ass piece of shit, makes it impossible to
* progressively add modules, using it, retarded openerp_inited flag
* means the first tests being run get their dependencies loaded
* (basically just base and web), and for *every other module* the tests
* run without the dependencies being correctly loaded
*/
function init(modules) {
if (!initialized.length) {
openerp.init(modules);
initialized = openerp._modules.slice();
return;
}
var to_initialize = _.difference(modules, initialized);
for (var i = 0; i < to_initialize.length; i++) {
var modname = to_initialize[i];
var fct = openerp[modname];
if (typeof fct === 'function') {
var module = openerp[modname] = {};
for(var k in fct) {
if (!fct.hasOwnProperty(k)) { continue; }
module[k] = fct[k];
}
fct(openerp, module)
}
initialized.push(modname);
openerp._modules.push(modname);
}
}
testing.dependencies = window['oe_all_dependencies'] || [];
testing.current_module = null;
testing.templates = { };
@ -165,9 +196,6 @@ openerp.testing = {};
});
};
var openerp_inited = false;
var db = window['oe_db_info'];
testing.section = function (name, options, body) {
if (_.isFunction(options)) {
body = options;
@ -206,47 +234,10 @@ openerp.testing = {};
.push(env._oe.setup, env._oe.teardown)
.push(options.setup, options.teardown);
var opts = _.defaults({}, options, env._oe);
// FIXME: if this test is ignored, will still query
if (opts.rpc === 'rpc' && !db) {
QUnit.config.autostart = false;
db = {
source: null,
supadmin: null,
password: null
};
var $msg = $('<form style="margin: 0 1em 1em;">')
.append('<h3>A test needs to clone a database</h3>')
.append('<h4>Please provide the source clone information</h4>')
.append(' Source DB: ').append('<input name="source">').append('<br>')
.append(' DB Password: ').append('<input name="supadmin">').append('<br>')
.append('Admin Password: ').append('<input name="password">').append('<br>')
.append('<input type="submit" value="OK"/>')
.submit(function (e) {
e.preventDefault();
e.stopPropagation();
db.source = $msg.find('input[name=source]').val();
db.supadmin = $msg.find('input[name=supadmin]').val();
db.password = $msg.find('input[name=password]').val();
QUnit.start();
$.unblockUI();
});
$.blockUI({
message: $msg,
css: {
fontFamily: 'monospace',
textAlign: 'left',
whiteSpace: 'pre-wrap',
cursor: 'default'
}
});
}
QUnit.test(name, function () {
var instance = openerp;
if (!openerp_inited) {
openerp.init(module_deps);
openerp_inited = true;
}
init(module_deps);
instance.session = new instance.web.Session();
instance.session.uid = 42;
if (_.isNumber(opts.asserts)) {
@ -276,44 +267,6 @@ openerp.testing = {};
instance.session.responses[spec] = handler;
};
break;
case 'rpc':
async = true;
(function () {
// Bunch of random base36 characters
var dbname = 'test_' + Math.random().toString(36).slice(2);
// Add db setup/teardown at the start of the stack
case_stack = case_stack.unshift(function (instance) {
// FIXME hack: don't want the session to go through shitty loading process of everything
instance.session.session_init = testing.noop;
instance.session.load_modules = testing.noop;
instance.session.session_bind();
return instance.session.rpc('/web/database/duplicate', {
fields: [
{name: 'super_admin_pwd', value: db.supadmin},
{name: 'db_original_name', value: db.source},
{name: 'db_name', value: dbname}
]
}).then(function (result) {
if (result.error) {
return $.Deferred().reject(result.error).promise();
}
return instance.session.session_authenticate(
dbname, 'admin', db.password, true);
});
}, function (instance) {
return instance.session.rpc('/web/database/drop', {
fields: [
{name: 'drop_pwd', value: db.supadmin},
{name: 'drop_db', value: dbname}
]
}).then(function (result) {
if (result.error) {
return $.Deferred().reject(result.error).promise();
}
return result;
});
});
})();
}
// Always execute tests asynchronously

View File

@ -1030,8 +1030,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
open_defaults_dialog: function () {
var self = this;
var display = function (field, value) {
if (!value) { return value; }
if (field instanceof instance.web.form.FieldSelection) {
return _(field.values).find(function (option) {
return _(field.get('values')).find(function (option) {
return option[0] === value;
})[1];
} else if (field instanceof instance.web.form.FieldMany2One) {
@ -3091,7 +3092,7 @@ instance.web.form.CompletionFieldMixin = {
// quick create
var raw_result = _(data.result).map(function(x) {return x[1];});
if (search_val.length > 0 && !_.include(raw_result, search_val) &&
! (self.options && self.options.no_quick_create)) {
! (self.options && (self.options.no_create || self.options.no_quick_create))) {
values.push({
label: _.str.sprintf(_t('Create "<strong>%s</strong>"'),
$('<span />').text(search_val).html()),
@ -3102,13 +3103,15 @@ instance.web.form.CompletionFieldMixin = {
});
}
// create...
values.push({
label: _t("Create and Edit..."),
action: function() {
self._search_create_popup("form", undefined, self._create_context(search_val));
},
classname: 'oe_m2o_dropdown_option'
});
if (!(self.options && self.options.no_create)){
values.push({
label: _t("Create and Edit..."),
action: function() {
self._search_create_popup("form", undefined, self._create_context(search_val));
},
classname: 'oe_m2o_dropdown_option'
});
}
return values;
});
@ -5129,7 +5132,7 @@ instance.web.form.FieldReference = instance.web.form.AbstractField.extend(instan
.on('blurred', null, function () {self.trigger('blurred');});
this.m2o = new instance.web.form.FieldMany2One(fm, { attrs: {
name: 'm2o',
name: 'Referenced Document',
modifiers: JSON.stringify({readonly: this.get('effective_readonly')}),
}});
this.m2o.on("change:value", this, this.data_changed);

View File

@ -1654,9 +1654,12 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
function synchronized(fn) {
var fn_mutex = new $.Mutex();
return function () {
var obj = this;
var args = _.toArray(arguments);
args.unshift(this);
return fn_mutex.exec(fn.bind.apply(fn, args));
return fn_mutex.exec(function () {
if (obj.isDestroyed()) { return $.when(); }
return fn.apply(obj, args)
});
};
}
var DataGroup = instance.web.Class.extend({

View File

@ -595,6 +595,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
action_views_ids : views_ids
}, self.flags, self.flags[view.view_type] || {}, view.options || {})
});
views_ids[view.view_type] = view.view_id;
});
if (this.flags.views_switcher === false) {
@ -602,7 +603,11 @@ instance.web.ViewManager = instance.web.Widget.extend({
}
// If no default view defined, switch to the first one in sequence
var default_view = this.flags.default_view || this.views_src[0].view_type;
return this.switch_mode(default_view);
return this.switch_mode(default_view, null, this.flags[default_view] && this.flags[default_view].options);
},
switch_mode: function(view_type, no_store, view_options) {
var self = this;
@ -810,6 +815,11 @@ instance.web.ViewManager = instance.web.Widget.extend({
contexts: [action_context].concat(contexts || []),
group_by_seq: groupbys || []
}).done(function (results) {
if (results.error) {
throw new Error(
_.str.sprintf(_t("Failed to evaluate search criterions")+": \n%s",
JSON.stringify(results.error)));
}
self.dataset._model = new instance.web.Model(
self.dataset.model, results.context, results.domain);
var groupby = results.group_by.length
@ -1254,7 +1264,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
this.dataset = dataset;
this.model_id = model_id;
if (args && args[0].error) {
this.do_warn( instance.web.qweb.render('message_error_uploading'), args[0].error);
this.do_warn(_t('Uploading Error'), args[0].error);
}
if (!model_id) {
this.on_attachments_loaded([]);
@ -1338,7 +1348,7 @@ instance.web.View = instance.web.Widget.extend({
"context": this.dataset.get_context(),
});
}
return view_loaded_def.then(function(r) {
return this.alive(view_loaded_def).then(function(r) {
self.fields_view = r;
// add css classes that reflect the (absence of) access rights
self.$el.addClass('oe_view')

View File

@ -536,23 +536,32 @@
</t>
<t t-name="ViewManagerDebugViewLog">
<div class="oe_debug_view_log">
<label>ID:</label>
<span><t t-esc="perm.id"/></span>
<label>XML ID:</label>
<span><t t-esc="perm.xmlid"/></span>
<label>Creation User:</label>
<span><t t-esc="format(perm.create_uid, { 'type' : 'many2one' }, '/')"/></span>
<label>Creation Date:</label>
<span><t t-esc="format(perm.create_date, { 'type' : 'datetime' }, '/')"/></span>
<label>Latest Modification by:</label>
<span><t t-esc="format(perm.write_uid, { 'type' : 'many2one' }, '/')"/></span>
<label>Latest Modification Date:</label>
<span><t t-esc="format(perm.write_date, { 'type' : 'datetime' }, '/')"/></span>
<table class="table table-condensed table-striped">
<tr>
<th>ID:</th>
<td><t t-esc="perm.id"/></td>
</tr>
<tr>
<th>XML ID:</th>
<td><t t-esc="perm.xmlid or '/'"/></td>
</tr>
<tr>
<th>Creation User:</th>
<td><t t-esc="format(perm.create_uid, { 'type' : 'many2one' }, '/')"/></td>
</tr>
<tr>
<th>Creation Date:</th>
<td><t t-esc="format(perm.create_date, { 'type' : 'datetime' }, '/')"/></td>
</tr>
<tr>
<th>Latest Modification by:</th>
<td><t t-esc="format(perm.write_uid, { 'type' : 'many2one' }, '/')"/></td>
</tr>
<tr>
<th>Latest Modification Date:</th>
<td><t t-esc="format(perm.write_date, { 'type' : 'datetime' }, '/')"/></td>
</tr>
</table>
</div>
</t>
<t t-name="ViewPager">

View File

@ -149,64 +149,4 @@ function (test) {
});*/
});
var login = "admin";
var password = "admin";
ropenerp.testing.section('jsonrpc-auth', {
rpc: "rpc",
},
function (test) {
return;
test('basic-auth', {asserts: 3}, function () {
var db = ropenerp.session.db;
var session = new openerp.Session(null, null, {override_session: true});
equal(session.uid, undefined, "uid is expected to be undefined");
return session.session_authenticate(db, login, password).then(function() {
equal(session.uid, 1, "Admin's uid must be 1");
return session.rpc("/web/dataset/call_kw", {
model: "res.users",
method: "read",
args: [1, ["login"]],
kwargs: {},
}).then(function(result) {
equal(result.login, "admin", "Admin's name must be 'admin'");
});
});
});
test('share-sessions', {asserts: 6}, function () {
var db = ropenerp.session.db;
var session = new openerp.Session(null, null, {override_session: true});
var session2;
return session.session_authenticate(db, login, password).then(function() {
equal(session.uid, 1, "Admin's uid must be 1");
session2 = new openerp.Session(null, null, {session_id: session.session_id});
equal(session2.uid, undefined, "uid should be undefined");
equal(session2.override_session, true, "overwrite_session should be true");
console.log("session_id", session.session_id);
return session2.session_reload();
}).then(function() {
equal(session2.uid, session.uid);
equal(session2.uid, 1);
return session2.rpc("/web/dataset/call_kw", {
model: "res.users",
method: "read",
args: [1, ["login"]],
kwargs: {},
}).then(function(result) {
equal(result.login, "admin", "Admin's name must be 'admin'");
});
});
});
test('models', {asserts: 2}, function () {
var db = ropenerp.session.db;
var session = new openerp.Session(null, null, {override_session: true});
return session.session_authenticate(db, login, password).then(function() {
return session.model("res.users").call("search_read", {fields: ["login"], domain: [["id", "=", 1]]});
}).then(function(result) {
equal(result.length, 1, "Must have one result");
equal(result[0].login, "admin", "Must have admin's login");
});
});
});
})();

View File

@ -59,7 +59,7 @@ class QUnitSuite(unittest.TestSuite):
'timeout': self.timeout,
'inject': os.path.join(ROOT, 'qunit-phantomjs-bridge.js')
})
], stdout=subprocess.PIPE)
], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
try:
while True:
@ -75,7 +75,12 @@ class QUnitSuite(unittest.TestSuite):
phantom.terminate()
def process(self, line, result):
args = json.loads(line)
try:
args = json.loads(line)
except ValueError: # phantomjs stderr
if 'CoreText' not in line:
print line
return False
event_name = args[0]
if event_name == 'qunit.done':
@ -108,6 +113,8 @@ class QUnitSuite(unittest.TestSuite):
self._test.failed = True
result.addFailure(
self._test, self.failure_to_str(*args[2:]))
elif event_name == 'console':
print args[1]
return False

View File

@ -1,27 +1,24 @@
import urllib
import urlparse
from openerp import sql_db, tools
from qunitsuite.suite import QUnitSuite
class WebSuite(QUnitSuite):
def __init__(self):
def __init__(self, module):
url = urlparse.urlunsplit([
'http',
'localhost:{port}'.format(port=tools.config['xmlrpc_port']),
'/web/tests',
'mod=*&source={db}&supadmin={supadmin}&password={password}'.format(
db=tools.config['db_name'],
# al: i dont understand why both are needed, db_password is the
# password for postgres and should not appear here of that i'm
# sure
#
# But runbot provides it with this wrong key so i let it here
# until it's fixed
supadmin=tools.config['db_password'] or 'admin',
password=tools.config['admin_passwd'] or 'admin'),
urllib.urlencode({
'mod': module,
'source': tools.config['db_name'],
'supadmin': tools.config['admin_passwd'],
'password': 'admin',
}),
''
])
super(WebSuite, self).__init__(url, 50000)
def load_tests(loader, standard_tests, _):
standard_tests.addTest(WebSuite())
standard_tests.addTest(WebSuite('web'))
return standard_tests

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2014-01-30 17:05+0000\n"
"Last-Translator: Bosko Stojakovic <bluesoft83@gmail.com>\n"
"Last-Translator: Boško Stojaković <bluesoft83@gmail.com>\n"
"Language-Team: Bosnian <bs@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: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
"X-Poedit-Language: Czech\n"
#. module: web_calendar

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -15,8 +15,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
"Language: es\n"
#. module: web_calendar

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2014-02-13 06:10+0000\n"
"X-Generator: Launchpad (build 16916)\n"
"X-Launchpad-Export-Date: 2014-02-25 06:04+0000\n"
"X-Generator: Launchpad (build 16926)\n"
#. module: web_calendar
#. openerp-web

Some files were not shown because too many files have changed in this diff Show More